Compucolor.org – Virtual Media

Listing of file='METRIC.BAS;01' on disk='vmedia/sampler-sector.ccvf'

100 TM= 256* PEEK (32941)+ PEEK (32940)
110 Z= TM+ 8:AD= 33283:GOSUB 160:TM= TM+ 1
120 X= 0:Y= 26:H= 6:W= 63:C= 1
130 Z= 28672+ 128* Y+ X+ X:AD= TM+ 126:GOSUB 160
140 Z= 128- W- W:AD= TM+ 149:GOSUB 160:POKE TM+ 129,H- 1
150 POKE TM+ 131,W* (C+ 1):POKE TM+ 143,35* (1- C):GOTO 170
160 ZZ= INT (Z/ 256):POKE AD,Z- 256* ZZ:POKE AD+ 1,ZZ:RETURN
170 PLOT 12
180 REM
190 GOTO 230
200 L= L+ 1:IF L= 32THEN ZZ= CALL (1):L= 31
210 GOSUB 220:PRINT SPC( 63)""
220 PLOT 3,0,L:RETURN
230 PLOT 14,6,36,12,6,28,3,9,2
240 PRINT " C O M P U C O L O R   C O R P O R A T I O N "
250 PLOT 15,6,60,3,28,5:PRINT "PRESENTS"
260 PLOT 14,6,7,3,17,12:PRINT " METRIC / ENGLISH CONVERSIONS "
270 PLOT 3,64,0
280 FOR I= 1TO 5000:NEXT
290 PLOT 15
300 REM
310 REM
320 REM
330 REM
340 REM
350 PLOT 12,27,24:L= 25
360 DATA 25.4,.3048,.9144,1.609,6.4516,.0929,.836,.405,16.387
370 DATA .0283,.765,.946,3.784,28.35,.454,4.448,6.895,.746,1.055
380 DIM A$(72),B$(72),C$(72)
390 DATA "INCHES","MILLIMETERS","FEET","METERS","YARDS","METERS"
400 DATA "MILES","KILOMETERS","SQUARE INCHES","SQUARE CENTIMETERS"
410 DATA "SQUARE FEET","SQUARE METERS","SQUARE YARDS","SQUARE METERS"
420 DATA "ACRES","HECTARES","CUBIC INCHES","MILLILITERS","CUBIC FEET"
430 DATA "CUBIC METERS","CUBIC YARDS","CUBIC METERS","QUARTS"
440 DATA "LITERS","GALLONS","LITERS","OUNCES","GRAMS","POUNDS (MASS)"
450 DATA "KILOGRAMS","POUNDS (FORCE)","NEWTONS","P.S.I.","KILOPASCALS"
460 DATA "HORSEPOWER","KILOWATTS","BTU","KILOJOULE"
470 PLOT 3,0,0,6,7:PRINT "TYPE '+' TO CONVERT FROM ENGLISH ----> TO METRIC"
480 PLOT 6,6:PRINT "TYPE '-' TO CONVERT TO ENGLISH   <---- FROM METRIC"
490 PLOT 6,3:PRINT "       (IE+1 OR 1 INCHES TO MILLIMETERS &"
500 PRINT "           -1 FOR  MILLIMETERS TO INCHES)"
510 PRINT
520 RESTORE 390
530 FOR A= 1TO 19
540 READ A$,B$
550 PLOT 6,7:PRINT A,
560 PLOT 6,6:PRINT A$;
570 PLOT 6,5:PRINT TAB( 35);B$
580 NEXT A
590 PRINT " 20",TAB( 35);"END OF PROGRAM"
600 GOSUB 200:PRINT
610 GOTO 930
620 GOSUB 200:PRINT "YOUR CHOICE ";
630 INPUT A
640 IF A= 20OR A= - 20THEN 920
650 IF A= 0OR A> 19OR A< - 19THEN 620
660 RESTORE 360
670 FOR B= 1TO ABS (A)
680 READ C
690 NEXT B
700 RESTORE 390
710 FOR B= 1TO ABS (A)
720 READ A$,B$
730 NEXT B
740 IF A< 0THEN 850
750 IF Q9< > 0THEN GOSUB 200:PRINT "ENTER THE VALUE IN "A$" ?1":GOTO 780
760 GOSUB 200:PRINT "ENTER THE VALUE IN ";A$;" ";
770 INPUT D
780 E= D* C
790 GOSUB 200:PRINT
800 PLOT 6,3
810 GOSUB 200:PRINT D;" ";A$;" = ";E;" ";B$
820 PLOT 6,2
830 IF Q9< > 0THEN PLOT 3,64,0:FOR I= 1TO 2000:NEXT :GOTO 920
840 GOTO 600
850 C$= A$
860 A$= B$
870 B$= C$
880 GOSUB 200:PRINT "ENTER THE VALUE IN ";A$;" ";
890 INPUT D
900 E= D/ C
910 GOTO 790
920 PLOT 27,11,6,2,12:LOAD "MENU;1":RUN 5
930 Q9= PEEK (32936)
940 IF Q9= 0THEN 620
950 GOSUB 200:PRINT "YOUR CHOICE ?4"
960 A= 4
970 D= 1
980 GOTO 660