BASIC 2? Why not get BASIC 7?

Chat about anything CX16 related that doesn't fit elsewhere
SlithyMatt
Posts: 913
Joined: Tue Apr 28, 2020 2:45 am

BASIC 2? Why not get BASIC 7?

Post 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.

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

BASIC 2? Why not get BASIC 7?

Post 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.

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

BASIC 2? Why not get BASIC 7?

Post 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.

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

BASIC 2? Why not get BASIC 7?

Post 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.

User avatar
Cyber
Posts: 482
Joined: Mon Apr 27, 2020 7:36 am

BASIC 2? Why not get BASIC 7?

Post 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.

paulscottrobson
Posts: 305
Joined: Tue Sep 22, 2020 6:43 pm

BASIC 2? Why not get BASIC 7?

Post 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.

xanthrou
Posts: 165
Joined: Mon Jan 25, 2021 11:57 am

BASIC 2? Why not get BASIC 7?

Post 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. 

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

BASIC 2? Why not get BASIC 7?

Post 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.

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

BASIC 2? Why not get BASIC 7?

Post 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. 

kelli217
Posts: 531
Joined: Sun Jul 05, 2020 11:27 pm

BASIC 2? Why not get BASIC 7?

Post 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.

Post Reply