Page 17 of 18
BASIC 2? Why not get BASIC 7?
Posted: Tue Jun 07, 2022 4:13 pm
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
BASIC 2? Why not get BASIC 7?
Posted: Tue Jun 07, 2022 5:38 pm
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”?
BASIC 2? Why not get BASIC 7?
Posted: Tue Jun 07, 2022 6:09 pm
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.
BASIC 2? Why not get BASIC 7?
Posted: Tue Jun 07, 2022 10:17 pm
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.
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 10:17 am
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.
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 12:53 pm
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.
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 1:26 pm
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?
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 1:35 pm
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.
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 2:12 pm
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.
BASIC 2? Why not get BASIC 7?
Posted: Wed Jun 08, 2022 10:42 pm
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.