aboutsummaryrefslogtreecommitdiffstats
path: root/macros
diff options
context:
space:
mode:
authorRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 17:53:19 -0500
committerRangi42 <remy.oukaour+rangi42@gmail.com>2023-11-20 17:53:19 -0500
commitb066d3c9bc02cf4213173538d148cfabcc7212a8 (patch)
tree9ce48f3d91afbbb8fbe9274de3c271d6fa602190 /macros
parentIdentify the unnamed HRAM variables and one WRAM label (#438) (diff)
downloadpokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.tar.gz
pokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.tar.xz
pokeyellow-b066d3c9bc02cf4213173538d148cfabcc7212a8.zip
Add `bigdw` and `dc` data macros
Diffstat (limited to 'macros')
-rw-r--r--macros/data.asm11
1 files changed, 11 insertions, 0 deletions
diff --git a/macros/data.asm b/macros/data.asm
index 5092b74e..2e4a7ce2 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -56,6 +56,17 @@ MACRO dn ; nybbles
ENDR
ENDM
+MACRO dc ; "crumbs"
+ REPT _NARG / 4
+ db ((\1) << 6) | ((\2) << 4) | ((\3) << 2) | (\4)
+ SHIFT 4
+ ENDR
+ENDM
+
+MACRO bigdw ; big-endian word
+ db HIGH(\1), LOW(\1)
+ENDM
+
MACRO dba ; dbw bank, address
REPT _NARG
dbw BANK(\1), \1