home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Educational
/
CONVERSION.2
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
4KB
|
141 lines
50 GOTO1000
90 POKE53281,15
91 PRINT"[147][144] [146]"
92 PRINT"[144] CHOOSE THE CONVERSION CHART [146]"
94 PRINT"[144] YOU WISH TO CREATE... [146]"
96 PRINT"[144] [146]"
110 PRINT""
120 PRINT" 1- CENTIGRADE TO FAHRENHEIT"
122 PRINT" 2- FAHRENHEIT TO CENTIGRADE"
124 PRINT" 3- LITTERS TO GALLONS"
126 PRINT" 4- GALLONS TO LITERS"
128 PRINT" 5- KILOMETERS TO MILES"
130 PRINT" 6- MILES TO KILOMETERS"
132 PRINT" 7- CENTIMETERS TO INCHES"
134 PRINT" 8- INCHES TO CENTIMETERS"
136 PRINT" 9- POUNDS TO KILOGRAMS"
138 PRINT" 10- KILOGRAMS TO POUNDS"
140 PRINT" 11- GRAMS TO OUNCES"
142 PRINT" 12- OUNCES TO GRAMS"
150 INPUT" ENTER NUMBER";X
152 IFX=1THENA$="CENTIGRADE":B$="FAHRENHEIT":GOTO500
154 IFX=2THENA$="FAHRENHEIT":B$="CENTIGRADE":GOTO500
156 IFX=3THENA$="LITERS":B$="GALLONS":GOTO500
158 IFX=4THENA$="GALLONS":B$="LITERS":GOTO500
160 IFX=5THENA$="KILOMETERS":B$="MILES":GOTO500
162 IFX=6THENA$="MILES":B$="KILOMETERS":GOTO500
164 IFX=7THENA$="CENTIMETERS":B$="INCHES":GOTO500
166 IFX=8THENA$="INCHES":B$="CENTIMETERS":GOTO500
168 IFX=9THENA$="POUNDS":B$="KILOGRAMS":GOTO500
170 IFX=10THENA$="KILOGRAMS":B$="POUNDS":GOTO500
172 IFX=11THENA$="GRAMS":B$="OUNCES":GOTO500
174 IFX=12THENA$="OUNCES":B$="GRAMS":GOTO500
500 POKE53281,12
503 PRINT"[147][144] "A$" TO "B$
505 PRINT" CONVERSION TABLE"
510 INPUT"[158]ENTER RANGE FROM";A
511 PRINTTAB(25)"[145]"A$
512 INPUT"[153] TO";T
513 PRINTTAB(25)"[145]"A$
514 INPUT"ENTER INCREMENTS";I
515 GOTO903
516 PRINT"[147]"
518 PRINTTAB(6)""A$;:PRINTTAB(20)"[144]"B$
519 PRINT" [163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][144][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
520 IFX=1THENB=9*A/5+32
522 IFX=2THENB=(A-32)*5/9
524 IFX=3THENB=A/3.7854
526 IFX=4THENB=A*3.7854
528 IFX=5THENB=A*.621
530 IFX=6THENB=A*1.609
532 IFX=7THENB=A*.3937
534 IFX=8THENB=A*2.54
536 IFX=9THENB=A*.4536
538 IFX=10THENB=A*2.2046
540 IFX=11THENB=A*.03527
542 IFX=12THENB=A*28.35
600 PRINTTAB(8)""A;:PRINTTAB(20)"[144]"B
605 A=A+I:IFA<=TTHEN520
610 PRINT"[158] PRESS (R) TO REPEAT * (E) TO END [146]"
620 GETED$:IFED$=""THEN620
623 IFED$="R"THEN90
625 IFED$="E"THEN3500
645 OPEN1,4
650 PRINT#1," CONVERSION TABLE"
655 PRINT#1," "A$" TO "B$
660 PRINT#1,TAB(3)A$;:PRINT#1,TAB(20)B$
662 IFX=1THENB=9*A/5+32
664 IFX=2THENB=(A-32)*5/9
666 IFX=3THENB=A/3.7854
668 IFX=4THENB=A*3.7854
670 IFX=5THENB=A*.621
672 IFX=6THENB=A*1.609
674 IFX=7THENB=A*.3937
676 IFX=8THENB=A*2.54
678 IFX=9THENB=A*.4536
680 IFX=10THENB=A*2.2046
682 IFX=11THENB=A*.03527
684 IFX=12THENB=A*28.35
700 PRINT#1,TAB(8)A;:PRINT#1,TAB(20)B
710 A=A+I:IFA<=TTHEN662
715 CLOSE1,4
720 PRINT"[158] PRESS (R) TO REPEAT * (E) TO END [146]"
725 GETED$:IFED$=""THEN725
730 IFED$="R"THEN90
735 IFED$="E"THEN3500
903 PRINT" [146]"
904 PRINT" PRESS (S) TO DISPLAY THE CONVERSION [146]"
905 PRINT" CHART ON THE SCREEN. [146]"
906 PRINT" [146]"
909 PRINT"[144] [146]"
910 PRINT" PRESS (P) TO MAKE A PRINTOUT OF THE [146]"
911 PRINT" CONVERSION CHART. [146]"
912 PRINT" [146]"
920 GETPP$:IFPP$=""THEN920
930 IFPP$="P"THEN645
940 IFPP$="S"THEN3000
1000 PRINT"[147]":POKE53281,5:POKE53280,0
1010 PRINT"[158]CONVERSION CHART MAKER"
1020 PRINT"[158]WRITTEN BY CARL LOCKMAN"
1030 PRINT"[158] APRIL 1988 ":FORT=1TO2000:NEXT
1040 PRINTTAB(7)" "
1050 PRINTTAB(7)" PRESS 'R' TO RUN "
1055 PRINTTAB(7)" "
1060 FORT=1TO1500:NEXT
1070 PRINTTAB(7)"[145][145] PRESS 'D' FOR DIRECTIONS":FORT=1TO1500:NEXT
1080 GETCH$:IFCH$=""THENPRINT"[145][145][145]":GOTO1040
1090 IFCH$="R"THEN90
1095 IFCH$="D"THEN1100
1100 PRINT"[147]":POKE53281,12:POKE53280,0
1110 PRINT"[144] DIRECTIONS FOR CREATING "
1115 PRINT" A CONVERSION CHART "
1120 PRINT" 1- CHOOSE THE CONVERSION TABLE YOU WANT"
1121 PRINT"[145] ENTER 1 - 12"
1125 PRINT" 2- ENTER THE RANGE OF THE CHART"
1130 PRINT" 3- ENTER THE INCREMENTS OF THE CHART"
1135 PRINT" 4- ENTER 'S' TO DISPLAY THE CHART"
1140 PRINT" ON THE SCREEN. "
1142 PRINT" ENTER 'P' TO PRINT OUT THE CHART "
1145 PRINT" ** IF YOU CHOOSE TO HAVE THE CHART "
1150 PRINT" DISPLAYED ON THE SCREEN, IT MUST "
1155 PRINT" BE 19 LINES OR LESS. "
1165 PRINT" IF YOU WANT A PRINTOUT, THE CHART "
1170 PRINT" CAN BE AS LONG AS YOU WOULD LIKE."
1200 FORT=1TO1500:NEXT
1210 PRINT" [153] PRESS 'R' TO RUN "
1215 FORT=1TO500:NEXT
1220 PRINT" [153] "
1225 FORT=1TO500:NEXT
1230 GETRU$:IFRU$=""THEN1210
1240 IFRU$="R"THEN90
3000 Z=1/I:IF(T-A)*Z>19THEN3049
3010 GOTO516
3049 RR=0
3050 PRINT" CHART TO LARGE *** 19 LINES MAXIMUM "
3051 FORT=1TO750:NEXT
3055 PRINT" "
3056 FORT=1TO500:NEXT
3060 RR=RR+1:IFRR=<3THEN3050
3070 GOTO500
3500 PRINT"[147]":POKE53281,6:POKE53280,14:POKE646,14:NEW:END