BASIC 2? Why not get BASIC 7?
BASIC 2? Why not get BASIC 7?
I also wanted to ask this.
BASIC V2 was one of the weak points of the C64, even compared to contendors of its day. Did not justice to it's capabilities.
The C16 / Plus/4, then the C128, they got pretty good as far as BASIC goes. Not just with audio-visual commands, quality-of-life improvements too.
Suggestion: please, add a RENUMBER feature!
BASIC 2? Why not get BASIC 7?
Out of curiosity: who own the rights to the BASIC interpreters today? Microsoft? The Commodore brand holder? The Dartmouth college? Or someone random?
-
- Posts: 51
- Joined: Sun Jan 03, 2021 8:18 pm
BASIC 2? Why not get BASIC 7?
2 hours ago, Wertzui said:
Suggestion: please, add a RENUMBER feature!
Renumber is useful, but it can get hairy. Do you also have renumber scan the code looking for GOTO and GOSUB and fix those? I've seen some that did, most didn't. It's gets better when the implementation has labeled subroutines.
2 hours ago, Wertzui said:
Out of curiosity: who own the rights to the BASIC interpreters today? Microsoft? The Commodore brand holder? The Dartmouth college? Or someone random?
That would be interesting to unwind. As I understand it, and I'm far from any expert on the matter, Commodore licensed BASIC for the 6502 from Microsoft for the original PET and basically (heh) just kept porting/extending it for new 8-bit C= systems. I imagine that ownership is somehow split between whoever now owns that part of the IP (Cloanto?) and Microsoft.
In any case, no one seems to have taken down the 'cbmbasic' github page, which is the C-64 BASIC ROM dissembled and run through a tool that converted it to C, with some cleanups and patches to make it usable as a scripting language on UNIX/Linux/macOS/Windows. They did the same thing with the original Apple I BASIC.
#!/usr/local/bin/cbmbasic
10 PRINT "HELLO WORLD
BASIC 2? Why not get BASIC 7?
On 2/13/2021 at 1:17 AM, paulscottrobson said:
My 'opinion' is that almost nobody at all will program the system in any other way [than cross-development] [on the emulator].
That's the way we all seem to be naturally doing it, so that sounds right.
Therefore, it seems to me that the best 'extensions' to BASIC 2.0 or the KERNAL will be ones that leverage the X16 in useful ways... but not necessarily for the benefit of programming by hand. Does that make sense?
BASIC 2? Why not get BASIC 7?
Well, for most of us the emulator is the ONLY choice at the moment.
I can see myself, especially with the upgrade keyboard, doing a fair amount of development on the actual hardware. Especially if there's any "pain" to transferring files, which I kind of foresee, until some kind of networking is available. Even a direct serial link would be nice.
BASIC 2? Why not get BASIC 7?
Quote
Do you also have renumber scan the code looking for GOTO and GOSUB and fix those? I've seen some that did, most didn't. It's gets better when the implementation has labeled subroutines.
The BASIC versions on Plus/4 and C128 do fix the jumps, so I'm going by that, yes. And while I got some interesting errors when I first tried it, the mistakes were on my part.
Sure, labels would be massivley superior. Altough it is supposed to be compatible with oldschool CBM BASICs? So fixing the jumps to line numbers would be a must.
BASIC 2? Why not get BASIC 7?
Quote
My 'opinion' is that almost nobody at all will program the system in any other way [than cross-development] [on the emulator].
As we are today in the lockdowns and we have to live our lives on our main PC, it would be a refreshing change to sit in front of something different and type away, no urge to open the Internet, no dayjob stuff, no stupid news and social media in reach.
BASIC 2? Why not get BASIC 7?
On 2/19/2021 at 2:11 PM, paulscottrobson said:
It would take about a week's work to write one. This one for example https://github.com/paulscottrobson/atomic-basic is an extended version of the Atom BASIC ; 32 bit integer only with 'C' style strings, so it's a bit experimental (it was meant to be), but it has a working interpreter with a built in 65C02 assembler, an idea I've always liked. No list or tokeniser yet, but that's straightforward (there's a Python script that tokenises it and then the run time takes over).
Of course you could build a pick and mix easily enough, where different bits could be added or removed as you wanted, so for example have no floats or strings or whatever, different keywords for different systems.
Then you can just add bits as you want ; interface to the X16 Kernel routines for drawing, some SPRITE commands, that sort of thing. You do run out of spaces, though there are paging ways round that it's a bit messy.
Nice job, Mr R ?
I like the way you're thinking ?
And I like it also because if we manage to write our own basic, we won't have any licence troubles. And we will have something well suited for the X16.
Would you mind starting a thread on your BASIC with some examples, docs... and so on.
We may be of assistance ?
Cheers to you, mate !
BASIC 2? Why not get BASIC 7?
On 3/3/2021 at 3:59 AM, Wertzui said:
As we are today in the lockdowns and we have to live our lives on our main PC, it would be a refreshing change to sit in front of something different and type away, no urge to open the Internet, no dayjob stuff, no stupid news and social media in reach.
It really depends on (1) what your expectations are and (2) what your goals are. To program directly on the X16 you'd have to manage both -- and not just because we're used to modern computers.
So, it's not just the BASIC. It's also the environment, which was advanced for 1980, but I am much more productive (guesstimate: 8 times more productive) transpiling from a modern system.
I work with two terminal windows. One is editing the code, and one is used for grepping, building the output BASIC, booting the emulator with said BASIC, etc. As long as I'm in a modern environment, I might as well transpile and reduce my mental load... all without the X16 caring about what I'm doing.
When I have graphics work, I pop up GIMP. I have the tools from the x16 demo project to convert PNG to hexadecimal, and I wrote a Perl script to write that as a X16 loadable binary file.
YES, I welcome value-add to BASIC 2 and the KERNAL -- some of which Michael has already done. But I'm not coding directly on the platform, so my needs are pragmatic.
BASIC 2? Why not get BASIC 7?
On 2/13/2021 at 1:17 AM, paulscottrobson said:
My 'opinion' is that almost nobody at all will program the system in any other way. I'm not actually convinced anyone will program it at all like the old cross dev systems where there was a physical download connection. I think they'll develop it on the emulator, and occasionally run it on the system.
I don't want this to be true, but it sounds right... the emulator's reach will always be (much) greater than that of the hardware. Case in point: my former classmates from grade school can run the little games I've ported, from the browser, without knowing or caring about the underlying target emulation.
Granted, that's not the X16's demographic.