Jump to content

BASIC 2? Why not get BASIC 7?


integer_basic
 Share

Recommended Posts

7 hours ago, TomXP411 said:

I basically (no pun intended) gave up on embedded BASICs and decided to start seeing what I can do with Circuit Python and MicroPython on those embedded systems. I'm starting to cotton to the idea of a MicroPython computer, formed around an MCU board like the Teensy or Pi Pico, with some sort of video display on a second chip - probably a second MCU driving a VGA connector. One of my thoughts is a dual Teensy setup: one teensy acting as a terminal, with an SPI interface to the second Teensy, which would be running the actual operating system and deal with the peripheral devices. Not unlike the Commander and VERA, come to think of it, but I'm going to point more solidly at MSX systems or the Commodore 128's 80-column setup. Or even the Apple I (for those of us who have watched David's latest video.)

I think that's a great idea. If I were to work on a BASIC RPi, it wouldn't be BASIC v2. But there is so much in the world I really like the idea of having variety, like the various platforms back in the day.

  • Like 1
Link to comment
Share on other sites

  • Administrators
22 hours ago, TomXP411 said:

I basically (no pun intended) gave up on embedded BASICs and decided to start seeing what I can do with Circuit Python and MicroPython on those embedded systems. I'm starting to cotton to the idea of a MicroPython computer, formed around an MCU board like the Teensy or Pi Pico, with some sort of video display on a second chip - probably a second MCU driving a VGA connector.

I'm happy to hear this! I actually also decided to do a similar thing with two chips, though I wish to stick with BASIC (it gives me pleasant nostalgia). I'm also still deciding what chips to use, but anyway they would be MCUs for the sake of simlicity of developing. But along with outputting to VGA I also want a second chip to drive an 80x4 character LCD to make my thing more like portable PC from 80s. And I think it should be able to run from several AA batteries. When outputting to VGA I intend to emulate graphical terminal, so along with text I would have some slow primitive monochrome graphics for whatever reason.

Link to comment
Share on other sites

  • 3 weeks later...
On 7/29/2021 at 7:44 PM, Scott Robison said:

That's exactly what I want to do with xenon. Alas, my employer(s) don't care about my interesting hobbies. 🙂 But I agree, there is nothing wrong with an enhanced BASIC v2. Do I want to write everything in it? No. But it's fun!

As others have said, some people work on retro cars. Some people practice retro writing (calligraphy). Some people work on finding and restoring antique (retro) furniture. There is nothing wrong with embracing a retro experience in whatever interests you, and I like the X16. I like the MEGA 65. I'd love to find a C64 or C128 or C128D or Apple II or Sinclair or or or or at the local thrift stores.

I was thinking yesterday that as much fun as it is to have my Pi 3B+ setup now as a bare metal CBM machine, the PI really needs a bare metal BASIC-like experience. Something that is just "instant" on and you don't have to think about linux or whatever. Maybe someone has already done it and I just haven't found it because I haven't been looking. Still, I think it would be great to have a native BASIC for PI that allows you to peek and poke and sys and etc. Not as bare as BASIC v2 of course, but ... anyway, yet another project idea to work on and no where near enough hours in the day to accomplish even a fraction of them.

Order up an Allwinner H3 based Orange Pi, visit basicengine dot org, and download the BASIC NG firmware. Write the firmware to a microSD card and BAM!! A bare metal Pi device running a BASIC interpreter 🙂 

  • Like 1
Link to comment
Share on other sites

5 hours ago, painintheworld said:

Order up an Allwinner H3 based Orange Pi, visit basicengine dot org, and download the BASIC NG firmware. Write the firmware to a microSD card and BAM!! A bare metal Pi device running a BASIC interpreter 🙂 

What fun is that? I want to create, not just use someone else's solution! 🙂

But I also don't have enough hours in the day.

  • Like 4
Link to comment
Share on other sites

On 8/26/2021 at 10:03 AM, Scott Robison said:

What fun is that? I want to create, not just use someone else's solution! 🙂

But I also don't have enough hours in the day.

It is an extremely fun little device 🙂 I wish I had the ability to create one from scratch, but I do not 😞 If you can find a dirt cheap H3 device (prices have gone up from $10 to $35 over the last year +) I’d wager you’d have some fun fiddling about with it.

