2 Commits

Author SHA1 Message Date
  Jon Foster 280e77e596 READMEFIRST updates from KenUNIX 2 years ago
  Jon Foster 94de20ea7b Version bump and compile improvements 2 years ago
5 changed files with 58 additions and 38 deletions
Split View
  1. +1
    -1
      Makefile
  2. +45
    -23
      READMEFIRST
  3. +4
    -4
      bwbasic.c
  4. +7
    -7
      compile.bat
  5. +1
    -3
      stdcomp.bat

+ 1
- 1
Makefile View File

@@ -29,7 +29,7 @@ all: bwbasic renum
ls -l bwbasic renum

bwbasic: bw*.c bw*.h
$(CC) $(CFLAGS) -o bwbasic bw*.c $(LIB) -DLINUX
$(CC) $(CFLAGS) -o bwbasic bw*.c $(LIB)

renum: renum.c
$(CC) $(CFLAGS) -o renum renum.c $(LIB)


+ 45
- 23
READMEFIRST View File

@@ -1,16 +1,18 @@
4-16-2020 Updated 8-8-2020 3.20d
4-16-2020 Upd 8-8-2020 3.20d Upd 12-21-2021 3.20f Ken

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.
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.20d.tar
tar -xf bwbasic-3.20d.tar <here>

cd <here>

@@ -25,34 +27,40 @@ Tip: Now linking to clear within a bwbasic program you

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
(1) make To make binaries
(2) make runlocal To test build
(3) sudo make install To install programs
(4) sudo make remove To remove compiled programs
(5) make clean To remove binaries from build

That's it.

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

If you want bwbasic to work from a GUI do:

If you want bwbasic to work from a GUI cd GUI
(1) copy bwbasic.sh to a suitable location
and make sure to chmod 755 bwbasic.sh
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.
make addgui

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.
If you want to delete the GUI additions do:

make delgui



If running Windows 7 32bit or later up to Windows 11 64bit
install the following:

https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer
/tdm64-gcc-5.1.0-2.exe/download

OR running under Windows 7 or better 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
If OK then at the command prompt:

cd <here>

@@ -64,11 +72,27 @@ 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.
available information in INFO and DOCS.

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

As a simple example try the guessing game and TicTacToe

bwbasic BAS-EXAMPLES/guess.bas

or

bwbasic BAS-EXAMPLES/tictac.bas

or

bwbasic BAS-EXAMPLES/ohmslaw.bas



Any references below to relays pertain to the BeagleBone Black.

I have included some runtime files and sample input files.
@@ -107,9 +131,7 @@ 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


+ 4
- 4
bwbasic.c View File

@@ -36,7 +36,7 @@
/* */
/* Version 3.20 by Howard Wulf, AF5NE */
/* */
/* Version 3.20d by Ken Martin */
/* Version 3.20f by KenUNIX & Chipmaster */
/* */
/*---------------------------------------------------------------*/

@@ -83,11 +83,11 @@ static char *Banner[] = {
" ## ## ## ## ## ## ## ## ##",
" ######## ## ## ###### #### ###### ",
" ",
"Bywater BASIC Interpreter, version 3.20d ",
"Bywater BASIC Interpreter, version 3.20f ",
"Copyright (c) 1993, Ted A. Campbell ",
"Copyright (c) 1995-1997 , Jon B. Volkoff ",
"Copyright (c) 2014-2017 , Howard Wulf, AF5NE ",
" 2019-2020 , Ken Martin ",
" 2019-2021 , KenUNIX & Chipmaster with fixes ",
" ",
NULL
};
@@ -701,7 +701,7 @@ execute_profile (char *FileName)

My->NextValidLineNumber = MINLIN;

#ifdef LINUX
#ifdef HAVE_UNIX
/* Begin 20200806 ChipMaster@YeOlPiShack.net Patch --
*
* on *nix check the current folder, user's home folder and then /etc for


+ 7
- 7
compile.bat View File

@@ -6,14 +6,14 @@ echo added notes for 32 bit
echo.
echo Source - https://sourceforge.net/projects/tdm-gcc/files/TDM-GCC%20Installer/tdm64-gcc-5.1.0-2.exe/download
echo.
echo Tested under bwbasic-3.20d
echo Tested under bwbasic-3.20f
echo.
echo Wait
echo.

if exist *.o del *.o
if exist bwbasic.exe del bwbasic.exe
if exist renum.exe del renum.exe
if exist renum2.exe del renum2.exe

call stdcomp bwbasic.c
call stdcomp bwb_int.c
@@ -33,17 +33,17 @@ call stdcomp bwd_cmd.c
call stdcomp bwd_fun.c

Rem If compiling under DOS 32 bit (gcc 5.1.0) add -m32 after -s
gcc -s -ansi -DMSDOS -o bwbasic.exe bwb_cmd.o bwb_cnd.o bwb_dio.o bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o bwb_var.o bwbasic.o bwd_cmd.o bwd_fun.o bwx_tty.o
gcc -s -m32 -ansi -DMSDOS -o bwbasic.exe bwb_cmd.o bwb_cnd.o bwb_dio.o bwb_exp.o bwb_fnc.o bwb_inp.o bwb_int.o bwb_prn.o bwb_stc.o bwb_str.o bwb_tbl.o bwb_var.o bwbasic.o bwd_cmd.o bwd_fun.o bwx_tty.o

Rem If compiling under DOS 32 bit (gcc 5.1.0) add -m32 after -s
gcc -s -ansi -DMSDOS -o renum.exe renum.c
gcc -s -m32 -ansi -DMSDOS -o renum2.exe renum2.c

if exist "renum.exe" (
if exist "renum2.exe" (
echo.
echo Compile suceeded for renum.exe.
echo Compile suceeded for renum2.exe.
) else (
echo.
echo Compile FAILED for renum.exe.
echo Compile FAILED for renum2.exe.
)

if exist "bwbasic.exe" (


+ 1
- 3
stdcomp.bat View File

@@ -1,5 +1,3 @@
Rem If compiling under DOS 32 bit (gcc 5.1.0) add -m32 after -w
Rem If compiling under DOS 32 bit (gcc 5.1.0) add -m32 after -w
gcc -w -c -ansi -DMSDOS -I . %1 %2 %3 %4 %5 %6 %7 %8 %9

gcc -w -m32 -c -ansi -DMSDOS -I . %1 %2 %3 %4 %5 %6 %7 %8 %9


Loading…
Cancel
Save