BASIC 2? Why not get BASIC 7?

Chat about anything CX16 related that doesn't fit elsewhere
mobluse
Posts: 172
Joined: Tue Aug 04, 2020 2:16 pm
Location: Lund, Sweden
Contact:

BASIC 2? Why not get BASIC 7?

Post by mobluse »



On 6/6/2022 at 11:39 PM, Moto Rola said:




Actually why not Comal-80 as the „default”? It beats all the BASICs you could list here, including BASIC 7.0. Comal is „BASIC done right”. Why bother with that ancient BASICs?



Maybe ComAL is not available for licensing or the source code is not documented. Also ComAL-80 for C64 is a rather large language that came on a bank switching 64 KiB cartridge: https://www.c64-wiki.com/wiki/Commodore-64_Comal_80_rev_2.01

X16&C64 Quiz: Try It Now! Huge Char Demo: Try It Now! DECPS: Try It Now! Aritm: Try It Now!
Moto Rola
Posts: 13
Joined: Mon Jun 06, 2022 12:46 am

BASIC 2? Why not get BASIC 7?

Post by Moto Rola »



On 6/7/2022 at 6:13 PM, mobluse said:




Maybe ComAL is not available for licensing or the source code is not documented. Also ComAL-80 for C64 is a rather large language that came on a bank switching 64 KiB cartridge: https://www.c64-wiki.com/wiki/Commodore-64_Comal_80_rev_2.01



...or maybe simply „because the ancient BASiC feels authentically like a Commodore 8 bit computer” — and in fact it doesn't that matter, whether Comal is or isn't available for licensing or the source code is not documented”?

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

BASIC 2? Why not get BASIC 7?

Post by rje »



On 6/7/2022 at 5:34 AM, Moto Rola said:




No idea, why repeat Commodore's mistakes.



Actually I think that's the whole point.

(HA!)

 

Seriously, though, BASIC is perfectly fine for programs that are up to about 4K in size.  So as a "scripting" front-end to a Commodore system, it's similarly perfectly fine.  Tack on all the extensions that are in the X16 BASIC *and* KERNAL, and you've got plenty to work with.  More involved programs will run to assembly as 8BG has done, and perhaps cc65 or similar as I have done.

And then for those who have an additional love from the 80s, there's the open 16K ROM banks for alternate system software.

 

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

BASIC 2? Why not get BASIC 7?

Post by BruceMcF »



On 6/6/2022 at 9:31 PM, Scott Robison said:




Because the ancient BASiC feels authentically like a Commodore 8 bit computer. Those who want COMAL are of course free to use it.



And the"free" here should be underlined. You can run any language on the bare metal, where the only role Basic plays is executing the auto-exec statement which loads the desired environment. For all intents and purposes, if (1) I ever complete xForth {NOT to be taken for granted!} and (2) you load and run xforth.prg as your auto-exec statement, then the Commander X16 becomes, to for all practical purposes a Forth system ... which happens to have a bank of ROM code that contains a Basic interpreter.

Moto Rola
Posts: 13
Joined: Mon Jun 06, 2022 12:46 am

BASIC 2? Why not get BASIC 7?

Post by Moto Rola »



On 6/8/2022 at 12:17 AM, BruceMcF said:




And the"free" here should be underlined. You can run any language on the bare metal, where the only role Basic plays is executing the auto-exec statement which loads the desired environment. For all intents and purposes, if (1) I ever complete xForth {NOT to be taken for granted!} and (2) you load and run xforth.prg as your auto-exec statement, then the Commander X16 becomes, to for all practical purposes a Forth system ... which happens to have a bank of ROM code that contains a Basic interpreter.



Will it be possible to replace that „bank of ROM code that contains a Basic interpreter” with a „bank of ROM code that contains a Forth compiler”? I mean to get rid of that BASIC completely.

SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

BASIC 2? Why not get BASIC 7?

Post by SlithyMatt »



On 6/8/2022 at 6:17 AM, Moto Rola said:




Will it be possible to replace that „bank of ROM code that contains a Basic interpreter” with a „bank of ROM code that contains a Forth compiler”? I mean to get rid of that BASIC completely.



If you get the first version of the board, the ROM will be socketed, and you can freely replace it with the ROM of your choosing. The ROM is also open source, and you can try your hand at replacing the BASIC ROM right now. Of course, that means you won't be able to run any of the many BASIC programs that the community has already shared, and like Bruce says, you can always load a Forth interpreter from the initial BASIC prompt and not lose any functionality. But if you really want a Forth-first machine, you will have to support loading machine-language code as well, assuming you want to use anything out there, including games. They all expect BASIC to be there to at least launch it, but you could have a Forth ROM that just looks at the tokenized BASIC launch code at the beginning and jumps to the machine language program start. But still, some machine language apps expect the BASIC ROM to be there, and make use of some of the data and subroutines. If you want to be a single man on a Forth-only island, have at it, but just know that you are likely to be alone and only have your own programs to run.

Moto Rola
Posts: 13
Joined: Mon Jun 06, 2022 12:46 am

BASIC 2? Why not get BASIC 7?

Post by Moto Rola »



On 6/8/2022 at 2:53 PM, SlithyMatt said:




They all expect BASIC to be there to at least launch it



Oh, so there's no distinct separation between kernel and BASIC interpreter?

Scott Robison
Posts: 952
Joined: Fri Mar 19, 2021 9:06 pm

BASIC 2? Why not get BASIC 7?

Post by Scott Robison »



On 6/8/2022 at 7:26 AM, Moto Rola said:




Oh, so there's no distinct separation between kernel and BASIC interpreter?



There is a separation, but many / most ML programs include a BASIC stub to run the ML after loading it. And some programs are written in BASIC. And some ML programs will use routines in the BASIC ROM. Any of those programs would not work in a COMAL or Forth only environment.

rje
Posts: 1263
Joined: Mon Apr 27, 2020 10:00 pm
Location: Dallas Area

BASIC 2? Why not get BASIC 7?

Post by rje »



On 6/8/2022 at 8:35 AM, Scott Robison said:




And some ML programs will use routines in the BASIC ROM.



For example, the KERNAL doesn't do math.  However, BASIC has 40-bit floating point math routines, including trig and log functions, and a not-terrible (?) random number generator. If you need math, then it's convenient -- but you can always roll your own.

Arguably, maybe half of the BASIC interpreter is the math library (I've heard that Integer BASIC can be jammed into 4K).  

So, BASIC isn't just a barebones scripting system; it's also a utility.

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

BASIC 2? Why not get BASIC 7?

Post by BruceMcF »



On 6/8/2022 at 6:17 AM, Moto Rola said:




Will it be possible to replace that „bank of ROM code that contains a Basic interpreter” with a „bank of ROM code that contains a Forth compiler”? I mean to get rid of that BASIC completely.



It would be possible but putting a ROM Forth in one of the free ROM banks allows one to continue to use distributions of programs that use Basic the way that PC-DOS used BAT to execute batch files.

 

Post Reply