diff options
author | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-26 22:24:47 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi42@gmail.com> | 2020-10-26 22:24:47 -0400 |
commit | 676f2f12e3e7990dcc49e3ea391f10aae8131639 (patch) | |
tree | 0411091966fe7a6b5a64f27aa828df015bb84362 /macros/data.asm | |
parent | 46f6cc4d41494c044f1091491c712afc2a5bfd3a (diff) |
Use more assertions to ensure correct code and data
Diffstat (limited to 'macros/data.asm')
-rw-r--r-- | macros/data.asm | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/data.asm b/macros/data.asm index b6cedbf7..a2b1f23c 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 |