[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: An idea that might go nowhere - ProDOS + CC65 = :>?
Hi Steve,
>BLuRry wrote:
>> Why not just interrogate the standard text entry buffer at
>> 0x0200-0x02ff? Might be able to use it as a dual-purpose command
>> buffer for manual or script entry that way.
>I'd have to rewrite part of the libc.
Rather the opposite...
I presume you already checked out this:
http://www.cc65.org/doc/apple2-9.html#ss9.1
The argument passing method described there means for the cc65 C
library picking up the arguments from the keyboard buffer. So if you
create a shell that puts arguments intended for a cc65 program into
the keyboard buffer "in the right way" then this *THE* way to get
along without any modification on the cc65 side of things.
"The right way" is quite simple:
- Place $B2 at $200
- Place the arguments at $201 with hibit clear
- Place $00 behind the arguments
You don't have the whole kayboard buffer to do that because cc65
programs expect the their path to be present at $280 (lenght at $280,
content at $281) as done by BASIC.SYSTEM. This ends up as argv[0].
If you have issues, just download the cc65 sources and check out
libsrc/apple2/mainargs.s to view the parsing code.
Regards,
Oliver