Site Tools


This is an old revision of the document!


ca65 - Dum/Dend Macros

Several Apple II assemblers have DUM/DEND pseudo-ops that define an originated section of source that will have no code generated. E.g.:

        DUM $0 ; zero page references
XLOC    DFB 0
YLOC    DFB 0
WORD    DFW 0
        DEND

These can be emulated in ca65 with the following:

.feature org_per_seg

.macro dum addr
  .pushseg
  .bss
  .org addr
.endmacro

.macro dsect addr
  dum addr
.endmacro

.macro dend
  .popseg
.endmacro

Then the above code can be written in ca65:

        dum $0 ; zero page references
XLOC:   .byte $00
YLOC:   .byte $00
WORD:   .word $0000
        dend