Implement ds align[alignment, offset] (#1181)

This commit is contained in:
Rangi
2023-11-21 17:57:47 -05:00
committed by GitHub
parent 6f0ffcf3e1
commit 46e29de66f
17 changed files with 148 additions and 17 deletions

View File

@@ -0,0 +1,7 @@
SECTION "test", ROM0
align 3, 3 ; 3 < 4, so this is used in `ds align` below
db 2, 22, 222 ; three
ds align[4, 4] ; (1 << 3) - 3 - three + 4 = 6 bytes
db 42 ; one
align 4, 5
assert @ - STARTOF("test") == 3 + 6 + 1