2 REM **** BURST **** 3 REM BY WILLIAM NEWTON 4 REM LAST MOD 3-22-89 10 DIM P$(12):P$="↑→→→→→→→→→":DIM Q$(25):Q$="→→→→→→→→→→→→↑→→→→→→→→→→→→" 11 DIM FN$(16):DIM FT$(16) 12 A=2:B=5:C=7:S=3:H=0:V=0 13 CD=250:RC=0.7071:RS=-0.7071 15 CR1=2*16+9:CR2=8*16+12:CR3=0:CR4=0:CR0=12*16+6 20 GRAPHICS 7:GOTO 500 100 GRAPHICS 0:POKE 752,0:SETCOLOR 1,13,12:SETCOLOR 2,0,0:SETCOLOR 4,0,0 102 ? "↓ENTER VARIABLES...↓" 110 ? "FACTOR A ";A:? P$;:INPUT A 120 ? "FACTOR B ";B:? P$;:INPUT B 130 ? "FACTOR C ";C:? P$;:INPUT C 140 ? "SCALE ";S:? P$;:INPUT S 150 ? "HOR CENT ";H:? P$;:INPUT H 160 ? "VER CENT ";V:? P$;:INPUT V 170 X=0:Y=0:IC=0 172 GRAPHICS 7:POKE 752,1:GOSUB 5000 180 ER=0:TRAP 300:POKE 764,255 182 ? "↰↓PRESS 'ESC' TO ABORT":FOR I=1 TO 500:NEXT I 184 GRAPHICS 7+48:GOSUB 5000 185 ZC=IC-INT(IC/CD)*CD:CL=INT(IC/CD):CL=CL-INT(CL/3)*3+1:VS=S*0.7 190 REM MAIN LOOP 200 M=INT((X*RC-Y*RS+H)*S+80):N=INT((Y*RC+X*RS+V)*VS+48) 210 IF M>0 AND M<160 AND N>0 AND N<96 THEN COLOR CL:PLOT M,N 220 IC=IC+1:ZC=ZC+1:IF ZC>=CD THEN ZC=0:CL=CL+1:IF CL>3 THEN CL=1 230 XX=Y-SGN(X)*SQR(ABS(B*X-C)):Y=A-X:X=XX 240 IF PEEK(764)<>28 THEN 200 250 GOTO 500 300 ER=1:GOTO 500 500 TRAP 500:MODE=PEEK(87):GRAPHICS MODE+32:POKE 752,1:GOSUB 5000 501 POKE 764,255:IF ER=0 THEN 510 502 ER=0:? "↰ERROR IN CALCULATIONS!":? "PRESS ANY KEY" 503 IF PEEK(764)=255 THEN 503 504 POKE 764,255 510 ? "↰A=";A:? Q$(13);"B=";B 530 ? Q$;"C=";C:? "S=";S 550 ? Q$(13);"H=";H:? Q$;"V=";V 570 ? "A)LTER COLORS ITER #";IC 580 ? "N)EW C)ONT V)IEW L)OAD S)AVE"; 590 IF PEEK(764)=255 THEN 590 600 KE=PEEK(764):POKE 764,255 605 IF KE=63 THEN 4000:REM ALTER COL 610 IF KE=35 THEN 100:REM NEW 620 IF KE=18 THEN 180:REM CONT 630 IF KE=16 THEN 800:REM VIEW 640 IF KE=62 THEN 1000:REM SAVE 650 IF KE=0 THEN 2000:REM LOAD 660 GOTO 590 800 GRAPHICS MODE+48:GOSUB 5000 810 POKE 764,255 820 IF PEEK(764)=255 THEN 820 830 GOTO 500 1000 GRAPHICS MODE+32:GOSUB 5000 1005 ? "↰*** SAVE PLOT ***" 1035 GOSUB 2500:IF FN$="" THEN 500 1040 TRAP 2800:OPEN #4,8,0,FN$ 1050 ? "SAVING..." 1070 GOSUB 6100 1090 PRINT #4;A:PRINT #4;B 1100 PRINT #4;C:PRINT #4;S 1110 PRINT #4;H:PRINT #4;V 1112 PRINT #4;X:PRINT #4;Y 1114 PRINT #4;IC 1120 CLOSE #4:GOTO 500 2000 GRAPHICS MODE+32:GOSUB 5000 2005 ? "↰*** LOAD PLOT ***" 2035 GOSUB 2500:IF FN$="" THEN 500 2040 TRAP 2800:OPEN #4,4,0,FN$ 2045 ? "LOADING..." 2070 GOSUB 6500:TRAP 2120 2090 INPUT #4;A:INPUT #4;B 2100 INPUT #4;C:INPUT #4;S 2110 INPUT #4;H:INPUT #4;V 2112 INPUT #4;X:INPUT #4;Y 2113 INPUT #4;IC 2120 CLOSE #4:GOTO 500 2500 ? "NAME";:INPUT FN$:IF FN$="" THEN RETURN 2502 IF LEN(FN$)<3 THEN 2510 2505 IF FN$(1,1)="D" AND (FN$(2,2)=":" OR FN$(3,3)=":") THEN 2530 2510 FT$(3)=FN$:FT$(1,2)="D:":FN$=FT$ 2530 FN$(LEN(FN$)+1)=".PIC":RETURN 2800 GRAPHICS MODE+32:GOSUB 5000:? "ERROR !!! NUMBER ";:STATUS #4,I:CLOSE #4:PRINT I 2810 POKE 764,255 2820 IF PEEK(764)=255 THEN 2820 2830 POKE 764,255:GOTO 500 4000 ? "↰*** ALTER COLORS ***" 4010 ? "<0>-<4> CHANGE REGISTER" 4020 ? "RETURN TO EXIT" 4030 KE=PEEK(764):IF KE=255 THEN 4030 4035 POKE 764,255 4040 IF KE=50 THEN CR=0:GOTO 4100 4050 IF KE=31 THEN CR=1:GOTO 4100 4060 IF KE=30 THEN CR=2:GOTO 4100 4070 IF KE=26 THEN CR=3:GOTO 4100 4080 IF KE=24 THEN CR=4:GOTO 4100 4090 IF KE=12 THEN 500 4095 GOTO 4030 4100 ? "↰ REG #";CR:CB=PEEK(708+CR) 4110 HUE=INT(CB/16):SAT=CB-HUE*16 4120 ? " HUE ";HUE:? " SAT ";SAT 4130 TRAP 4200:? "↑↑→→→→→";:INPUT HUE 4140 ? "→→→→→";:INPUT SAT 4150 CB=HUE*16+SAT:POKE 708+CR,CB 4160 CR0=PEEK(708):CR1=PEEK(709):CR2=PEEK(710):CR3=PEEK(711):CR4=PEEK(712) 4200 GOTO 4000 5000 POKE 708,CR0:POKE 709,CR1:POKE 710,CR2:POKE 711,CR3:POKE 712,CR4 5070 RETURN 6098 REM ** SAVE SCREEN ** 6100 POKE 77,0:GOSUB 6800 6210 POKE 898,11:REM 7=READ,11=WRITE 6310 MODE=PEEK(87):PUT #4,MODE 6320 FOR N=708 TO 712:PUT #4,PEEK(N):NEXT N 6330 X=USR(ADR("hhh*LVd"),4*16) 6340 RETURN 6498 REM ** GET SCREEN ** 6500 GET #4,MODE:MODE=MODE-INT(MODE/16)*16:GRAPHICS MODE+16 6550 GET #4,CR0:GET #4,CR1:GET #4,CR2:GET #4,CR3:GET #4,CR4:GOSUB 5000 6610 GOSUB 6800:POKE 898,7 6700 X=USR(ADR("hhh*LVd"),4*16) 6710 RETURN 6798 REM ** PEEKS,POKES 6800 FINISH=PEEK(106)*256 6820 DLIST=PEEK(560)+256*PEEK(561):START=PEEK(DLIST+4)+256*PEEK(DLIST+5) 6830 HIGH=INT(START/256):LOW=START-256*HIGH:POKE 900,LOW:POKE 901,HIGH 6860 SIZE=(FINISH-START)+1:SZHI=INT(SIZE/256):SZLO=SIZE-SZHI*256 6870 POKE 904,SZLO:POKE 905,SZHI 6880 RETURN