Difference between revisions of "Cc65"

From C256 Foenix Wiki
Jump to navigation Jump to search
Line 4: Line 4:
 
To get started:
 
To get started:
 
* install cc65: https://cc65.github.io/
 
* install cc65: https://cc65.github.io/
* install gnumake (pretty much a requirement for C development)
+
* be sure gnumake is installed (pretty much a requirement for C development)
 
* download/clone the kernel/dos repo: https://github.com/ghackwrench/F256_Jr_Kernel_DOS  
 
* download/clone the kernel/dos repo: https://github.com/ghackwrench/F256_Jr_Kernel_DOS  
 
* enter the cc65/examples directory
 
* enter the cc65/examples directory

Revision as of 12:11, 23 January 2023

cc65

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: https://github.com/ghackwrench/F256_Jr_Kernel_DOS

To get started:

  • install cc65: https://cc65.github.io/
  • be sure gnumake is installed (pretty much a requirement for C development)
  • download/clone the kernel/dos repo: https://github.com/ghackwrench/F256_Jr_Kernel_DOS
  • 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.