diff options
author | yenatch <yenatch@gmail.com> | 2015-01-20 14:26:16 -0800 |
---|---|---|
committer | yenatch <yenatch@gmail.com> | 2015-01-20 14:26:16 -0800 |
commit | f036cdf13b0e215cd9a14cc9dba24f821a9679c0 (patch) | |
tree | 2f517ab85b4e173a6d8b47c8d1dfb22a20ff9811 /macros/predef.asm | |
parent | 9303752e3fac18a5245870a992a04d11772bed52 (diff) |
Move around some more macros.
Diffstat (limited to 'macros/predef.asm')
-rw-r--r-- | macros/predef.asm | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/macros/predef.asm b/macros/predef.asm new file mode 100644 index 000000000..d6c0344e6 --- /dev/null +++ b/macros/predef.asm @@ -0,0 +1,21 @@ +add_predef: MACRO +\1Predef:: + dw \1 + db BANK(\1) +ENDM + +predef_id: MACRO +; Some functions load the predef id +; without immediately calling Predef. + ld a, (\1Predef - PredefPointers) / 3 +ENDM + +predef: MACRO + predef_id \1 + call Predef +ENDM + +predef_jump: MACRO + predef_id \1 + jp Predef +ENDM |