1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-03 06:29:36 +00:00
cc65/libsrc/apple2/targetutil
Oliver Schmidt 3c1cd0d867 Added cmdline support to exec().
The starting point is the CALL2051:REM <cmdline> approach. It uses the BASIC input buffer at $200. ProDOS stores the name of the loaded program at $280 (which we want for argv[0]) leaving us with 128 char buffer. If we run the program via exec() we don't need the CALL2051 but only the REM token (which is just one char). So have a maximum cmdline length of 126 (plus a terminating zero).

There's no specification for ProDOS BIN file cmdline parameters so exec() just supports the CALL2051:REM <cmdline> approach. In contrast ProDOS SYS files allow for a 'startup filename'. A ProDOS filename is short than 126 chars so having exec() general cut the cmdline after 126 chars seems reasonable. If the SYS file we exec() allows for less we cut the cmdline further.

Our 'loader.system' SYS file however allows for an unusually 126 char long "startup filename" as it is targeted towards cc65 BIN porgrams with their 126 cmdline length.
2015-04-26 14:09:20 +02:00
..
loader.cfg Removed (pretty inconsistently used) tab chars from source code base. 2013-05-09 13:57:12 +02:00
loader.s Added cmdline support to exec(). 2015-04-26 14:09:20 +02:00
Makefile.inc Have src/Makefile and libsrc/Make use disjoint work directories. 2014-03-05 23:24:35 +01:00