Last edited · 2 revisions   

 


This is a Windows executable of Mike Riley's Basic02 compiler by Gaston Williams

and can be found at 

https://github.com/fourstix/Basic-02/releases

The file is sbc.exe

 

Any file written in Rcbasic can be compiled and then run in Rcbasic. The exceptions are programs containing strings. At the

time of this writing no basic compilers handle strings but Mike continues to add features to Basic02. Files written to

be compiled under Basic02 (sbc.exe) have functionality greater than Rcbasic itself. Basic02 runs under Linux.

 

To use the sbc.exe create a folder somewhere on your computer and put sbc.exe into this folder. Using note pad write a simple

program in basic and save it as sample.txt in the same folder, then save again as sample.bas in the same folder.

At this point one would want to run the program to test it but there is no windows executable for Run02. Any program created

within RCbasic itself would be tested under RCbasic first. Programs written with sbc.exe containing enhanced features cannot

be tested before compiling.

 

This is Gaston's sample program

 

10 let i=1

20 print "i=";i,i*i,i*i*i

30 let i=i+1

40 if i<=10 goto 20

50 print "Good-bye!"

99 end

 

Open a command line 

Hi,

Yes, Press the Windows Key + X , or Run "cmd", or search for "Command" and run the Command Prompt App, or open the start menu got to the Windows System folder and click on "Command Prompt".  

However you get there, you want to type in the sbc compiler command into a command window and run it that way.

Best regards,

Gaston

In most cases, you can also hold down the shift key and right-click in the Explorer window; in the resultant context menu you can choose "Open command window here".  (Somehow, I've modified my system so that the shift key isn't required, but I don't remember how I did it...)

~~Mark Moulding

 

sbc -l -c -fp -b -ram=0000-77FF -rom=8000-FFFF -elfos sample.bas

 

There is a shortcut to that command line.  If you are using a PEV2-compatible Elf, then you can omit the -ram and -rom lines and just add -pev2, so:

sbc -l -c -fp -b -pev2 -elfos sample.bas

If the memory topology of your real elf is different than the PEV2, there are several other switches (in the documentation I posted earlier) that can specify various machines to setup the memory for your target machine.

     Mike

 

 

Note I had to specify the complete path to my folder to get this to work. I just entered chdir \ to the root and typed

C\users\owner\foldername>sbc -l -c -fp -b -ram=0000-77FF -rom=8000-FFFF -elfos sample.bas

 

 

This should create a file named sample.bin that you can run download to your Elf, using xr or xrb as a file named sample.  Then use chmod +x sample to make the file executable in Elf/OS.  Now you can run the sample command and see the output.

 

All errors and omissions copywrite 2021 by Charles Morford