leuat / TRSE

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

OrgAsm considering BRK an opcode type not implemented or illegal #853

Closed jtgans closed 5 months ago

jtgans commented 5 months ago

Using the same code in #852, occasionally I'll get weird errors from TRSE's built-in OrgAsm, stating:

Fatal error during assembly!
Error during OrgAsm assembly : Opcode type not implemented or illegal: brk type 0 on line 

Line 64 in /Users/jtgans/src/monitorhack/main.asm : : BRK 

The offending generated ASM is here:

    JMP ($0A00)
__stop
    BRK

See also #852 for the code I'm using -- just replace the explicit .byte $00 with a BRK to trigger the issue.

jtgans commented 5 months ago

Workaround is to use .byte $00 and bypass the assembler entirely.

leuat commented 5 months ago

thanks for reporting this - this was a bug since OrgAsm is using opcode "0" as also "not implemented". An exception has been made for BRK, so this should be fixed now.