You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Jon Foster 589a27ceb8 RaspberryPI example code 1 year ago Create 2 years ago
READMEFIRST Add files via upload 2 years ago
alloff.inp Add files via upload 2 years ago
allon.inp Add files via upload 2 years ago
bin-to-dec.bas Add files via upload 2 years ago
bwbasic-3.20b.tar Add files via upload 2 years ago
bwbasic_raspberrypi_gpio.odt RaspberryPI example code 1 year ago
dec-to-bin.bas Add files via upload 2 years ago
loadbwbasic Add files via upload 2 years ago
profile.bas Add files via upload 2 years ago
relays.bas Add files via upload 2 years ago Add files via upload 2 years ago


This program will work under Linux and under DOS.

4-16-2020 Updated 4-30-2020 3.20b

Bwbasic has been around since the early 1990’s in one form or another and actually quite powerfull.

This should work under most any Linux and Linux under WSL (Ubuntu, Debian) for windows at the command prompt.

If running this under Linux you will need ‘gcc’ compiler. To see if it’s installed type in gcc --version if OK then simply do the following:

tar -xf bwbasic-3.20b.tar


To make ‘cls’ work as it does in DOS perform once

sudo ln /usr/bin/clear /usr/bin/cls

Tip: Now linking to clear within a bwbasic program you can clear the screen using command SHELL “cls” This can be embedded in you program. You can also use OPTION TERMINAL ANSI then use command CLS

Now lets build bwbasic and renum

(1) make To test before installing (2) make runlocal Then to install (3) sudo make install To remove installed programs (4) sudo make remove To remove compiled programs and recompile (5) make clean

That’s it.

bwbasic and renum will be in /usr/local/bin

If you want bwbasic to work from a GUI cd GUI (1) copy to a suitable location and make sure to chmod 755 so it’s executable. (2) copy bwbasic.png to a suitable location (3) edit bwbasic.desktop and change references for File Location and png location then cp bwbasic.desktop to ~/Desktop/. and it should work from the desktop.

Doing the above should allow you to click on the icon on your desktop and start bwbasic.

If running under Windows 10 you will need ‘gcc’ compiler. To see if it’s installed type in gcc --version if you think you have gcc installed verify your ‘PATH’ by entering at the command prompt echo %PATH% to see if it’s there. If OK then at the command prompt



Read prompts

That’s it.

Move bwbasic.exe and renum.exe to locations in your PATH.

There are many, many examples in BAS-EXAMPLES and available information in INFO.

All should work fine. But as usual no guarentee is implied.

Any references below to relays pertain to the BeagleBone Black.

I have included some runtime files and sample input files. Place profile.bas in your current working directory and and allon.inp and alloff.inp. The file examples will let you to by example turn off all relays alloff.inp. To do this you would enter at the command line:

bwbasic --profile --tape alloff.inp relays.bas

To turn all relays on:

bwbasic --profile --tape allon.inp relays.bas

To work interactive you would:

bwbasic relays.bas

Once you get a handle on relays.bas commands you can create you own .inp files and reference them by

bwbasic --profile --tape relays.bas

All the above can placed into a simple script file.

The purpose of is to redirect standard and error outputs to files relays-stdout.txt and relays-error.txt and to turn off ANSI so the output is easily readable without escape codes. Using then gives you a quiet display suitable when scripts via .inp is executed.

The purpose of profile.bas which is used by default is to enable ANSI control sequences so the command ‘cls’ works and to set the normal editor to nano which if desired can bet set to vi. The editor comes into play when creating or changing a .bas file. To use while running bwbasic you would issue the command edit.

As a simple example try the guessing game with

bwbasic guess.bas

If you come up with some ideas or enhancements or have a problem drop me a message keeping in mind my main goal is to do maintenance updates where necessary. Bwbasic-3.20b