SDFS::RISCOS.$.Coding.Projects.ResFinder.h.EQUx
; EQUx macros
; by Rick Murray
;
; Because I always used to use EQUx in BASIC assembler, in preference
; to the DCx form. Et, voilà, le même chose pour l'assembleur objasm!
;
; EQUB <value> [inserts a byte]
MACRO
EQUB $var
DCB $var
MEND
; EQUW <value> [inserts a "halfword" (16 bit)]
MACRO
EQUW $var
DCW $var
MEND
; Above, below: the equW(ord) and equD(oubleword) are anachronisms that
; date back to the Beeb era, which is somewhat ironic given that it is
; an eight bit micro so *technically* W is a double-word and D is a
; quad-word, but let's not get too pedantic, eh?
; EQUD <value> [inserts a "word" (32 bit)]
MACRO
EQUD $var
DCD $var
MEND
; EQUS "<value>" [inserts a literal string]
; For 'EQUS "something", 13, 0', use EQUSZ(A) with "\r" and/or "\n".
; For more complicated stuff, you'll probably need to use DCS directly.
MACRO
EQUS $var
DCB "$var"
MEND
; EQUSZ "<value>" [inserts a literal string that is null terminated]
MACRO
EQUSZ $var
DCB "$var", 0
MEND
; EQUSZA "<value>" [inserts a literal string that is null terminated and then aligned]
MACRO
EQUSZA $var
DCB "$var", 0
ALIGN
MEND
END
Created by ROView by Rick Murray.