Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

PLOTTER

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to navigation Jump to search
100 DIM X(100),Y(100)
110 CLS: PRINT@5,"POINT GRAPH PROGRAM"
120 PRINT@32,"INPUT MAXIMUM X VALUE";:INPUT MX
130 IF (MX<0 OR MX>1000000) THEN PRINT@32,"":GOTO 120
140 PRINT@64,"INPUT MAXIMUM Y VALUE";:INPUT MY
150 IF (MY<0 OR MY>1000000) THEN PRINT@64,"":GOTO 140
160 SX=(MX/59): SY=(MY/25)
170 PRINT@96,"COLOR OF POINTS (1-8)";:INPUT C
180 IF (C<1 OR C>8) THEN PRINT@96,"":GOTO 170
190 J=0
200 PRINT@128,"X,Y (END WITH -1,-1";:INPUT X,Y
210 IF (X=-1 AND Y=-1) THEN 290
220 IF (X<0 OR X>MX) THEN 240
230 IF (Y>=0 AND Y<=MY) THEN 280
240 PRINT@480,"INVALID X,Y - TRY AGAIN";
250 FOR I=0 TO 300: NEXT I
260 PRINT@48O,""
270 PRINT@ 128,"": PRINT: PRINT: PRINT: PRINT: GOTO 200
280 X(J)=X: Y(J)=Y: J=J+1: GOTO 270
290 CLS0: A$="":B$=""
300 FOR I=2 TO 30
310 A$=A$+CHR$(128+1)
320 B$=B$+CHR$(128+4)
330 NEXT I
340 FOR I=2 TO 26
350 IF INT(I/2)=I/2 THEN SET(0,I,0):SET(I,I,0):SET(62,I,0):SET(63,I,0)
360 NEXT I
370 PRINT@1,A$;:PRINT@449,B$;
380 PRINT@480,"X:";SX;"Y:";SY;
390 IF J=0 THEN 470
400 FOR I=0 TO J-1
410 X=X(I): Y=Y(I): XD=(59/MX)*X: YD=(25/MY)*Y
420 IF XD-INT(XD)>.5 THEN XD=XD+1
430 IF YD-INT(YD)>.5 THEN YD=YD+1
440 XD=INT(XD)+2:YD=27-INT(YD) :SET(XD,YD,C)
450 SOUND 100,3
460 NEXT I
470 A$=INKEY$:IF A$="" THEN 470
480 IF A$="C" THEN CLS:GOTO 270
490 GOTO 110