2016-08-18 17:42:31 -07:00

101 lines
1.7 KiB

; Version 2
; DB -> DFB
; ca65
.feature c_comments
.linecont +
.feature labels_without_colons
.feature leading_dot_in_identifiers
.PC02 ; 65C02
; Fix ca65's crappy out-of-the-box support for old assembler directives -- which are completely missing!
; Force APPLE 'text' to have high bit on
; Will display as NORMAL characters
.macro ASC text
.repeat .strlen(text), I
.byte .strat(text, I) | $80
; Define Double Byte -- Big Endian, high-byte first, low-byte second
.macro DDB words
; Define Byte
.macro DFB byte1,byte2,byte3,byte4,byte5,byte6,byte7,byte8,byte9,byte10
.ifnblank byte1
.byte byte1
.ifnblank byte2
.byte byte2
.ifnblank byte3
.byte byte3
.ifnblank byte4
.byte byte4
.ifnblank byte5
.byte byte5
.ifnblank byte6
.byte byte6
.ifnblank byte7
.byte byte7
.ifnblank byte8
.byte byte8
.ifnblank byte9
.byte byte9
.ifnblank byte10
.byte byte10
.macro DW words
.word words
; DS 1
; DS 30, $A0
.macro DS length, fillval
.ifblank fillval
.res length
.res length, fillval
.define equ =
.define EQU =
; ORG *+256
; ORG DATA+256
.macro ORG address
; work around that
; .res address-*
; doesn't work due to bogus "Error: Constant expression expected"
.local _pc_
.if .const(_pc_)
.out .sprintf( "Current * = %04X, Reserving $%04X Bytes, New * = $%04X", _pc_, (address-_pc_), address )
.res (address - _pc_),$EA
.org address