leuat / TRSE

Turbo Rascal Syntax Error full repo
GNU General Public License v3.0
239 stars 44 forks source link

OrgAsm: .byte $ff $ff generates $00 instead of error #855

Closed jtgans closed 4 months ago

jtgans commented 4 months ago

Consider this test:

begin
    asm("
      .byte $ff $ff
    ");
end.

This .byte (even if changed to dc.b, btw) instruction is malformed: it should be .byte $ff, $ff. Unfortunately OrgAsm treats it as though it is a valid byte declaration and emits a zero byte instead. It should be emitting an error and halting assembly.

This just ate an hour of my time. It hurts. :P

leuat commented 4 months ago

hehe sorry about that... and thanks for reporting the bug! I've fixed it up and orgasm will now throw an error if the string->number conversion fails...