summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authorJimB16 <f1@jimb.de>2015-10-19 16:25:15 +0200
committerJimB16 <f1@jimb.de>2015-10-19 16:25:15 +0200
commit3b9a3cc3bee8934e45f5e4d3fd9704b3fa619560 (patch)
treeb402ddfd95a21402d2ab76368d44b9f04f937725 /macros.asm
parent3ef626d37864f4dae26f115c26e448351f19da7c (diff)
parentf399315a489c7eff28ec1941c41d12264fb38039 (diff)
merge conflicts resolved
Diffstat (limited to 'macros.asm')
-rw-r--r--macros.asm26
1 files changed, 26 insertions, 0 deletions
diff --git a/macros.asm b/macros.asm
index 4370886b2..e366ad498 100644
--- a/macros.asm
+++ b/macros.asm
@@ -149,3 +149,29 @@ bcd: MACRO
shift
endr
ENDM
+
+ln: MACRO
+ if _NARG == 5
+ lb \1, \2 << 4 + \3, \4 << 4 + \5
+ else
+ if _NARG == 3
+ ld \1, \2 << 4 + \3
+ else
+ fail "incorrect number of arguments for ln"
+ endc
+ endc
+ENDM
+
+dwtile: MACRO
+ dw (\1 << 4) + \2
+ if _NARG > 2
+ rept _NARG + -2
+ dw \3
+ shift
+ endr
+ endc
+ENDM
+
+ldtile: MACRO
+ ld \1, (\2 << 4) + \3
+ENDM