1HOME:VTAB 10:HTAB 10:? "* PAINTER *"
2HTAB 10:? "adapted by"
3HTAB 12:? "G.J.N."
4FOR t=1 TO 5000:NEXT t
5 d$=CHR$(4): c=0
9GOSUB 3000
10GR:DIM p(39, 39), w(39, 39)
20IF PDL(7)=1 THEN GOSUB 270
30IF PDL(9)=1 THEN GOSUB 190
40COLOR =c: x=39*PDL(3)/255: y=39*PDL(1)/255:PLOT x, y
50IF PDL(13)=1 THEN GR
60IF PDL(13)=2 THEN GOSUB 330
70IF PDL(13)=3 THEN GOSUB 220
80 x=39*PDL(3)/255: y=39*PDL(1)/255:PLOT x, y
90IF PDL(13)=4 THEN GOSUB 460
100IF PDL(13)=5 THEN GOSUB 610
110IF PDL(13)=6 THEN GOSUB 750
115 x=39*PDL(3)/255: y=39*PDL(1)/255:PLOT x, y
120IF PDL(13)=7 THEN GOSUB 1190
130IF PDL(13)=8 THEN GOSUB 1300
140IF PDL(13)=9 THEN GOSUB 1240
145 x=39*PDL(3)/255: y=39*PDL(1)/255:PLOT x, y
150IF PDL(13)=0 THEN GOSUB 800
160IF PDL(13)=10 THEN GOSUB 850
170IF PDL(13)=11 THEN GOSUB 980
175 x=39*PDL(3)/255: y=39*PDL(1)/255:PLOT x, y
180GOTO 20
190HOME:INPUT "What color(0-15)?"; c
200IF c<0 OR c>15 THEN 190
210COLOR =c:HOME:RETURN
220HOME:INPUT "What color for screen wash?"; l
230IF l<0 OR l>15 THEN 220
240COLOR =l
250FOR ty=0 TO 39:HLIN 0, 39 AT ty:NEXT ty
260COLOR =c:HOME:RETURN
270HOME:INPUT "Which color to be changed?"; cn
280HOME:INPUT "What color should it be?"; ca
290FOR ty=0 TO 39:FOR tx=0 TO 39
300IF w(tx, ty)=cn THEN  w(tx, ty)=ca
310COLOR =w(tx, ty):PLOT tx, ty
320NEXT tx:NEXT ty:COLOR =c:HOME:? "done!":RETURN
330HOME:? "restore workcpy w/rt. button"
340? "original w/lft. button"
350IF PDL(7)=1 THEN 380
360IF PDL(9)=1 THEN 420
370GOTO 350
380FOR ty=0 TO 39:FOR tx=0 TO 39
390 l=p(tx, ty):COLOR =l:PLOT tx, ty
400NEXT tx:NEXT ty:HOME
410? "Original picture restored."
415COLOR =c:RETURN
420FOR ty=0 TO 39:FOR tx=0 TO 39
430 l=w(tx, ty):COLOR =l:PLOT tx, ty
440NEXT tx:NEXT ty:COLOR =c:HOME
450? "Work copy restored.":RETURN
460HOME:INPUT "Single line or multiple (S/M)?"; ck$
470IF ck$="M" OR ck$="m" THEN 540
480HOME:INPUT "From where?"; fx, fy
490HOME:INPUT "To where?"; tx, ty
500HOME:INPUT "What color(0-15)?"; l
510IF l<0 OR l>15 THEN 500
520COLOR =l:HLIN fx, tx AT fy
530COLOR =c:HOME:? "Done!":RETURN
540HOME:INPUT "Range of 'X' coordinate?"; fx, tx
550HOME:INPUT "Range of 'Y' coordinate?"; fy, ty
560HOME:INPUT "What color(0-15)?"; l
570IF l<0 OR l>15 THEN 560
580COLOR =l:FOR t=fy TO ty
590HLIN fx, tx AT t:NEXT t
600HOME:? "Finished.":COLOR =c:RETURN
610HOME:INPUT "Single or Multiple (S/M)?"; ck$
620IF ck$="M" OR ck$="m" THEN 690
630HOME:INPUT "From where?"; fx, fy
640HOME:INPUT "To where?"; tx, ty
650HOME:INPUT "What color(0-15)?"; l
660IF l<0 OR l>15 THEN 650
670COLOR =l:VLIN fy, ty AT fx:COLOR =c
680HOME:? "Done!":RETURN
690HOME:INPUT "Range of 'X' coordinate?"; fx, tx
700HOME:INPUT "Range of 'Y' coordinate?"; fy, ty
710HOME:INPUT "What color(0-15)?"; l
720IF l<0 OR l>15 THEN 710
725COLOR =l:FOR t=fx TO tx
730VLIN fy, ty AT t:NEXT t:COLOR =c
740HOME:? "Finished!":RETURN
750HOME:? "Rotating screen."
760FOR ty=0 TO 39:FOR tx=0 TO 39
770 l=SCRN(tx, ty): w(tx, (-ty+39))=l
780NEXT tx:NEXT ty:HOME
790? "Rotated!!":GOSUB 420:RETURN
800HOME:? "Making screen workable."
810FOR ty=0 TO 39:FOR tx=0 TO 39
820 l=SCRN(tx, ty): w(tx, ty)=l
830NEXT tx:NEXT ty:HOME
840? "Finished!":RETURN
850HOME:INPUT "Need a listing?"; a$
860IF a$="Y" OR a$="y" OR a$="YES" OR a$="yes" THEN GOSUB 1130
870HOME:INPUT "Which picture?"; n$
875HGR2
880? d$; "open "; n$
890? d$; "read "; n$
900FOR ty=0 TO 39:FOR tx=0 TO 39
910INPUT p(tx, ty):NEXT tx:NEXT ty
920? d$; "close "; n$
930? d$; "close "; n$
940GR:FOR ty=0 TO 39:FOR tx=0 TO 39
950 c=p(tx, ty): w(tx, ty)=c:COLOR =c:PLOT tx, ty
960NEXT tx:NEXT ty:HOME
970? "Retrieved.":RETURN
980HOME:INPUT "Save this picture?"; a$
981IF a$="NO" OR a$="no" OR a$="N" OR a$="n" THEN 1080
985HOME:INPUT "Name for this picture?"; n$
990IF LEN(n$)>10 OR LEN(n$)<1 THEN 980
1000HOME:INPUT "Which drive for storage"; l
1020? d$; "open "; n$; ",d"; l
1030? d$; "write "; n$
1040FOR ty=0 TO 39:FOR tx=0 TO 39
1050? SCRN(tx, ty):NEXT tx:NEXT ty
1060? d$; "close "; n$
1070? d$; "close "; n$
1080HOME:INPUT "A new picture?"; a$
1090IF a$="YES" OR a$="yes" OR a$="Y" OR a$="y" THEN GR:RETURN
1100HOME:INPUT "Continue with this one?"; a$
1110IF a$="NO" OR a$="no" OR a$="N" OR a$="n" THEN END
1120RETURN
1130HOME:INPUT "Which drive#?"; l
1140IF l<>6 AND l<>5 AND l<>1 AND l<>2 THEN 1130
1141TEXT
1150? d$; "catalog,d"; l
1160INPUT "More?"; a$
1170IF a$="Y" OR a$="y" OR a$="YES" OR a$="yes" THEN 1130
1180GR:RETURN
1190HOME:? "Turning screen left."
1200FOR ty=0 TO 39:FOR tx=0 TO 39
1210 l=SCRN(tx, ty): w(ty, (-tx+39))=l
1220NEXT tx:NEXT ty:HOME
1230? "Turned!":GOSUB 420:RETURN
1240HOME:? "Turning screen right."
1250FOR ty=0 TO 39:FOR tx=39 TO 0 STEP -1
1260 l=SCRN(tx, ty): w((-ty+39), tx)=l
1270NEXT tx:NEXT ty:HOME
1280? "Turned!":GOSUB 420:RETURN
1300HOME:? "Making work copy the"
1301? "new original."
1305FOR ty=0 TO 39:FOR tx=0 TO 39
1310 p(tx, ty)=w(tx, ty)
1320NEXT tx:NEXT ty
1330HOME:? "Work copy is now also original"
1340RETURN
3000TEXT
3020VTAB 2:HTAB 1:? "X=Brush"
3030VTAB 3:HTAB 1:? "[=Change color"
3040VTAB 4:HTAB 1:? "in a workable"
3050VTAB 5:HTAB 1:? "screen."
3060VTAB 6:HTAB 1:? "]=Brush Color"; SPC(5); "Controller"
3070VTAB 7:HTAB 1:? "1=clear screen"; SPC(8); "# 1"
3080VTAB 8:HTAB 1:? "2=restore screen"
3090VTAB 9:HTAB 1:? "3=screen wash"; SPC(9); "-----"
3100VTAB 10:HTAB 1:? "4=HLIN"; SPC(16); "| X |"
3110VTAB 11:HTAB 1:? "5=VLIN"; SPC(16); "[   ]"
3120VTAB 12:HTAB 1:? "6=Flip screen"; SPC(9); "|   |"
3130VTAB 13:HTAB 1:? "7=turn left"; SPC(11); "|123|"
3140VTAB 14:HTAB 1:? "8=workcopy new"; SPC(8); "|456|"
3150VTAB 15:HTAB 1:? "Original copy"; SPC(9); "|789|"
3160VTAB 16:HTAB 1:? "9=turn right"; SPC(10); "|*0#|"
3170VTAB 17:HTAB 1:? "*=Read File"; SPC(11); "-----"
3180VTAB 18:HTAB 1:? "0=Make screen"
3190VTAB 19:HTAB 1:? "workable"
3200VTAB 20:HTAB 1:? "#=save &"
3210VTAB 21:HTAB 1:? "end options"
4000FOR t=1 TO 80000:NEXT t
4010RETURN
