Another possible bug:
When you try to assemble this:
Code: Select all
; Header removed
ld de, 0
ld (currow), de
ld hl, game.str_hl2 ; Line 14
B_CALL(_puts)
ret
.module game
.local
str_hl2:
.db "Half Life 2", 0
.endlocal
.endmodule
Brass gives me this error:
Brass wrote:Error: Could not parse expression 'game.str_hl2' (Invalid number). [test.z80:14]
If something like this happens I always play with the error, I slightly changed some stuff and see if the error still happens:
if I change all "str_hl2" into "_str_hl2" then everything works fine (with and without the .(end)local directives)
I checked
this from the brass manual and I suppose that what I want is completely legal (wich is why I think it's a bug)
more weirdness:
Code: Select all
; No problems at all
.deflong TEST(number)
ld a, number
.enddeflong
; Weird, i get "Error: Could not assign value 'number' to label 'value' (Invalid number)."
.deflong TEST(number)
value=number
ld a, value
.enddeflong
; Neither does this work (tried "TEST(11)"), Brass says "Error: Could not evaluate number=11 (Invalid number)"
.deflong TEST(number)
.if number=11
value=number
.endif
ld a, value
.enddeflong
; HAHA xD O_o "Error: Could not evaluate 1=1 (Invalid number) - possible errors between pass 1 and 2."
.if 1=1
ld a, 1
.endif