Atari BASIC

BASIC is an anacronym for Beginners All purpose Symbolic Instruction Code. Its aim is to get everyone involved in programming computers and back in the 80s it was pre loaded into most home computers that found their way into bedrooms. It always had the feeling that it was limited in some way and I guess thats true to a point. It can get quite tangled by todays high level languages.

Its not the fastest (on vintage hardware) as its an interpreter so it translates as it goes to something the computer understands and this takes not only time but processor power too, thats why all the cool kids learned to code in assembly (which, weirdly is a much longer process as literally everything has to be done by hand!) but runs so much faster as the computer just runs the program without having to translate BASIC.

Having grown up in the 80s and had Spectrums and later the Atari, BASIC is where I am most comfortable (thats a very shallow scale of comfort) I absolutely suck at maths and logic so I am never going to be a 'real' programmer, so little programs that make the computer interesting is all I can do, and thats fine. Its all books, trial and error and the occasional help from AI as I am to stupid to understand maths and logic.


19 August 2026 Conways Life

I am currently reading 'Hackers' by Steven Levy (excellent book, you should really try it) and was interested in the fascination the MIT hackers had with Conway's 'Life' program so I decided to make my own in Atari BASIC (Full disclosure, I had help from Gemini with the logic and maths, I suck, remember?) and I actually got it to work!

So you use the joystick and fire button to move around and place your patterns, once its done, hit space and it starts to run (slowly! Its in BASIC and my code is NOT very good!) If you hit space again you can add or take away more cells. Its a neat little thing and nice to see it actually working!


Click here to download the .bas file

Here is the code for Atari Basic


10 DIM B(30,18), A(30,18)
20 GRAPHICS 23
30 COLOR 1
31 FOR X = 5 TO 150 STEP 5
33 PLOT X,5:DRAWTO X,90
35 NEXT X
37 FOR Y = 5 TO 90 STEP 5
38 PLOT 5,Y:DRAWTO 150,Y
39 NEXT Y
40 LET X = 5
50 LET Y = 5
60 LET J = STICK(0)
70 LET F = STRIG(0)
80 IF F = 0 THEN LET B(INT(X/5),INT(Y/5)) = 1 - B(INT(X/5),INT(Y/5))
90 IF STRIG(0) = 0 THEN GOTO 90
100 IF B(INT(X/5),INT(Y/5)) = 0 THEN COLOR 0
110 IF B(INT(X/5),INT(Y/5)) = 1 THEN COLOR 2
120 PLOT X+2,Y+2
130 COLOR 1
140 IF J = 7 THEN LET X = X + 5
150 IF J = 11 THEN LET X = X - 5
160 IF J = 13 THEN LET Y = Y + 5
170 IF J = 14 THEN LET Y = Y - 5
180 IF X <= 1 THEN LET X = 5
190 IF X >= 150 THEN LET X = 145
200 IF Y <= 1 THEN LET Y = 5
210 IF Y >= 90 THEN LET Y = 85
220 PLOT X+2,Y+2
225 IF PEEK(764) = 33 THEN POKE 764,255:GOTO 300
230 GOTO 60
300 FOR C = 2 TO 29
310 FOR R = 2 TO 17
320 LET N = B(C-1,R-1) + B(C,R-1) + B(C+1,R-1)
330 LET N = N + B(C-1,R) + B(C+1,R)
340 LET N = N + B(C-1,R+1) + B(C,R+1) + B(C+1,R+1)
350 LET A(C,R) = 0
360 IF N = 3 THEN LET A(C,R) = 1
370 IF B(C,R) = 1 AND N = 2 THEN LET A(C,R) = 1
390 NEXT R
400 NEXT C
410 FOR C = 2 TO 29
420 FOR R = 2 TO 17
430 LET B(C,R) = A(C,R)
440 IF B(C,R) = 0 THEN COLOR 0
450 IF B(C,R) = 1 THEN COLOR 2
460 PLOT (C*5)+2, (R*5)+2
470 NEXT R
480 NEXT C
484 IF PEEK(764) = 33 THEN POKE 764,255:GOTO 40
490 GOTO 300