A fast machine-code circle routine for the TS2068, converted by Steven Gunhouse from a Pascal routine in the May 1990 BYTE. It uses no SIN, COS or SQR, so a circle as large as the screen appears almost at once. The routine sits at 23300; POKE the radius into 23299, PLOT the centre, and call RANDOMIZE USR 23300. It leaves the PLOT position where it was.
The loader reads the code from hex DATA and then races the ROM’s CIRCLE command against the routine, drawing concentric circles with each. The download also has the bouncing-ball demo from the same letter, which replaces lines 10 to 16.
Published in Sinc-Link July-August 1991 (Circle Demo).
Source Code
1 REM Hex Loader for Circle
2 REM with demo
5 CLS : PRINT AT 10,5;"Reading Circle CODE"
6 LET A=10: LET B=11: LET C=12: LET D=13: LET E=14: LET F=15
7 LET x=23300
8 READ a$: IF a$="End" THEN GOTO 10
9 FOR i=1 TO LEN a$ STEP 3: POKE x,16*VAL a$(i)+VAL a$(i+1): LET x=x+1: NEXT i: GOTO 8
10 CLS : PRINT "Demo using CIRCLE Command:"
11 FOR i=3 TO 87 STEP 3: CIRCLE 128,88,i: NEXT i
12 PAUSE 30
15 CLS : PRINT "Now using the Circle ml:"
16 FOR i=3 TO 87 STEP 3: PLOT INVERSE 1;128,88: POKE 23299,i: RANDOMIZE USR 23300: NEXT i
20 STOP
1000 DATA "2A 7D 5C 4D 3A 03 5B 57"
1001 DATA "7D BA 38 60 82 38 5D 7C"
1002 DATA "BA 38 59 82 38 56 FE B0"
1003 DATA "30 52 47 7A 1E 00 CB 22"
1004 DATA "F5 C5 E5 D5 C5 CD 3E 26"
1005 DATA "C1 D1 78 92 B8 28 08 47"
1006 DATA "D5 C5 CD 3E 26 C1 D1 79"
1007 DATA "93 B9 28 13 4F D5 C5 CD"
1008 DATA "3E 26 C1 D1 78 82 B8 28"
1009 DATA "06 47 D5 CD 3E 26 D1 E1"
1010 DATA "C1 F1 1C BB 28 02 30 04"
1011 DATA "05 15 82 15 BB 28 06 38"
1012 DATA "04 0C 93 1C 1C 1D F5 78"
1013 DATA "BC 30 B6 F1 22 7D 5C C9"
1014 DATA "End"Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.


