Page 1 of 1

Quick Basic

Posted: Wed Nov 11, 2020 11:17 pm
by Ziglag

I cut my teeth on Apple IIe Basic.  By high school I started taking of on PCs using Quick Basic.  I was wondering if anyone else here would like to see a Basic IDE for the X16 that worked similarly to how Quick Basic worked on the old Dos PCs?  Initially what I am thinking is something that would let you code without explicit line numbers, being able to include references to other code files, and ability to organize code into subroutines like QB did.  Once the code is run it would take the code, add the line numbers, combine referenced files and produce the code ready to run in X16 Basic.  What are your thoughts?


Quick Basic

Posted: Thu Nov 12, 2020 5:33 am
by Cyber

@The 8-Bit Guy was impressed by Maximite BASIC editor, and said he wanted similar functionality for X16. And I remember @Lorin Millsap said they are planning to implement such IDE.

@Perifractic, if there is any info on this topic, please add it to FAQ. It's not the first time somebody asks about BASIC IDE with labels instead of line numbers.

For the time being there is two external tools made by forum members:

https://www.commanderx16.com/forum/index.php?/topic/563-qbasic-style-basic-transpiler-anyone-interested/

https://www.commanderx16.com/forum/index.php?/topic/585-my-basic-pre-processor/


Quick Basic

Posted: Thu Nov 12, 2020 7:45 am
by Stefan

I like the idea of more structured BASIC programming too, with labels and long variable names.

I also think it would be great if you could do that on the X16 directly.

I've been thinking about a parser/translator solution.

Work flow:


  1. Create and edit a source file as raw text and save it to disk. This is the part I've been working on for some time (X16 Edit).


  2. Run the parser/translator, which would output a Commodore BASIC prg file to disk.


  3. Load and run the prg file as a normal BASIC program.


The source file could look like this:

message$="Hello"

loop: print message$

goto loop

Which would be translated into:

10 aa$="Hello"

20 print aa$

30 goto 20

I've done some initial tests. I managed to write assembly code that analyzes the elements of a line - what part of a line is a token, a string, a number literal, a delimiter, a label definition or a variable name. It's probably a lot of work making this into a functional parser/translator, but it would be doable.

However, it would be great to know if somebody else is working on a similar solution.


Quick Basic

Posted: Thu Dec 31, 2020 5:00 pm
by jnewman

There is this cross-compiler I was checking out.  I do agree it would be much cooler to have something running on the X16 though.  In case it may be helpful for this discussion here is the link to the topic I posted a few minutes ago.