Bally BASIC

An interpreter written from the article “PIX-ART” by Frank Dietrich and Zsuzsanna Molnar, Computer Graphics and Art, Yearbook volume 5 (1980-1981). It runs the programs of the article: listings as printed, listings with minimal corrections, and reconstructions of programs that are only described in the text. The listings can be edited.

Note: some listings printed in the magazine contain errors (typos, wrong loop direction) and do not produce the pictures described in the article. Only their corrected version is given here, with minimal changes; each correction is explained under the listing.

Language reference
LINE X,Y,Pdraws from the last point to (X,Y)
BOX X,Y,A,B,Psolid box centered on (X,Y), width A, height B
Ppen: 1 foreground, 2 background, 3 reverse (XOR), 0 or 4 move without drawing
PX(X,Y)1 if the pixel is on
RND(N)random integer from 1 to N
RMremainder of the last division
PRINTwrites on the bottom line, scrolls the picture 8 pixels up
screenX from -80 to 79, Y from -44 to 43, origin at the center, integers only
othersFOR TO STEP / NEXT, GOTO, GOSUB / RETURN, IF [THEN], CLEAR, STOP, END, INPUT, REM, @(I)
keysCtrl/Cmd + Enter: run · Esc: stop