mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
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:
@@ -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)!
|
||||
|
||||
5
test/link/bit-res-set-bad.asm
Normal file
5
test/link/bit-res-set-bad.asm
Normal file
@@ -0,0 +1,5 @@
|
||||
SECTION "test", ROM0
|
||||
Label:
|
||||
bit Label - 1, a
|
||||
res Label + 8, [hl]
|
||||
set Label | $ff00, b
|
||||
4
test/link/bit-res-set-bad.out
Normal file
4
test/link/bit-res-set-bad.out
Normal 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
10
test/link/bit-res-set.asm
Normal 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]
|
||||
0
test/link/bit-res-set.out
Normal file
0
test/link/bit-res-set.out
Normal file
1
test/link/bit-res-set.out.bin
Normal file
1
test/link/bit-res-set.out.bin
Normal file
@@ -0,0 +1 @@
|
||||
ֻ@ֻIֻ’ֻ›ֻהֻםֻwֻ
|
||||
Reference in New Issue
Block a user