summaryrefslogtreecommitdiff
path: root/src/macros/code.asm
blob: 9e8a4cef889e70a3db0145bf19a47fa0ccbdee83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
lb: MACRO ; r, hi, lo
	ld \1, (\2) << 8 + ((\3) & $ff)
ENDM

ldtx: MACRO
	ld \1, \2_
ENDM

bank1call: MACRO
	rst $18
	dw \1
ENDM

farcall: MACRO
	rst $28
if _NARG == 1
	db BANK(\1)
	dw \1
else
	db \1
	dw \2
endc
ENDM

; the rst $38 handler is a single ret instruction
; probably used for testing purposes during development
debug_ret EQUS "rst $38"