 C                                                                 utput. Similar to IN, this command accepts up to 8 devices with all but PR#1 being the same. The command sets a flag to channel output to an external device (eg \r~05,80\\ 
\P\Q\CPAGE 5.\\ 
\r~05,40\K\Q\A\\ 
The PR command is used to select device output. Similar to IN, this command accepts up to 8 devices with all but PR#1 being the same. The command sets a flag to channel output to an external device (eg the printer).  It is possible to patch in other PR vectors to point to drivers for DOT MATRIX printers but they are only of limited value in BASIC. If you really want one, just ask; it should not be too complicated.\\ 
\\ 
Next time, commands affecting the appearance of the screen.\\ 
\\ 
Guy Cousineau,\\ 
1059 Hindley Street,\\ 
OTTAWA Canada,\\ 
K2B 5L9.\\ 
\\ 
THIS EDITION'S SMARTBASIC PROGRAM LISTING.\\ 
\\ 
The SmartBASIC program listing in this edition is, once again, provided to us in software form by our PD librarian, Michael Lyons. Our thanks to Michael for making this Editor's job that much easier by avoiding the need to transcribe the listing. The program is called "hires draw" and provides a means of making colourful drawings on your hi-res screen, using the game controller.\\ 
\L\\ 
1GOSUB 4000\\ 
5DIM br$(16)\\ 
6FOR q=1 TO 16\\ 
7READ q$\\
8 br$(q)=q$:NEXT\\ 
9REM -- first color and starting position--\\ 
10 c=6: x=0: y=151\\ 
19REM --clear screen and set graphics mode--\\ 
20HOME:HGR\\ 
30VTAB 21\\ 
40GOSUB 3000\\ 
69REM --set drawing color--\\ 
70HCOLOR =c\\ 
80IF c=0 THEN GOSUB 600\\ 
85HPLOT x, y\\ 
90HPLOT x+1, y\\ 
100HPLOT x, y+1\\ 
110HPLOT x+1, y+1\\ 
119REM --if side button pressed start again-- \\ 
120IF PDL(13)=10 OR PDL(13)=11 THEN 10\\ 
123 kp=PEEK(64885)\\ 
125IF kp=27 THEN TEXT:END\\ 
129REM --read controller stick--\\ 
130 d=PDL(5)\\ 
139REM --complete new x,y based on stick value--\\ 
140IF d=4 OR d=12 OR d=6 THEN y=y+1\\ 
150IF d=1 OR d=3 OR d=9 THEN y=y-1\\ 
160IF d=2 OR d=3 OR d=6 THEN x=x+1\\ 
170IF d=8 OR d=9 OR d=12 THEN x=x-1\\ 
179REM --keep x,y on screen--\\ 
\\ 
\r~45,80\\ 
\K\Q\L\\ 
\\ 
\\ 
190IF y>150 THEN y=150:? CHR$(7); \\ 
200IF x<0 THEN x=0:? CHR$(7); \\ 
210IF y<0 THEN y=0:? CHR$(7); \\ 
219REM --if no color change, go back--\\ 
220IF PDL(7)=0 AND PDL(9)=0 THEN 80\\ 
229REM --change color--\\ 
500HOME:? "------------------------------"\\ 
510? "WHICH COLOR WOULD YOU LIKE"\\ 
520? "0-15? "; \\ 
521 r=PDL(13)\\ 
522IF r=10 OR r=11 THEN 10\\ 
523IF r>1 THEN 521\\ 
524? r;\\ 
525FOR q=1 TO 500:NEXT\\ 
526 s=PDL(13)\\ 
528IF s=10 OR s=11 THEN 10\\ 
530IF r=1 AND s>5 THEN 526\\ 
536IF s=15 THEN 526\\ 
538? s;\\ 
540IF r=0 THEN c=s:GOTO 555\\ 
550 c=s+10\\ 
555? " "; br$(c+1)\\ 
560FOR q=1 TO 1500:NEXT:GOSUB 3000\\ 
570GOTO 70\\ 
600HCOLOR =3\\ 
610HPLOT x, y\\ 
620HPLOT x+1, y\\ 
630HPLOT x, y+1\\ 
640HPLOT x+1, y+1\\ 
650HCOLOR =c\\ 
660RETURN\\ 
1000DATA BLACK,GREEN,DARK RED,WHITE,BLACK,MEDIUM RED\\ 
1010DATA MEDIUM BLUE,WHITE,ORANGE,DARK BLUE,GREY\\ 
1020DATA LIGHT RED,DARK GREEN,LIGHT YELLOW,AQUA,PURPLE\\ 
3000HOME:? "-----------------------------"\\ 
3010? " SIDE BUTTON TO CHANGE COLOR"\\ 
3020? " <*> OR <#> TO CLEAR SCREEN"\\ 
3030RETURN\\ 
3040REM -HIRES_DRAW-\\ 
3050REM -A MICHAEL LYONS PROGRAM-\\ 
3060REM -BUILT FROM "MIRROR" NIAD PROGRAM-\\ 
3070REM -VERY LITTLE ORIGINAL LEFT-\\ 
4000TEXT:HOME:INVERSE\\ 
4010VTAB 5:HTAB 7:? " "\\ 
4020VTAB 6:HTAB 7:? " HIGH RESOLUTION "\\ 
4030VTAB 7:HTAB 7:? " "\\ 
4040VTAB 8:HTAB 7:? " DRAWING PAD "\\ 
4050VTAB 9:HTAB 7:? " "\\ 
4060NORMAL\\ 
4070VTAB 12:HTAB 3:? "DO YOU WANT INSTRUCTIONS? "\\ 
4080VTAB 14:HTAB 12:? "(Y/N) "; :GET kp$:?\\ 
4090IF kp$<>"Y" AND kp$<>"y" THEN RETURN\\ 
4095HOME\\ 
4100VTAB 3:? " THIS IS A DRAWING PROGRAM "\\ 
\\ 
UB 3000\\ 
570GOTO 70\\ 
600HCOLOR =3\\ 
610HPLOT x, y\
