1
0
mirror of https://github.com/cc65/cc65.git synced 2024-07-05 21:29:03 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
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
asminc Create static drivers directly from source files. 2014-06-04 23:50:18 +02:00
cfg More room by default for zero-page data. 2015-03-23 18:42:25 +01:00
doc Fix typo in documentation for .ADDRSIZE 2015-04-21 16:24:27 -04:00
include Rename c1p target to osic1p 2015-02-03 22:42:35 +01:00
libsrc Added cmdline support to exec(). 2015-04-26 14:09:20 +02:00
samples Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
src Small changes to coding style and to ca65 documentation for .ADDRSIZE 2015-04-21 16:09:01 -04:00
test Made sure that parallel-building the regression-tests doesn't start a test before all of the directories are clean. 2014-12-18 14:30:35 -05:00
testcode add LF 2014-11-20 13:16:04 +01:00
util Changed multi-line C comments into another style. 2014-06-30 16:51:07 -04:00
.gitignore use 'testwrk' dir for bdiff 2014-11-25 12:56:45 +01:00
.travis.yml Adjusted Travis CI file to recent change. 2014-11-01 13:49:19 +01:00
LICENSE Added "the usual suspects". 2013-03-21 22:23:38 +01:00
Makefile Create zip file. 2014-03-09 00:20:17 +01:00
Makefile.travis Fixed file name of Windows binary snapshot. 2015-01-20 21:00:44 +01:00
README.md Added Challenger 1P to list of supported machines. 2015-02-11 19:14:13 +01:00

documentation

wiki

build status

cc65 is a complete cross development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, librarian and several other tools.

cc65 has C and runtime library support for many of the old 6502 machines, including

  • the following Commodore machines:
    • VIC20
    • C16/C116 and Plus/4
    • C64
    • C128
    • CBM 510 (aka P500)
    • the 600/700 family
    • newer PET machines (not 2001).
  • the Apple ][+ and successors.
  • the Atari 8 bit machines.
  • the Atari 5200 console.
  • GEOS for the C64, C128 and Apple //e.
  • the Nintendo Entertainment System (NES) console.
  • the Supervision console.
  • the Oric Atmos.
  • the Lynx console.
  • the Ohio Scientific Challenger 1P

The libraries are fairly portable, so creating a version for other 6502s shouldn't be too much work.