Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Community Answers

  1. Stefan's post in Creating assembly function which can be called from Basic was marked as the answer   
    I too like the cc65 toolchain for assembly programming. But it's a bit different compared to other assemblers.
    You shouldn't use the .ORG directive (at all). It doesn't control the load address of code.
    If you use the cl65 utility to assemble, specify the default config file for X16 assembly programming with the -C option, for instance:
    cl65 -t cx16 -C cx16-asm.cfg -o test.prg test.asm
    This will place the code at $0801, without a BASIC stub.
    If you want the code to end up at address 8192, you may do this:
    cl65 -t cx16 -C cx16-asm.cfg --start-addr 8192 -o test.prg test.asm
    And if you want a BASIC stub to start your code from:
    cl65 -t cx16 -u __EXEHDR__ -C cx16-asm.cfg -o test.prg test.asm
    To get finer control over the assembly and link process, you may copy the default config file to your project and edit it to your needs. The cc65 manuals have very detailed information on the config file settings.
  • Create New...

Important Information

Please review our Terms of Use