Closed gitjeff2 closed 3 years ago
Nice idea but XC=BASIC can't do that. It wasn't designed to output BASIC code and the language is not compatible with CBM BASIC. What you're talking about - if I understand well - is a structured BASIC language that is somehow translated to CBM BASIC. For example a local variable is given another name so it doesn't conflict global variables, etc.
First off, this is a fantastic project! I see in #82 you're working towards adding additional platforms. Would it be possible to add VICE's
petcat
as a compiler target eventually? Obviously, instead of converting XC-BASIC's intermediate representation into ASM it would output tokenized BASIC instead. This would allow users to write and maintain well structured BASIC, via XC-BASIC, but keep their code interpreted via the C64's BASIC interpeter.C64list already does basically this, but it's closed source and Windows only. It would be very nice to have a multi-platform open source tool that has this feature.