foenixretro / f256-superbasic Goto Github PK
View Code? Open in Web Editor NEWSuperBASIC for the F256 computers
License: MIT License
SuperBASIC for the F256 computers
License: MIT License
While reading through these pages I wonder how the end of the inline assemble is found. By the first regular basic command perhaps? Probably it is a good idea to state this explicitely.
Replace screen editor with multi line version.
image 6 colour $FF,$0 to 0,0
HFlip / VFlip corrupts centre part - 6 only.
100 name$ = "Hello"
110 printme(name$)
120 end
130 proc printme(name$)
135 print "[";name$;"]"
140 endproc
prints [] ; if you change 100/110 to name1$ it works fine.
When an input doesn't have a variable argument it basically functions as a print command. This can lead to confusing behaviour as it might not be immediately clear what is wrong. An explicit error would make it immediately clear something is wrong.
When listing a long procedure (like ml_routines() in Ernesto's sprite editor), it does not seem possible to break the listing with ctrl-c, like you can with 'regular' listing. It would be very handy if this is possible.
Since there is no "Loading..." or "Saving..." text and no READY prompt, it would be handy to simply turn the cursor OFF while loading or saving, then back on when complete.
In fairness, it does say "Complete", but cursor control could take care of the indeterminate time required to load/save.
Thanks
Mike / EMwhite
Reported by Ernesto
the MMU control byte should not be accessed ; compatibility with Jessie's kernel.
Generate syntax errors ; asmtest does not work at present.
Need a general check.
page 29: %
100 print 42 % 5
page 30:
division:
100 print 22//7
110 print 22\7
&:
100 print count & 7
When you edit an existing line of code and insert characters before the end, any character that is pushed off the screen is lost, which can lead to some really weird errors. These characters should be preserved. It would be the best if they would just flow onto the next line.
Consider the following example:
print 3.14592/2
1.57079
This is okay, though the actual value is 1.57296, some precision loss is to be expected.
And if we subtract these two formulas, the result is still as expected:
print 3.14592/2-3.14592/2
0.00000
But the problem arises if we would try to pass in the first number (already rounded) by the formula:
print 1.57079-3.14592/2
-0.00000
Uh oh. Negative zero? I get that it's an approximation of some negative number very close to zero (-0.00217), but this seems to lead to more significant problems that can crash your program.
Watch what happens if we multiply these formulas:
print (1.57079-3.14592/2)*(1.57079-3.14592/2)
0.00000
In a weird way, this makes sense... but it's not actually any better.
I'll cut to the chase and just show you the whole pattern:
print 1.57079-3.14592/2
-0.00000
print (1.57079-3.14592/2)*(1.57079-3.14592/2)
0.00000
print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
-0.00000
print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
1073741824.00000
print (1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)*(1.57079-3.14592/2)
-1073741824.1342177280167721600209715200131072000016384000....... continues
Here's a simple test program to illustrate this in a more consumable format:
10 pi#=3.141592
20 for i=1 to 360
30 rad#=i*pi#/180
40 cosrad#=rad#-pi#/2
50 print "Degree: ";:print i,"Rad: ";:print rad#,"CosRad: ";:print cosrad#;
60 print " >>> ",cosrad#*cosrad#*cosrad#*cosrad#
70 next
It would be very useful to be able to easily turn off and on the blinking cursor with a basic command like: cursor <on/off>.
This way programs can easily hide the cursor when in graphics mode for example and turn it on again when needed.
Could be by design or historical but the first tab stop (control-i) is at position 9 while the remaining are 8 chars apart.
Thanks
(Mike / EMwhite)
e.g. if the parameters are wrong the error is at the target ; but it there could be multiple calls hindering discovery of the error.
CSV Functions ?
- ItemCount(String,Seperator)
- ItemGet(String,Index,Seperator) (starts at 1)
I'm not sure why paragraph 10.6 is called Versions. It doesn't seem to deal with versions, but memory use.
When using the latest released version of superbasic (Beta 1) on my Foenix 256 Jr. I am unable to list the directory of an SD card or save
a basic program to an SD card. Because saving was not possible I also could not try to load
a basic program. When issuing a dir
command no error message is printed and no files are listed. A save
command results in a storage error
. The SD card LED on the board does not light up or blink.
I have tried several cards (16MB SD, 128MB SD, 512MD SD, 2GB SD, 4GB SDHC) which have been formatted on Linux and on Windows using FAT32. When formatting I have tried several different allocation unit sizes (512, 1024, 2048 and 4096 bytes) and I also have repartitioned the cards on Windows. I also had a look at https://github.com/ghackwrench/F256_Jr_Kernel_DOS for additional information but was not able to solve my problem.
Am I just unlucky with my selection of SD cards or is this is a known bug of this version?
As a side note: Listing a directory, save
or load
work for IEC bus devices (I have checked that with a real 1541 floppy drive and an sd2iec
like device.
Try following
n=$3FFFFFFF
print n
n=n+1
print n
The example of the assemble command contains an escape character that shouldn't not be there in the pdf:
100 assemble $6000, ....
Should be just $6000.
While trying to familiarize myself with my F256 Jr. I stumbled over a few things which might be of interest.
I tried to call an assembly routine which had been written to memory through the assemble
statement but was unable to find any info in the documentation about how to achieve this. Through a look into the source code of superbasic
I found the implementation of the call
statement which does exactly that. To me it seems that some information about the call
statement should be added to the documentation.
On the boot screen displayed by my machine (a Revision B board using the latest release of superbasic
and the kernel that comes with it) there are four characters which seem to have a different background colour:
After noticing that these characters had the correct colour in the boot screen of your emulator I ruled out that this was done on purpose. Even though this does not influence the usability of superbasic
in any way I began to wonder whether there is a problem in the initialization of the screen memory.
I also stumbled over a few other minor things (mostly in the documentation). If you are interested in info like that I can open additional issues.
After updating to the 01/03/2023 Beta 1 version of Basic/Kernel, I notice that these two demo games don't work anymore. Both fail in a routine that updates or draws all sprites with an Out of Range error. Perhaps this is caused by the changes in the sprite handling code.
Generate simple tokenisable edit sequences and compare results.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.