10    DIM B(7000)
20    CLEARW 2
30    GOSUB 540
40    HP=1:Z=1
50    VP=1
60    HS=4
70    VS=2
80    INPUT"BACKGROUND COLOR";C0
90    INPUT"COLOR 1";C1
100   INPUT"COLOR 2";C2
110   INPUT"COLOR 3";C3
120   CLEARW 2
130   GOSUB 600
140   HG=HS*HP
150   VG=VS*VP
160   HE=HG+(HS-1)
170   COLOR 1,6,CL,0,0
180   GOSUB 680
190   X=INP(2)
200   IF X=32 THEN CN=CN+1
210   IF CN=4 THEN CN=0
220   IF CN=0 THEN CL=C0
230   IF CN=1 THEN CL=C1
240   IF CN=2 THEN CL=C2
250   IF CN=3 THEN CL=C3
260   IF X <> 83 THEN 290
270   INPUT"FILENAME";F$
280   GOSUB 420:HP=1:VP=1
290   IF X=208 THEN VP=VP+1
300   IF X=200 THEN VP=VP-1
310   IF X=205 THEN HP=HP+1
320   IF X=203 THEN HP=HP-1
330   IF HP=0 THEN HP=75
340   IF HP=76 THEN HP=1
350   IF VP=81 THEN VP=1
360   IF VP=0  THEN VP=80
370   A=(((VP-1)*75)+HP)
380   B(A)=CL
390   REM T A;VP;HP
400   GOTO 140
410   REM *** REDRAW SCREEN ***
420   CLEARW 2
430   FOR VP=1 TO 80
440   FOR HP=1 TO 75
450   HG=HS*HP:VG=VS*VP
460   HE=HG+(HS-1)
470   C=(((VP-1)*75)+HP)
480   MC=B(C)
490   COLOR 1,6,MC,0,0
500   GOSUB 680
510   NEXT HP
520   NEXT VP
530   RETURN
540   REM *** CLEAR SCREEN ***
550   A=0
560   FOR X=1 TO 7000
570   B(X)=A
580   NEXT X
590   RETURN
600   REM *** SET WIDTH ***
610   POKE CONTRL,16
620   POKE CONTRL+2,1
630   POKE CONTRL+6,0
640   POKE PTSIN,2
650   POKE PTSIN+2,0
660   VDISYS(0)
670   RETURN
680   REM *** DRAW LINE ***
690   POKE CONTRL,6
700   POKE CONTRL+2,2
710   POKE CONTRL+6,0
720   POKE PTSIN,HG
730   POKE PTSIN+2,VG+24
740   POKE PTSIN+4,HE
750   POKE PTSIN+6,VG+24
760   VDISYS(0)
770   POKE CONTRL,6
780   POKE CONTRL+2,2
790   POKE CONTRL+6,0
800   POKE PTSIN,HG
810   POKE PTSIN+2,VG+25
820   POKE PTSIN+4,HE
830   POKE PTSIN+6,VG+25
840   VDISYS(0)
850   RETURN