Link to comment
Share on other sites

  • 9 months later...
On 2/8/2021 at 4:09 AM, integer_basic said:

Why use BASIC 2?  It's horrible, without any commands for graphics, sound, or the joystick.  Was BASIC 7 more money to license?

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?

Link to comment
Share on other sites

On 2/7/2021 at 8:09 PM, integer_basic said:

Why use BASIC 2?  It's horrible, without any commands for graphics, sound, or the joystick.  Was BASIC 7 more money to license?

BASIC 2 involves far less bank switching than BASIC 7 would require. Between the screen editor, BASIC 7, and the kernal, 40 KB of ROM is consumed which would mean many context switches from one ROM bank to another. BASIC alone is 28K.

Link to comment
Share on other sites

On 6/6/2022 at 3: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?

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

Link to comment
Share on other sites

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

You know, on that rule I can answer: „those who want Commodore 8 bit computer are of course free to use it”. Plenty of them have been manufactured.

No idea, why repeat Commodore's mistakes.

Because it is what the team creating the X16 wanted. There are many things that could be called "wrong" in any given project, not the least of which is using a 40 year old (give or take) CPU. But the people creating it have a vision for it. When I create a machine I get to make the decisions. When you create a machine you get to make the decisions. In the meantime, we have the ability to use other software that isn't included in the machine if we want.

  • Like 1
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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”?

Link to comment
Share on other sites

Posted (edited)
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.

 

Edited by rje
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

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.

  • Like 1
Link to comment
Share on other sites

Posted (edited)
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.

Edited by rje
  • Like 2
Link to comment
Share on other sites

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.

 

  • Like 3
Link to comment
Share on other sites

  • 1 month later...
On 6/7/2022 at 11:13 AM, 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

Purely for clarification:  COMAL is Public Domain software (at least for PET and C64).

What follows is an early morning rant/lament, and I wouldn't blame anyone at all for simply ignoring it.  But I had to get it out of my head.

As for better-than-BASIC, there are so many reasons beyond even the obvious structured loops and named subroutines.  Code entry is spectacular - as soon as you hit Enter, it does the syntax check and if it finds an error it puts the cursor at the site of the error and gives a USEFUL error message (astounding!).  It also is able to take in (at least in some cases) BASIC code and convert it to its own syntax.  When you list, you get back formatted and semantically indented code.  Pure printing-to-screen speed is about the same as BASIC 2.0.  POKEing around is roughly 3x faster than BASIC 2.0.  Internal processing logic is noticeably faster, but I haven't timed it for specifics.  Any looping construct is faster because the jump destinations are located once in a prepass immediately before running so the interpreter isn't searching through the code to find a jump target every pass through the loop.

This is sort of cross-thread to the "if you were CEO of Commodore", but I really wish that the VIC could have had COMAL instead of BASIC.  The reason for using BASIC 2.0 (as opposed to 4.0 or later) was (to my understanding) because M$ was still young in the 70s and had licensed 2.0 to Commodore for use on any number of products, whereas 4.0 would have required new licensing fees for the new machines.  So Tramiel went the cheap route, which was absolutely a winning strategy as history has shown.  As I am writing this, it's driving me insane because I can't find a release date for the first PET COMAL-80 versions, so I can't be certain that it existed in a 6502+PET Kernal compatible form prior to the VIC's release, or even the 64's release.  So maybe it's a non-starter.  But damn, if it was available, even in the PET style (no graphics, sound, or sprite commands), it would be vastly better than BASIC 2.0...

Overall, this is probably just one of those annoying what-if's for me.  The language was available early enough (1974 or '75 for bigger computers), but I don't know if the 6502+Kernal form was ready in time.  And, of course, it would have had to have been ready early enough to get integrated into the design, so that pushes back at least into '80, making almost a certainty that COMAL-80 couldn't have made it into the VIC.  Just one more year!  But "one more year" is enough to go from the VIC to the 64, or to miss your market entirely if you hold off, so you have to go with what you can use.

I know that.

