summaryrefslogtreecommitdiff
path: root/macros.asm
diff options
context:
space:
mode:
authorU-Daniel-PC\Daniel <corrnondacqb@yahoo.com>2015-02-13 11:10:59 -0500
committerU-Daniel-PC\Daniel <corrnondacqb@yahoo.com>2015-02-13 11:10:59 -0500
commit7676ff6379115df95c3676552f67c9987f57ddb3 (patch)
treed6a3738f548abfe9d5e75444f4c65968fbba27e1 /macros.asm
parent49b0dac0ae070657f20a35142305f83bdbccee04 (diff)
Dump music (yenatch)
Diffstat (limited to 'macros.asm')
-rwxr-xr-xmacros.asm26
1 files changed, 26 insertions, 0 deletions
diff --git a/macros.asm b/macros.asm
new file mode 100755
index 0000000..a53faf4
--- /dev/null
+++ b/macros.asm
@@ -0,0 +1,26 @@
+INCLUDE "macros/sound.asm"
+
+dbw: MACRO
+ db \1
+ dw \2
+ ENDM
+
+dn: MACRO
+ rept _NARG / 2
+ db (\1) << 4 + (\2)
+ shift
+ shift
+ endr
+ ENDM
+
+dx: MACRO
+x = 8 * ((\1) - 1)
+ rept \1
+ db ((\2) >> x) & $ff
+x = x + -8
+ endr
+ ENDM
+
+bigdw: MACRO ; big-endian word
+ dx 2, \1
+ ENDM