EdouardBERGE / rasm

RASM powerful Z80 assembler
132 stars 16 forks source link

not compatible with GNU Z80ASM ? #16

Closed Emashzed closed 2 years ago

Emashzed commented 2 years ago

TinyBasic will not compile with RASM. TinyBasic 2.5g source : http://retrodepot.net/wp-content/uploads/2017/12/tinybasic_2_5g.txt (supposedly this is valid GNU Z80Asm source code).

RASM 1.6 used

> rasm tinybasic_2_5g.txt

Pre-processing [tinybasic_2_5g.txt]
Assembling
[tinybasic_2_5g.txt:407] STOP assembling requested
Error: [tinybasic_2_5g.txt:127] expression [INIT] keyword [INIT] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:140] expression [OUTC] keyword [OUTC] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:142] expression [EXPR2] keyword [EXPR2] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:144] expression [EXPR1] keyword [EXPR1] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:163] expression [FIN] keyword [FIN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:164] expression [QWHAT] keyword [QWHAT] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:172] expression [PARN] keyword [PARN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:177] expression [SIZE] keyword [SIZE] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:179] expression [ASORRY] keyword [ASORRY] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:180] expression [VARBGN] keyword [VARBGN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:181] expression [SUBDE] keyword [SUBDE] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:190] expression [VARBGN] keyword [VARBGN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:252] expression [ERROR_ROUTINE] keyword [ERROR_ROUTINE] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:299] expression [PRTSTG] keyword [PRTSTG] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:310] expression [GETLN] keyword [GETLN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:312] expression [BUFFER] keyword [BUFFER] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:318] expression [DIRECT] keyword [DIRECT] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:331] expression [FNDLN] keyword [FNDLN] not found in variables, labels or aliases
Error: [tinybasic_2_5g.txt:335] expression [FNDNXT] keyword [FNDNXT] not found in variables, labels or aliases
Error: Too many errors!

Weird thing is, these labels do exist...

EdouardBERGE commented 2 years ago

But there is (as displayed on your log) a STOP instruction at line 407

Replacing STOP, RUN, LET which are Rasm directives and reserved keyword by something else DOSTOP,DORUN,DOLET solved first issues

Then modifying macro because the definition is kindah exotic (hey, GNU, what else ^_^)

Oh, i see another reserved keyword (used for Winape compatibility) LIST

Will continue later but there is a LOT of reserved keyword and maybe more incompatibilities

EdouardBERGE commented 2 years ago

ABS and RND => DOABS,DORND SHR => >>

It compiles ^_^

You may make a "diff" to see what i changed

tinybasic_2_5g.txt

Emashzed commented 2 years ago

Kudos for the lightning fast feedback Edouard. Indeed, it's quite fair that RASM would behave as such when encountering reserved keywords. I though I might have stumbled upon a bug somehow and totally missed the "STOP" directive, silly me. RASM is to Z80 what NASM is to x86, once you try it, you never go back. Thanks for the great work.