I just wish that they (the Danish creators of the language) had moved COMAL from the larger computers onto microcomputers as soon as they (microcomputers) appeared, even if it meant just implemented the language as it was in 1978 (instead of defining a new version, which pushed everything back by 2 years -- a lifetime, as mentioned above).  If it could have gotten a foothold on the PET, been "good enough" for the VIC (possibly with later "patch" cartridges (or ROM chips for the brave-hearted)), and then maybe COMAL-80 (without graphics/sound/sprites) built into the C64.  I mean, the C64 0.14 version was available on disk in 1983...  So close...

I hate BASIC 2.0.  Really, I hate pretty much all BASICs that lack structured loops and named subroutines.  But I especially hate BASIC 2.0.  And that comes from it being the only language I knew how to use from '81 until I went to college in '89.  So I used it a lot, not knowing how much it sucked, and not knowing how much it was needlessly destroying my brain and ingraining horrible programming style and habits.  I remember seeing the COMAL ads back then, but then I didn't realize how badly I was being abused and didn't understand how much better life would be with COMAL.  I did get and try to use ProMAL for awhile, but as a compiled language with its own shell on a floppy-based C64, it was just too painful.

So, I guess the point of all that rambling is that if I had played with COMAL early enough and known about the Commander X16 project early enough, I would have pushed for it as the built-in language.  To correct one more flaw of history 😉 and also potentially to avoid having to license any ROMs from anyone.  At least, it would have avoided licensing the BASIC ROMs, and I'm kind of assuming the KERNAL ROMs had to be written more or less from scratch anyway.  But I hadn't, and I didn't, so I couldn't, and thus BASIC survives to ruin even more lives...

  • Like 1
Link to comment
Share on other sites

On 7/27/2022 at 10:39 AM, DigitalMonk said:

I hate BASIC 2.0.  Really, I hate pretty much all BASICs that lack structured loops and named subroutines.  But I especially hate BASIC 2.0.  And that comes from it being the only language I knew how to use from '81 until I went to college in '89.  ...

Yes, this is a key difference. Within a year of getting my C64, I had a C64 port of fig-Forth on disk, so I was in the "the only language I have" situation for months, rather than years. From that point on, I basically used Basic when typing in Basic programs from magazines, and that was about it.

Link to comment
Share on other sites

On 7/27/2022 at 9:39 AM, DigitalMonk said:

I hate BASIC 2.0.  Really, I hate pretty much all BASICs that lack structured loops and named subroutines.  But I especially hate BASIC 2.0.  And that comes from it being the only language I knew how to use from '81 until I went to college in '89. 

Same experience for me, except I started college in '87, but yeah from 81 to 87 BASIC 2 is what I knew.  (Well, BASIC 4 in 1981 but same difference).

I'll never go back, and I think things like COMAL are the bees' knees; however, BASIC 2++ is perfectly fine as a "shell command language" for the purposes of the X16.

Edited by rje
  • Like 1
Link to comment
Share on other sites

The Apple ][, PET, and TRS-80 all inherited the ecosystem of the kit computers and mainframes that predated them.  And even on the mainframes, BASIC was common.  And on the kit computers, maybe you had 2K for your interpreter?  Practically, that meant BASIC.

 

Unlike those, on the other hand, the 8 Bit Guy chose what he wanted the X16 to inherit, and we've talked that topic to death, but we can talk about it again.  Maybe it needs an accessible summary somewhere on this forum; I don't know.

 

Edited by rje
  • Like 1
Link to comment
Share on other sites

  • 1 month later...

I started learning Commodore BASIC in 1980 (on the PET), and got 6502 programming docs the moment I could lay my hands on them. Remembering back to those days, I now have the idea of developing a transpiler (or whatever you want to call it) which:

* Looks and runs like CBASIC, or, should I say, how CBASIC would have run had it originally been made for the X-16;

* Minimizing its inefficiencies (by tokenizing the code for faster execution, better string support, more efficient program flow, supporting integer arithmetic where desired, etc.);

* Maybe have extra commands for the graphics and sound, support for text labels in addition to line numbers, and accessing the X-16's banked memory;

* Generates assembler listings (which can be optimized and assembled).

I'm a bit rusty on 6502 (I last used it to write a C64 word processor back in 1987-88), and I'd have to give up some of my other hobbies...

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

Please review our Terms of Use