aboutsummaryrefslogtreecommitdiff
path: root/utils.gbasm
diff options
context:
space:
mode:
authorAstatin <[email protected]>2024-11-11 17:56:54 +0900
committerAstatin <[email protected]>2024-11-11 17:56:54 +0900
commitd605c2900ae7c62f1937e250a2ae489678d99214 (patch)
tree4c1fc76f3b9e50b5f8461784fc349bff685e465a /utils.gbasm
parent5eb8b27696e9fa2f60fd75ffb1b31fe049fcc772 (diff)
Add dungeon menu choice selection mode
Diffstat (limited to 'utils.gbasm')
-rw-r--r--utils.gbasm15
1 files changed, 9 insertions, 6 deletions
diff --git a/utils.gbasm b/utils.gbasm
index cb1822a..b24608b 100644
--- a/utils.gbasm
+++ b/utils.gbasm
@@ -31,6 +31,14 @@ bzero: ; dest = HL, n = BC
$end:
.END
+.MACRODEF CALL_DE
+ LD BC, =$end
+ PUSH BC
+ PUSH DE
+ RET
+ $end:
+.END
+
.MACRODEF JUMP_TABLE ; Jump table pointer in BC, index in A, also overwrites DE
LD E, A
LD D, $00
@@ -47,12 +55,7 @@ bzero: ; dest = HL, n = BC
ADC B
LD D, A
- ; CALL DE
- LD BC, =$end
- PUSH BC
- PUSH DE
- RET
- $end:
+ .CALL_DE
.END
Print_8bit: ; Number in A, Memory Tilemap position in HL