Now back in the 1970’s and early 1980’s BASIC was quite different then it is in it’s current Microsoft incarnation as Visual Basic .NET. But not all that surprising is that Microsoft was a popular BASIC distributor to the microcomputers of the time, supplying BASIC for Commodore, among others, wikipedia has a great list of all the variants of their 8 bit rommable basic.
Back in college a friend was just a little obsessed with basic (he probably still is) and he was all happy as hell to have found this little interpreter written in C, that we could run on the RS/6000 called Bywater BASIC.
Now while vintage-basic has this basic interpreter written in Haskell to run the programs, I thought I’d see if I could get some to run on Bywater.
First was picking a version, and building it. I found that version of 2.5 was the easiest to build on my NeXT, and with a minor amount of hacking, even windows.. bwbasic needs a BIG stack… so 16bit stuff is out, but I guess it doesn’t matter as they had Quick Basic, and the old MS basic so this would be redundant.
Anyways out of the examples I chose the life program, and with a few changes it’ll run on QuickBASIC as a test, and bwbasic 2.5
2 PRINT TAB(34);"LIFE"
4 PRINT TAB(15);"CREATIVE COMPUTINGÂ MORRISTOWN, NEW JERSEY"
6 PRINT: PRINT: PRINT
8 PRINT "ENTER YOUR PATTERN:"
9 X1=1: Y1=1: X2=24: Y2=70
10 DIM A(24,70),B$(24)
30 INPUT B$(C)
40 IF B$(C)="DONE" THEN B$(C)="": GOTO 80
50 IF LEFT$(B$(C),1)="." THEN
70 GOTO 30
80 C=C-1: L=0
90 FOR X=1 TO C-1
100 IF LEN(B$(X))>L THEN L=LEN(B$(X))
110 NEXT X
140 FOR X=1 TO C
150 FOR Y=1 TO LEN(B$(X))
160 IF MID$(B$(X),Y,1)<>" " THEN A(X1+X,Y1+Y)=1:P=P+1
170 NEXT Y
180 NEXT X
200 PRINT: PRINT: PRINT
210 PRINT "GENERATION:";G,"POPULATION:";P;:
IF I9 THEN
215 X3=24:Y3=70:X4=1: Y4=1: P=0
225 FOR X=1 TO X1-1:
230 FOR X=X1 TO X2
250 FOR Y=Y1 TO Y2
253 IF A(X,Y)=2 THEN A(X,Y)=0:GOTO 270
256 IF A(X,Y)=3 THEN A(X,Y)=1:GOTO 261
260 IF A(X,Y)<>1 THEN 270
261 PRINT TAB(Y);"*";
262 IF X<X3 THEN X3=X
264 IF X>X4 THEN X4=X
266 IF Y<Y3 THEN Y3=Y
268 IF Y>Y4 THEN Y4=Y
270 NEXT Y
290 NEXT X
295 FOR X=X2+1 TO 24:
299 X1=X3: X2=X4: Y1=Y3: Y2=Y4
301 IF X1<3 THEN X1=3:I9=-1
303 IF X2>22 THEN X2=22:I9=-1
305 IF Y1<3 THEN Y1=3:I9=-1
307 IF Y2>68 THEN Y2=68:I9=-1
500 FOR X=X1-1 TO X2+1
510 FOR Y=Y1-1 TO Y2+1
530 FOR I=X-1 TO X+1
540 FOR J=Y-1 TO Y+1
550 IF A(I,J)=1 OR A(I,J)=2 THEN C=C+1
560 NEXT J
570 NEXT I
580 IF A(X,Y)=0 THEN 610
590 IF C<3 OR C>4 THEN A(X,Y)=2: GOTO 600
600 GOTO 620
610 IF C=3 THEN A(X,Y)=3:P=P+1
620 NEXT Y
630 NEXT X
640 GOTO 210
You just type in some stuff as a starting pattern, then type in “DONE” on it’s own on a single line, and it’ll animate the sequence…
I should also add that the history of Bywater basic is kind of interesting it was started by Verda Spell, the grandmother of Ted Campbell who released it into the public domain.
From the original documentation:
Her (Verda’s) programming efforts were cut
tragically short when she was thrown from a Beaumont to Port
Arthur commuter train in the summer of 1986. I found the source
code to bwBASIC on a single-density Osborne diskette in her knitting
bag and eventually managed to have it all copied over to a PC
diskette. I have revised it slightly prior to this release.