Skip to content
Movax12 edited this page Feb 22, 2022 · 13 revisions

CA65HL

  Overview

This is a macro package for use with the ca65 assembler (from the cc65 cross development package) that adds high-level functionality to the assembler. There is no library or 6502 code used, it only extends the syntax and functionality of the assembler. At this point it is targeted for compatibility with the NMOS 6502, so some code generated will not use more advanced features of the 65c02 or higher. All code generated corresponds directly to underlying assembly and with an understanding of the macro code, all assembly code can still be controlled directly in almost every case. The macros have no ability to optimize based on the previous code used; the programmer/developer must be aware of what optimizations are available.

The main feature is **if** flow control. The **if** statement is based on 6502 CPU flags and branch statements, not an evaluation of a Boolean expressions. Loop statements are essentially the same thing and use the same code.

 

Note: Please use a recent snapshot version of ca65, available as part of the cc65 package, avaliable here: https://github.com/cc65/cc65

 

All code structures are nest-able:

 

Clone this wiki locally