[Coco] Cross-platform editor for CoCo BASIC?
Allen Huffman
alsplace at pobox.com
Tue Jan 31 23:20:22 EST 2023
> On Jan 31, 2023, at 10:06 PM, Mark via Coco <coco at maltedmedia.com> wrote:
>
> I wonder how difficult it would be to write a text parser (command-line tool) that took in what is essentially CoCo BASIC but using labels rather than line numbers and allowing free-format text and eg. block if/then/else and output CoCo3 BASIC? Editing/pre-processing this on a modern PC would take a lot of pain out of developing in CoCo BASIC...
That is out there — I just don’t remember who wrote it. The code is nicely formatted, tabbed, and even had some keywords for WHILE and such, that would translate in to BASIC.
Looking at Alex’s python scripts, I notice one that compacts the code. We are close to having all the pieces to a BASIC optimizer that keeps thing in BASIC but does things like pre-declare variables in the order that speeds up the ones used the most, and moved GOTO/GOSUB routines around to be faster based on how they are used.
Figuring that out is difficult but it could certainly be helped by a keyword in the code that would tell the code “this should be fast” versus “don’t care”.
--
Allen Huffman - PO Box 7634 - Urbandale IA 50323 - 515-999-0227 (vmail/TXT only)
http://www.subethasoftware.com - https://www.facebook.com/subethasoftware
More information about the Coco
mailing list