summaryrefslogtreecommitdiff
path: root/macros
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-01 13:13:49 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-01 13:13:49 -0400
commitfce6243b432d1df1b4ab244023be738a54dbe8f3 (patch)
treec93b0989254b15e86aa0ae07ab255d5bb5fd0afb /macros
parente171c84c2990df2c1a3773885297089869a0fd58 (diff)
Identify more labels, and use the jumptable macro when possible
Diffstat (limited to 'macros')
-rw-r--r--macros/code.asm4
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/code.asm b/macros/code.asm
index c92e7132f..9de3dd1ec 100644
--- a/macros/code.asm
+++ b/macros/code.asm
@@ -11,7 +11,11 @@ ENDM
; Design patterns
jumptable: MACRO
+if "\2" == "hl"
+ ld a, [hl]
+else
ld a, [\2]
+endc
ld e, a
ld d, 0
ld hl, \1