From C256 Foenix Wiki
Revision as of 13:13, 23 January 2023 by Gadget (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


The cc65 compiler may be used with the F256Jr. The platform isn't yet in the official cc65 repo, but the files needed to make it work with the Jr are included in the kernel/dos repo:

To get started:

  • install cc65:
  • be sure gnumake is installed (pretty much a requirement for C development)
  • download/clone the kernel/dos repo:
  • enter the cc65/examples directory
  • type 'make'
  • upload the resulting hello.bin to $2000 (DIP1 must be on)
  • optionally edit name.s to give your program a unique name, and flash it to an unused block (eg $45..$6f).

f256.cfg configures memory as follows:

* $0000-$1fff: ZP, stack, BSS, DATA
* $2000-     : CODE
*      -$BFFF: HEAP

The heap will be any blocks between the end of the code and the start of I/O memory at $C000.

The included kernel.c implements the POSIX drivers for 'stdio.h' and 'dirent.h'.