Tuesday, May 31, 2022

More BASIC

Version for all Color Computers:
0 POKE65495,0:PCLEAR4:PMODE 4,1:PCLS1:SCREEN 1,0
1 B=0:A=0:I=0:PI=3.141592
10 FOR I=0 TO 2*PI STEP PI/180
20 FOR A=0 TO 7:FOR B=0 TO 7
30 PRESET(44+21*A+10*SIN((A+1)*I),175-(14+21*B-10*COS((B+1)*I)))
40 NEXT B:NEXT A:NEXT I
50 GOTO 50


CoCo 3 version with math patch and a few optimizations:

0 POKE65497,0:PCLEAR4:PMODE 4,1:PCLS1:SCREEN 1,0
1 AD=VAL("&HFA0C")
2 FORI=0 TO 64:READ B$:A=VAL("&H"+B$)
3 POKE AD+I,A:NEXT
REM $BB00 JMP $FA0C
4 POKE VAL("&HBB02"),VAL("&H7E"):POKE VAL("&HBB03"),VAL("&HFA"):POKE VAL("&HBB04"),VAL("&H0C")
5 B=0:A=0:I=0:PI=3.141592
10 FOR I=0 TO 2*PI STEP PI/180
20 FOR A=0 TO 7:FOR B=0 TO 7
30 PRESET(44+21*A+10*SIN((A+1)*I),175-(14+21*B-10*COS((B+1)*I)))
40 NEXT B:NEXT A:NEXT I
50 GOTO 50
1000 DATA 32,79,E7,60,96,60,3D,ED,63,E6,60,96,5E,3D,ED,61,E6,60,96,5D
1001 DATA 3D,ED,65,E6,60,96,5F,3D,E3,62,ED,62,EC,65,E9,61,89,00,ED,60
1002 DATA EC,63,D3,15,97,16,D7,63,EC,61,D9,14,99,13,DD,14,A6,60,89,00
1003 DATA 97,13,32,67,39


No comments:

Post a Comment