diff options
author | Bryan Bishop <kanzure@gmail.com> | 2015-02-06 16:03:45 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2015-02-06 16:03:45 -0600 |
commit | f8acaf69f05a4086415cf6e156bd8f668a8eadda (patch) | |
tree | 8bf5b00570371748e1649d3e1e07a72202abcc8b /macros/predef.asm | |
parent | 567b576f60866f92eda1660ecd19bf3e6d7519c6 (diff) | |
parent | 90891ec69ffae14129589e850e3a73163bc0b02c (diff) |
Merge pull request #271 from yenatch/master
incbins
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 |