Page 2 of 18

BASIC 2? Why not get BASIC 7?

Posted: Wed Feb 10, 2021 7:58 pm
by SlithyMatt


9 minutes ago, BruceMcF said:




What would be the obstacle to booting into Forth?



I don't think there's any plan on including it in ROM or having it be a configurable boot option -- or having configurable boot options at all. Most likely, it will have to be started from the BASIC prompt by loading it off an SD card. So, not a huge process, but not the same as booting to Forth immediately.


BASIC 2? Why not get BASIC 7?

Posted: Wed Feb 10, 2021 9:37 pm
by BruceMcF


1 hour ago, SlithyMatt said:




I don't think there's any plan on including it in ROM or having it be a configurable boot option -- or having configurable boot options at all. Most likely, it will have to be started from the BASIC prompt by loading it off an SD card. So, not a huge process, but not the same as booting to Forth immediately.



I may have missed, but I hadn't heard any change to the plan to have a saved setting in the RTC storage whether you want an autostart program to run. Any autostart capability at all combined with a Forth with a savesys option is a configurable Forth boot up.


BASIC 2? Why not get BASIC 7?

Posted: Wed Feb 10, 2021 9:40 pm
by SlithyMatt


2 minutes ago, BruceMcF said:




a saved setting in the RTC storage whether you want an autostart program to run



I must have missed that. If that is part of the final design, then sure, you can boot to whatever.


BASIC 2? Why not get BASIC 7?

Posted: Wed Feb 10, 2021 9:56 pm
by BruceMcF


12 minutes ago, SlithyMatt said:




I must have missed that. If that is part of the final design, then sure, you can boot to whatever.



I've only seen it described in FB discussions (which of course means it would be SO easy to track down!), but since the RTC has not been nailed down, I've always considered it to be just penciled in until/unless it makes the FAQ and/or emulator.


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 7:14 am
by Cyber


On 2/8/2021 at 5: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?



It was not a question of money. X16 hardware is based on VIC-20, and BASIC V2 is designed to run on this hardware. BASIC 7 was designed to run on different hardware, and to run BASIC 7 on X16 would mean to rewrite a lot of source code of BASIC 7. On the other hand BASIC 2 runs on X16 with minimal source code changes.

So to save time and resources X16 team decided to start with using BASIC 2, planning to add new commands later (which they already partially did). Depending on the user demand, BASIC functionality might grow to the one similar in version 7 or version 10 or whatever.

BASIC V2 allowed X16 to have a fast project start and stable run, allowing team to concentrate on other more important features.


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 8:37 am
by paulscottrobson


15 hours ago, rje said:




Well sure.  I can try.  I'm a high-level programmer that knows C.  I can at least write a big fat binary and then think about how to optimize it.  Please wish me luck, because I'm going to need it.



 



Oh, don't worry about that. I've written a few to varying stages of completion, i.e. running programs. I never really finished most of them off because I didn't see the point, it's just writing tokenisation/detokenisation code.  The last one was designed to be modular so you could add and drop whole chunks of it (no floats ? no strings ? etc.) pretty much at will.

It's probably easier than working with the Microsoft/Commodore code. It's engineered better for a start, well engineered at all, and bits are where they're supposed to be.

The other problem with them is, whilst I don't doubt your ability to do it, you won't make it fast enough and resemble BASIC. I've got two interpreted languages which are about the same speed (about 5x faster than X16/MS Basic) one of which is a sort of FORTH you can edit on the fly like BASIC, and the other one resembles the old HP9xxx calculator language, HPL which sacrifices everything for speed. I have looked into tricks like DAI Basic, semi compiled stuff, storing references in the tokenised code (so if you access a variable you don't have to use lists/hash tables etc, same for procedure calls) and it just can't be speeded up that much. 16/32 bit integer maths, fp maths eats up CPU cycles. I did get a workable 8 bit only language going once but that was for a machine with only 2k RAM :)

There's a very good example in the archive, a chap wrote a very nice BASIC version of a Boulderdash-type game, and he's stretched it about as far as it could go.


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 5:41 pm
by xanthrou

 


On 2/8/2021 at 11:22 PM, integer_basic said:




Aha!  Very nice!  Very nice indeed!



Just to let you know that X16's BASIC V2 is kinda like a hybrid of C64 BASIC V2 and C128 BASIC V7. 


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 6:17 pm
by BruceMcF

Converting variables from two significant to variable width could be tricky, but changing the number of significant characters from two to four would be a substantial increase in ease of use and likely to be less challenging.

But the number one community pull improvement to the current CX16 Basic would to be upgrade the garbage collector from the C64 version to the C128 version, which is much faster when there is an appreciable number of string variables to collect garbage for.


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 8:55 pm
by rje


12 hours ago, paulscottrobson said:




...you won't make it fast enough and resemble BASIC.



Ah, yes, that's right, you have mentioned that more than once.  And, well, it is what it is. 


BASIC 2? Why not get BASIC 7?

Posted: Thu Feb 11, 2021 10:21 pm
by kelli217

I would like to have longer variable names as well. But 26 one-character and 26*36 (minus a few) two-character variable names, one set for floating point numbers, one set for integers, and one set for strings... that's actually a pretty big variable namespace.