start tok64 d64-2HtJ2o 10 REM ************************ 20 REM ** ** 30 REM ** graphics package ** 40 REM ** ** 50 REM ** - d e m o - ** 60 REM ** ** 70 REM ************************ 80 REM 90 REM machine language routines 100 in=51200:of=51203 110 gc=51206:sc=51209 120 pc=51212:pl=51215 130 up=51218:sl=51221 140 cl=51224:gl=51227 150 gs=51230:hc=51233 200 REM 210 REM examples: 220 REM ********* 230 REM 300 SYSin :REM graphics on 310 SYSgc :REM clear screen 320 SYSsc,1*16+2:REM set color 330 SYSsc,7*16+2:REM seret plot color 340 REM 350 REM figure 1: 360 REM ********* 370 REM 380 FORx=1TO319STEP4 390 SYSsl,x,50,70,x/1.6:REM lines 400 NEXT 410 REM 420 FORx=1TO5000:NEXT:REM delay loop 430 GOSUB2000:SYSgc:REM clear screen 440 REM 450 REM figure 2: 460 REM ********* 470 REM 480 FORx=1TO319STEP3 490 SYSsl,x,40,50*SIN(x/30)+100,x/1.6 500 NEXT 510 REM 520 FORx=1TO5000:NEXT:REM delay loop 530 GOSUB2000:SYSgc:REM clear screen 540 REM 550 REM figure 3: 560 REM ********* 570 REM 580 FORx=1TO319STEP2 590 SYSsl,x,40*COS(x/20)+100,50*SIN(x/30)+100,x/1.6 600 NEXT 610 REM 620 FORx=1TO5000:NEXT:REM delay loop 630 GOSUB2000:SYSgc:REM clear screen 640 REM 1000 WAIT198,255:REM wait for key 1010 SYSof:POKE198,.:END 2000 SYSof:REM graphics off 2010 PRINT"{clear}{down}{right}select one:{down} 2020 PRINT"{down}{right}(1) - load graphics 2030 PRINT"{down}{right}(2) - save graphics 2040 PRINT"{down}{right}(3) - hardcopy 2050 PRINT"{down}{right}(4) - continue{down} 2060 WAIT198,255:REM wait for key 2070 GETa$ 2080 ONVAL(a$)GOTO2200,2300,2400,2500 2090 GOTO2000 2200 REM 2210 REM load graphics: 2220 REM ************** 2230 REM 2240 INPUT"{right}filname,dev ";fi$,da 2250 SYSgl,fi$,da:REM load 2260 SYSin:REM graphics on 2270 SYSsc,16*3+9 2280 FORx=1TO5000:NEXT:REM wait 2290 GOTO2000 2300 REM 2310 REM save graphics: 2320 REM ************** 2330 REM 2340 INPUT"{right}filname,dev ";fi$,da 2350 SYSgs,fi$,da:REM save 2360 GOTO2000 2400 REM 2410 REM hardcopy: 2420 REM ********* 2430 REM 2440 PRINT"{right}ready printer and press a key 2450 POKE198,0:WAIT198,255:GETa$ 2460 PRINT"{down}{right}please wait ! 2470 OPEN1,4:REM open printer channel 2480 SYShc,1:REM hardcopy 2490 CLOSE1 :REM close channel 2500 REM 2510 REM continue: 2520 REM ********* 2530 REM 2540 SYSin:SYSsc,16*2+7:RETURN stop tok64 (bastext 1.0)