summaryrefslogtreecommitdiff
path: root/macros/code.asm
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-07-01 13:08:08 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2020-07-01 13:13:40 -0400
commite6f75432928ccd915016162a68df43b0adf6ce04 (patch)
tree8b3efc7441195cb12dcdbd34442da00f45e2fdcc /macros/code.asm
parent534863abe1d7c57707135574ef8bb1094aa5be22 (diff)
Identify more labels, and use the jumptable macro when possible
Diffstat (limited to 'macros/code.asm')
-rw-r--r--macros/code.asm4
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/code.asm b/macros/code.asm
index c92e7132..9de3dd1e 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