Allow the bit/res/set bit index to be determined at link time (#1654)

This increments the object file revision number from 11 to 12
since it adds a new `RPN_BIT_INDEX` command.
This commit is contained in:
Rangi
2025-02-12 17:14:10 +01:00
committed by GitHub
parent 48412e9c56
commit 2aef09c8d9
12 changed files with 97 additions and 19 deletions

View File

@@ -10,8 +10,10 @@ error: invalid-instructions.asm(5):
syntax error, unexpected bc, expecting hl
error: invalid-instructions.asm(6):
syntax error, unexpected number, expecting hl
warning: invalid-instructions.asm(7): [-Wtruncation]
Expression must be 3-bit
error: invalid-instructions.asm(7):
Bit number must be between 0 and 7, not 8
Invalid bit index 8 for BIT
error: invalid-instructions.asm(8):
Invalid address $40 for RST
error: Assembly aborted (8 errors)!

View File

@@ -0,0 +1,5 @@
SECTION "test", ROM0
Label:
bit Label - 1, a
res Label + 8, [hl]
set Label | $ff00, b

View File

@@ -0,0 +1,4 @@
error: bit-res-set-bad.asm(5): Value $ff00 is not a bit index
error: bit-res-set-bad.asm(4): Value $8 is not a bit index
error: bit-res-set-bad.asm(3): Value $ffffffff is not a bit index
Linking failed with 3 errors

10
test/link/bit-res-set.asm Normal file
View File

@@ -0,0 +1,10 @@
SECTION "test", ROM0
Label:
bit Label + 0, b
bit Label + 1, c
res Label + 2, d
res Label + 3, e
set Label + 4, h
set Label + 5, l
bit Label + 6, a
set Label + 7, [hl]

View File

View File

@@ -0,0 +1 @@
ֻ@ֻIֻֻֻהֻםֻwֻ