home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_02_(08-1984).d64
/
fifo.c3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
8KB
|
269 lines
1 GOTO910
2 REM ** ML STOP KEY DISABLE **
3 PRINT"x[169]=[141][169][141]X` [234][255][169][255][133][145]L4[234]x[169]1[141][169][234][141]X`
4 [153]"xhhh+hNOThhhhhhhPRINT#HRUNHX`111"
5 [153]"hhhhhhh`1"
6 [143] ** 4 - POP ML SUBROUTINE **
10 [143] **GENERAL INPUT ROUTINE **
15 :
30 :
35 [143] +++ INPUT SECTION +++
40 UR$[178]"":UI$[178]"":[151] UO,0
42 [139]UL[178]0[167]UL[178]80
45 [153]" CMDCMD";:[151]UC,0
50 [161]UI$:[139]UI$[178]""[167]50
55 [139]UI$[178][199](13)[175][195](UR$)[177][178]1[167][151]UC,1:[153]" CMD";:[137]85
60 [139]UI$[178][199](20)[167]105
62 [139] [195](UR$)[178][177]UL[167]50
65 [141]120:[143] CHECK FOR VALID CHARACTER
70 UR$[178]UR$[170]UI$
75 [153]UI$;
80 [137]50
85 [143] +++ CHECK FOR HELP REQUEST +++
90 [139]UR$[178]UX$[167]195:[143] EXIT TO HELP ROUTINE
95 [139]UF[178]1[167][141]240
100 UF[178]0:[153]:[142]
102 [143] ++ CHECK DELETE ++
105 [139][195](UR$)[179]1[167]50
110 UR$[178][200](UR$,[195](UR$)[171]1)
115 [153]"CMD CMDCMD";:[137]50
120 [143] ++ CHECK FOR VALID CHARACTERS ++
125 [139][195](US$)[178]0[167]150
130 [129]US[178]1[164][195](US$)
135 [139]UI$[178][202](US$,US,1)[167][142]
140 [130]
145 UI$[178]"":[142]
150 [143] ** STANDARD INPUT **
152 [139][198](UI$)[178]46[167][142]
155 [139]UI$[178][199](32)[167][142]
160 [139][198](UI$)[179]48[176][198](UI$)[177]57[167]170
165 [142]
170 [139][198](UI$)[179]65[176][198](UI$)[177]90[167]180
175 [142]
180 [139][198](UI$)[179]193[176][198](UI$)[177]218[167]UI$[178]"":[142]
185 [139][194](UT)[178]UU%[167]UI$[178][199]([198](UI$)[171]128):[142]
187 [142]
190 UI$[178]"":[142]
195 UF[178]1:[143] +++ HELP ROUTINE EXIT +++
197 [141]250
200 [141]245
205 [129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]2)
210 UQ%(UQ[171]UB)[178][194](UQ):[130]:[153]"LOAD"
215 UZ[178]1:UV%[178][194](UT)
216 [137]300
217 UZ[178]0:US$[178]UJ$:UG$[178]UK$:UP[178]UJ:UL[178]UK
218 [139][194](50003)[178]0[167][151]53281,1:[153]"LOAD";:[151]53281,6:[151]53280,14:[137]220
219 [153]"LOAD";
220 UT$[178]UL$:[151]UT,UV%:[129]UQ[178]UB[164](U2%[172]256[170]U1%[170]U3%[171]3)
225 [151]UQ,UQ%(UQ[171]UB):[130]
230 [151]U1,U1%
232 [151]U2,U2%
233 [151]U4,U4%
234 [151]U3,U3%[171]1
235 [137]35
240 UD%[178]((U2%[172]256[170]U1%[170]U3%)[171]UB)[173]40:[153][200](UD$,UD%[170]1):[142]
245 [153][200](UD$,24);" HELP COMING WAIT ":[142]
250 U1%[178][194](U1):U2%[178][194](U2):U3%[178][194](U3):U4%[178][194](U4)
251 UJ$[178]US$:UK$[178]UG$:UL$[178]UT$:UJ[178]UP:UK[178]UL
255 [142]
300 [143] ** MENU **
301 :
302 [153]"LOAD":[151]UT,UU%:[139][194](50003)[178]0[167][151]53281,9:[151]53280,8
303 :
305 [153]" MENU"
310 [153]" --------------------------------------"
315 [153]" 1. BEGIN F.I.F.O "
320 [153]" 2. STUDENT INSTRUCTIONS"
325 [153]" 3. TEACHER INSTRUCTIONS"
335 [153]" 4. QUIT"
340 [153]" --------------------------------------"
345 [153]" PRESS A NUMBER KEY (1-4) ";
350 UL[178]1:US$[178]"1234":[141]35:[143] INPUT ROUTINE
352 US$[178]""
355 [145][197](UR$)[141]1000,400,500,396
360 [137]300
395 [143] ** RE-ENABLE STOP KEY AND END **
396 [139][194](50003)[179][177]1[175][194](50003)[179][177]160[175][194](50003)[179][177]0[167]399
397 [158]UU[170]71:[139][194](50003)[178]0[167][151]53281,6:[151]53280,14
398 [153]"CONTLOAD":[128]
399 [141]875:[142]
400 [143] ** STUDENT INSTRUCTIONS **
405 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,0:[151]53280,0
410 UH[178]1:UP[178]0:UG$[178]"(null)TUDENT RIGHT$NST":[141]850
414 [153]" (null)OU WILL START WITH 365 UNITS OF"
416 [153]" CARGO AND THE COMPUTER WILL SHIP"
418 [153]" OUT THE AMOUNT YOU WANT."
420 [153]" VALACH TIME YOU SHIP OUT THE "
422 [153]" CARGO THE NEW INVENTORY WILL BE"
424 [153]" DISPLAYED ON THE SCREEN."
429 [141] 835
430 UH[178]1:[141]850
456 [153]" RIGHT$F AT ANY TIME YOU WISH TO RETURN"
457 [153]" TO THE MENU, ENTER 'END'"
458 [153]" AS YOUR 'QUANTITY REMOVED'."
459 [153]" VALNTERING ANY NUMBER IN EXCESS
460 PRINT" OF YOUR REMAINING INVENTORY"
462 PRINT" WILL END ONE INVENTORY AND GIVE YOU"
464 PRINT" THE CHANCE TO START A NEW ONE."
466 GOSUB 835
470 UH=3:GOSUB 850
483 PRINT" [206]OTE:[212]O ADVANCE FROM ONE QUESTION"
484 PRINT" TO THE NEXT PRESS THE [211][208][193][195][197] BAR"
485 GOSUB835
490 IFUZ=1THENSYSUP%:GOTO217
499 RETURN
500 REM ** TEACHER INSTRUCTIONS **
501 PRINT"[147]":POKEUT,UL%:IFPEEK(50003)=0THENPOKE53281,2:POKE53280,10
502 UH=1:UP=0:UG$="[212]EACHER [201]NST":GOSUB850
503 PRINT" [212]O THE BEST OF OUR KNOWLEDGE,"
504 PRINT" THIS PROGRAM IS IN THE PUBLIC"
505 PRINT" DOMAIN. [201]F THIS IS NOT THE CASE"
506 PRINT" PLEASE CONTACT:"
507 PRINT" [195]OMMODORE [194]USINESS [205]ACHINES"
508 PRINT" 3370 [208]HARMACY [193]VE.
509 [153]" ATNGINCOURT, (null)NTARIO"
510 [153]" LENANADA (null)1(null) 2(null)4"
511 [153]" (416) 499-4292"
512 UH[178]1:[141] 835:[141] 850:
513 [153]" (null)ROGRAM (null)AME: ASC.RIGHT$.ASC.(null).
514 PRINT" [215]RITTEN [194]Y : [193]NDY [199]AMBLE
515 [153]" (null)PGRADED PEEKY :
516 PRINT" [212]HIS PROGRAM WILL RUN ON ANY
519 [153]" (null)VAL(null) 64 LEN(null)(null)(null)(null)(null)VAL(null)
520 PRINT" [195][207][205][205][207][196][207][210][197] 64 [195][207][205][208][213][212][197][210]
521 [141]835
524 UH[178]1:[141] 850
530 [153]" (null)HIS PROGRAM WILL HELP A STUDENT
531 PRINT" WITH ACCOUNTING AND BASIC MATH."
532 PRINT" [212]HE [195]64 GIVES THE STUDENT A QUANTITY"
533 PRINT" OF SUPPLIES, AND HE WILL DISPERSE"
534 PRINT" THEM A CERTAIN AMOUNT AT A TIME"
535 PRINT" UNTIL HE HAS EXHAUSTED THE ENTIRE"
536 PRINT" SUPPLY OF GOODS."
580 GOSUB835
590 IFUZ=1THENSYSUP%:GOTO217
599 RETURN
700 REM ** TO USE 8032 LOAD CBM4032 **
710 PRINT"[147]BEFORE RUNNING THIS PROGRAM ON AN 8032
720 [153]" LOAD THE 'CBM 4032' PROGRAM"
730 [158]UU[170]71
740 [128]
800 [143] ** T I T L E P A G E **
802 [153]"LOAD";:[151]UT,UU%:[139][194](50003)[178]0[167][151]53280,14:[151]53281,6
804 [129]I[178]1[164]38:[153]"SPC(WAIT";:[130]
806 [129]I[178]1[164]22:[153]"CMDSPC(WAIT";:[130]
808 [129]I[178]1[164]37:[153]"CMDCMDSPC(WAIT";:[130]
810 [129]I[178]1[164]22:[153]"ONCMDSPC(WAIT";:[130]
812 [153]"STEP WAIT
814 PRINT" [146] [146][169]
816 [153]" WAIT TAB((null)
818 PRINT"[223] [146]
820 [153]"C O M M O D O R E
822 PRINT"EDUCATIONAL
824 [153]"SOFTWARE
826 REM ** COMMODORE LOGO **
827 PRINTLEFT$(UD$,24);"PRESS SPACE BAR OR WAIT[146]":I=0
828 GETA$:IFA$<>" "THENI=I+1:IFI<250THEN828
830 T1$="":T2$="":T3$="":T4$="":I=0
832 GOTO300
835 REM ** SPACE BAR PRESS **
840 POKE UO,0:PRINTLEFT$(UD$,24);"PRESS SPACE BAR TO CONTINUE[146]"
844 GETUI$:IFUI$<>" "THEN844
846 RETURN
850 REM ** PAGE DESIGN ROUTINE **
852 UP=UP+1
855 PRINT"[147]"LEFT$(UT$+UP$,21);RIGHT$(UP$+UG$+STR$(UP),18)
860 PRINT" --------------------------------------"
864 IFUH<>0THEN870
865 PRINTLEFT$(UD$,24);LEFT$(UP$,7);"HELP - PRESS H <RETURN>"
870 UH=0:PRINT"":RETURN
875 REM ** PLEASE WAIT REMARK **
880 PRINTLEFT$(UD$,24);" ONE MOMENT PLEASE... "
885 RETURN
900 REM ** SET UP VARIABLES **
901 UX$="H":DIMUQ%(1000):UB=32768:U1=196:U2=197:U3=198:U4=216:UC=167:UU=1024
902 UT=59468:UU%=12:UL%=14:UP%=1146:UM=32768:UO=158:POKE 50003,0
903 IFPEEK(50003)=0THENUB=1024:U1=209:U2=210:U3=211:U4=214:UC=204:UU=2048
904 IFPEEK(50003)=0THENUT=53272:UU%=21:UL%=23:UP%=2139:UM=1024:UO=198
905 UD$=""
906 UP$=" "
907 UT$=" [198].[201].[198].[207]. [160][160][160][160][160][160]":REM PLACE PROGRAM TITLE HERE !!!!!!!!!!!!!!!!!***
908 RETURN
910 REM ** SET VARIABLES **
915 GOSUB900
920 REM ** CHECK FOR 8032 **
925 PRINT"[147]":PRINT"[160]":REM SHIFTED SPACE
930 IFPEEK(UB+40)<>96THENGOSUB700
931 REM ** MEMORY CHECK **
932 IF FRE(0)>2000THEN937
933 PRINT"[147]THIS MACHINE DOES NOT HAVE ENOUGH"
934 PRINT"MEMORY TO RUN THIS PROGRAM !"
935 SYSUU+71
936 END
937 PRINT"[147]":IFPEEK(50003)=0THEN962
940 REM ** BASIC 2.0 OR 4.0 OR C-64 SETUP **
941 POKE1075,133:POKE1076,144:POKE1077,234:POKE1079,4:POKE1080,133:POKE1081,145
942 POKE1091,155:POKE1098,133:POKE1099,144:POKE1100,234:POKE1103,133
943 POKE1104,145:POKE1105,234:POKE1082,234
945 IFPEEK(50003)<>160THEN955
950 POKE1093,88:POKE1094,228:POKE1097,85:POKE1102,228:GOTO965
955 IFPEEK(50003)<>1THEN990
960 POKE1093,49:POKE1094,230:POKE1097,46:POKE1102,230:GOTO965
962 POKE2099,141:POKE2100,20:POKE2101,3:POKE2103,8:POKE2104,141:POKE2105,21
963 POKE2106,3:POKE2115,145:POKE2117,52:POKE2118,234:POKE2121,49:POKE2122,141
964 POKE2123,20:POKE2124,3:POKE2126,234:POKE2127,141:POKE2128,21:POKE2129,3
965 SYSUU+48:REM DISABLE STOP KEY
970 GOSUB800:REM TITLE
980 GOTO300:REM MENU
990 PRINT"[147]THE PGM WILL NOT WORK ON THIS MACHINE!":END
1000 IFUZ=1THENSYSUP%:SYSUP%:UZ=0:REM ** PROGRAM STARTS HERE **
1001 PRINT"[147]";:RESTORE:IFPEEK(50003)=0THENPOKE53281,6:POKE53280,14
1005 POKE UT,UL%:UP=0
1010 REM FIFO: HUNTINGTON
1020 REM FIT TO PET BY ANDY GAMBLE FEB80
1030 REM COLUMBIA COLLEGE
1040 REM 1619 W10 AVE VANCOUVER BC
1050 UG$="[201]NVENTORY":UP=UP+1:GOSUB850
1055 PRINT" [198].[201].[198].[207].[195]0":PRINT:PRINT
1060 PRINT" [212]HIS PROGRAM DEMONSTRATES THE [198]IRST-[201]N "
1070 PRINT" [198]IRST-[207]UT ([198][201][198][207]) METHOD OF INVENTORY"
1080 PRINT" EVALUATION THAT IS USED IN MANY "
1090 PRINT" BUSINESSES."
1100 GOSUB835
1120 PRINTCHR$(147);
1130 T1=0:T=0:GOSUB850
1140 FORX=1TO6:READQ(X),P(X):NEXT:S=X-1
1150 RESTORE
1160 GOSUB1245
1165 PRINT" [209]UANTITY [210]EMOVED? ";:US$="0123456789ENDH":UL=3 :GOSUB35:W=VAL(UR$)
1166 IF UR$="END" THEN 300
1167 FOR T=1 TO 100:NEXT T:PRINT"[147]"
1168 GOSUB850:PRINT" [211]HIPPED [207]UT:"
1170 PRINT:PRINT" [206]UMBER","[208]RICE","[212]OTAL"
1180 PRINT
1190 FORX=1TOS:IFQ(X)=0THEN1230
1200 IFQ(X)-W>0THEN1320
1210 PRINT" ";Q(X),P(X),(Q(X)*P(X))
1220 T1=T1+(Q(X)*P(X)):W=W-Q(X):Q(X)=0
1230 NEXT:IFQ(X+1)<=0THEN1350
1245 PRINT:PRINT" [210]EMAINING INVENTORY":T=0
1250 PRINT" [206]UMBER","[208]RICE","[212]OTAL"
1260 PRINT
1270 FORX=1TOS:IFQ(X)<=0THEN1300
1280 PRINT" ";Q(X),P(X),(Q(X)*P(X))
1290 T=T+(Q(X)*P(X))
1300 NEXT
1310 PRINT:PRINT" [212]OTAL [214]ALUE ="T:PRINT:RETURN
1320 PRINT" ";W,P(X),W*P(X):T1=T1+(W*P(X))
1330 PRINT
1340 PRINT" [211]HIPPED [214]ALUE ="T1:T=0:Q(X)=Q(X)-W:GOTO1160
1350 REM
1355 PRINT:PRINT" [207]UT OF INVENTORY":PRINT:PRINT " [211]HIPPED [214]ALUE ="T1
1360 PRINT
1365 PRINT" [193]NOTHER RUN (Y/N)? ";:US$="YN":UL=1:GOSUB35:ZZ$=UR$
1370 IFZZ$="Y"THEN1120
1380 DATA35,11.25,60,12,100,12.5,50,13,80,13.5,40,14.25
1385 GOTO300
1390 END
4586 PRINT" [197]NTER '999999' (SIX NINES) AS"