You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
301 B
24 lines
301 B
3 years ago
|
if !def(_utils_inc_)
|
||
|
_utils_inc_ equ 0
|
||
|
|
||
|
_add_r16_8: macro
|
||
|
ld a, \2
|
||
|
add (\3)
|
||
|
ld \2, a
|
||
|
adc \1
|
||
|
sub \2
|
||
|
ld \1, a
|
||
|
endm
|
||
|
|
||
|
add_r16_8: macro
|
||
|
if "\1" == "hl"
|
||
|
_add_r16_8 h, l, (\2)
|
||
|
elif "\1" == "bc"
|
||
|
_add_r16_8 b, c, (\2)
|
||
|
elif "\1" == "de"
|
||
|
_add_r16_8 d, e, (\2)
|
||
|
endc
|
||
|
endm
|
||
|
|
||
|
endc
|