Improving Display

Developer(s): Will Hiatt
Date: 1981
Type: Program
Platform(s): ZX80
Tags: Graphics

A screen editor for ZX80 graphics in 1K. RUN fills 14 lines with colons. In direction mode the cursor is an asterisk: R, L, U and D move it, I switches to insert mode, S stops, and NEWLINE repeats the last command. In insert mode the cursor is a question mark and keeps moving in the last direction; type a character, or its character code, to place it, NEWLINE to repeat it, or ND to return to direction mode.

Change the 14 in line 150 for a different background character. A note says the program won’t run with the Syntactic Sum routine loaded. The next month Will Hiatt sent two lines for 16K: a new line 140 and a line 365 that adds an H (hold) command.

Published in Syntax August 1981 (Improving Display).

Image Gallery

Source Code

 100 FOR X=1 TO 448
 110 PRINT ":";
 120 NEXT X
 130 LET N=20
 140 LET Q=17083
 150 LET C1=14
 160 INPUT A$
 170 LET X=CODE(A$)
 180 LET A$=TL$(A$)
 190 LET Y=CODE(A$)
 200 LET Z=CODE(TL$(A$))
 210 LET F=0
 220 IF N=20 THEN LET C=C1
 230 IF X=1 THEN GO TO 330
 240 IF N=20 THEN GO TO 300
 250 IF Y=41 THEN GO TO 420
 260 LET C=X*100+Y*10+Z-3108
 270 IF NOT Y=1 THEN LET F=2
 280 IF Y=1 THEN LET C=X
 290 GO TO 330
 300 IF X=46 THEN GO TO 450
 310 IF X=56 THEN STOP
 320 LET D=X
 330 IF D=55 THEN LET P=Q+1
 340 IF D=49 THEN LET P=Q-1
 350 IF D=58 THEN LET P=Q-33
 360 IF D=41 THEN LET P=Q+33
 370 POKE Q+F,C
 380 LET C1=PEEK(P+F)
 390 POKE P+F,N
 400 LET Q=P
 410 GO TO 160
 420 LET N=20
 430 LET F=1
 440 GO TO 390
 450 LET N=15
 460 GO TO 390

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.