summaryrefslogtreecommitdiff
path: root/macros/data.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-10-30 12:26:03 -0400
committerGitHub <noreply@github.com>2020-10-30 12:26:03 -0400
commit7a42f1790ae1e9e357593879bd38c6596dcb03da (patch)
treedbf4ee19995364f15a3b3f98925f606c50598334 /macros/data.asm
parenta2b6befd7d12b2ad8bb97979a10519500dcdd870 (diff)
parent1092983bde65bbf1a27eeabbfbceec1f278a4831 (diff)
Merge pull request #776 from Rangi42/unreferenced
Comment, remove, or revise many unreferenced labels
Diffstat (limited to 'macros/data.asm')
-rw-r--r--macros/data.asm4
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/data.asm b/macros/data.asm
index a6656af32..3e1177f78 100644
--- a/macros/data.asm
+++ b/macros/data.asm
@@ -25,6 +25,10 @@ percent EQUS "* $ff / 100"
; e.g. 1 out_of 2 == 50 percent + 1 == $80
out_of EQUS "* $100 /"
+assert_power_of_2: MACRO
+ assert (\1) & ((\1) - 1) == 0, "\1 must be a power of 2"
+ENDM
+
; Constant data (db, dw, dl) macros
dwb: MACRO