summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2014-04-22 17:14:11 -0400
committeryenatch <yenatch@gmail.com>2014-04-22 17:14:11 -0400
commit55b992916719834a6a932829699a4e9250527f5a (patch)
tree93247b557e03bca9d83c2a88cf15bd7ffe5270b3 /macros.asm
parentb73ed53ab77844d8e6fcf1d1c8f5dbb780e3cd06 (diff)
Use callba/callab macros for cross-bank calls.
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm12
1 files changed, 12 insertions, 0 deletions
diff --git a/macros.asm b/macros.asm
index b5d0ff7c..a0732705 100644
--- a/macros.asm
+++ b/macros.asm
@@ -11,6 +11,18 @@ page EQUS "db $49," ; Start a new Pokedex page.
dex EQUS "db $5f, $50" ; End a Pokedex entry.
+callba: MACRO
+ ld b, BANK(\1)
+ ld hl, \1
+ call Bankswitch
+ ENDM
+
+callab: MACRO
+ ld hl, \1
+ ld b, BANK(\1)
+ call Bankswitch
+ ENDM
+
;\1 = X
;\2 = Y
FuncCoord: MACRO