User Defined Graphics Generator for the 2068

See all articles from ZX-Appeal Jan 88
Publication: ZX-Appeal
Pub Details: ZX-Appeal Jan 88
Date: January 1988
Pages: 16
  1 REM ..User Defined Graphics generator for the 2068
10 DIM k(8,8)
20 FOR i=8 TO 15
30 PRINT AT i,12;"........"
40 NEXT i
50 LET x=0: LET y=0
55 GO SUB 500
60 INPUT "Pixel value ";v
65 IF v<>0 AND v<>1 THEN GO TO 60
70 LET k(x+1,y+1)=v
80 PRINT AT x+8,y+12; INVERSE v;" "
90 LET y=y+1
100 IF y=8 THEN LET y=0: LET x=x+1
110 IF x=8 THEN LET x=0: LET y=0: GO TO 200
120 GO TO 55
200 INPUT "Is this right?";q$
210 IF q$="" THEN GO TO 200
220 IF q$(1)="y" THEN GO TO 600
230 INPUT "Use arrow keys to move cursor";j$
235 GO SUB 500
240 IF INKEY$<>"" THEN GO TO 240
250 IF INKEY$="" THEN GO TO 250
260 LET i$=INKEY$
270 IF i$="0" OR i$="1" THEN LET k(x+1,y+1)=VAL i$: PRINT AT x+8,y+12; INVERSE VAL i$;" ": GO TO 200
275 PRINT AT x+8,y+12; INVERSE k(x+1,y+1);" "
280 IF i$="5" THEN LET y=y-1+(y=0)
290 IF i$="6" THEN LET x=x+1-(x=7)
300 IF i$="7" THEN LET x=x-1+(x=0)
310 IF i$="8" THEN LET y=y+1-(y=7)
320 GO SUB 500
330 GO TO 240
500 PRINT AT x+8,y+12; FLASH 1; INK 2;"*": RETURN
600 INPUT "Which letter?";f$
610 FOR n=1 TO 8
620 LET t=k(n,1)
630 FOR j=2 TO 8
640 LET t=2*t+k(n,j)
650 NEXT j
660 POKE USR f$+n-1,t
670 NEXT n
700 PRINT "This is what it looks like: ";CHR$ (CODE f$+47)
710 PRINT ,,"Bytes:"
720 FOR n=1 TO 8
730 PRINT PEEK (USR f$+n-1);" ";
740 NEXT n

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