home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Educational
/
SIMULATION.C3
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
12KB
|
347 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 [151]UO,0:UR$[178]"":UI$[178]""
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]UB[170]919
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]UB[170]919
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 SIMULATION"
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 UP[178]0:UG$[178]"(null)TUDENT RIGHT$NST":[141]850
456 [153]" (null)EMEMBER TO HIT <RETURN> AFTER"
458 [153]" TYPING YOUR ANSWER. (null)HIS TELLS"
460 [153]" THE COMPUTER TO ACCEPT WHAT YOU"
462 [153]" HAVE TYPED."
485 [141]835
490 [139]UZ[178]1[167][158]UP%:[137]217
499 [142]
500 [143] ** TEACHER INSTRUCTIONS **
501 [153]"LOAD":[151]UT,UL%:[139][194](50003)[178]0[167][151]53281,2:[151]53280,10
502 UP[178]0:UG$[178]"(null)EACHER RIGHT$NST":[141]850
503 [153]" (null)O THE BEST OF OUR KNOWLEDGE,"
504 [153]" THIS PROGRAM IS IN THE PUBLIC"
505 [153]" DOMAIN. RIGHT$F THIS IS NOT THE CASE"
506 [153]" PLEASE CONTACT:"
507 [153]" LENOMMODORE PEEKUSINESS (null)ACHINES"
508 [153]" 3370 (null)HARMACY ATNVE.
509 PRINT" [193]GINCOURT, [207]NTARIO"
510 PRINT" [195]ANADA [205]1[215] 2[203]4"
511 PRINT" (416) 499-4292"
576 GOSUB835:GOSUB850:
578 PRINT" [208]ROGRAM [206]AME: [211]IMULATION
580 [153]" (null)RITTEN PEEKY : (null)NKNOWN
582 PRINT" [213]PGRADED [194]Y :
584 [153]" (null)HIS PROGRAM WILL RUN ON ANY
590 PRINT" [208][197][212] 64 [195][207][205][208][213][212][197][210]
592 [153]" LEN(null)(null)(null)(null)STR$(null)(null)VAL 64 LEN(null)(null)(null)(null)(null)VAL(null)
594 GOSUB835
596 IFUZ=1THENSYSUP%:GOTO217
598 RETURN
600 REM ** PROGRAM MODIFICATION INST **
601 PRINT"[147]":POKEUT,UL%
605 UP=0:UG$="[208]ROGRAM [205]OD":GOSUB850
660 GOSUB835
690 IFUZ=1THENSYSUP%:GOTO217
699 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 POKEUO,0:PRINTLEFT$(UD$,24);"PRESS SPACE BAR TO CONTINUE[146]"
844 GETUI$:IFUI$<>" "THEN844
845 PRINTLEFT$(UD$,24);UP$"":RETURN
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$=" [211][201][205][213][204][193][212][201][207][206]"
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
1020 PRINT"[147]":PRINTTAB(13)"[169] "
1022 PRINTTAB(13)" [146] IMULATION"
1024 PRINTTAB(13)"[223] [223]"
1030 PRINTTAB(13)" ":PRINTTAB(13)" [146][169]"
1032 PRINT" HOW THE COMPUTER FOLLOWS
1040 [153]" A SIMPLE PROGRAM.":[153]" THE PROGRAM THAT YOU WILL
1050 PRINT" SEE WILL ADD TWO NUMBERS":PRINT" AND PRINT THE RESULT.
1060 [141] 835
1070 [153]"LOAD":D$[178]"":E$[178]" USRUSRUSRUSRUSRUSRWAIT>"
1080 F$[178]" ":[153]" (null)TANTANTANTANTANRIGHT$":[153]" (null)START(null)"
1090 [153]" MID$TANTAN=TANTAN(null)":[153]" TANTANTANTAN>TANTANTANTANTANTAN
1100 PRINT" [206] ENTER TWO[206]":PRINT" [206] NUMBERS [206]"
1110 PRINT" [192][192][192][192][192][192][178][192][192][192][192]"
1120 PRINT" [176][192][192][192][192][192][177][192][192][192][192][192][174]":PRINT" [221] ADD AND [221]"
1130 PRINT" [221] STORE THE [221]":PRINT" [221] RESULT [221]"
1140 PRINT" [173][192][192][192][192][192][178][192][192][192][192][192][189]"
1150 PRINT" [192][192][192][192][192][177][192][192][192][192][192]":PRINT" [206] DISPLAY [206]"
1160 PRINT" [206] ANSWER [206]":PRINT" [192][192][192][192][192][192][192][178][192][192][192]"
1170 PRINT" [213][192][192][177][192][192][201]"
1175 PRINT" [221] STOP[221]":PRINT" [202][192][192][192][192][192][203]"
1190 GOSUB835
1200 PRINTLEFT$(D$,4)+E$
1210 GOSUB835
1220 PRINTLEFT$(D$,4)+F$
1222 PRINTLEFT$(D$,7)+E$;TAB(25)"10 INPUT A":PRINTTAB(25)"20 INPUT B"
1230 GOSUB835
1240 PRINTLEFT$(D$,7)+F$:PRINTLEFT$(D$,12)+E$;TAB(25)"30 LET C=A+B"
1250 GOSUB835
1260 PRINTLEFT$(D$,12)+F$:PRINTLEFT$(D$,16)+E$;TAB(25)"40 PRINT C"
1270 GOSUB835
1280 PRINTLEFT$(D$,16)+F$:PRINTLEFT$(D$,20)+E$;TAB(25)"50 END"
1290 GOSUB 835
1295 IFPEEK(50003)=0THENPOKE53281,1:PRINT"[147]":POKE53281,6:POKE53280,6:GOTO1300
1296 PRINT"[147]"
1300 FORI=1TO4:READMC(I),P1(I):MC(I)=MC(I)-32768+UB:NEXT
1310 DATA32983,114,33023,93,33063,93,33103,113:FORI=1TO6:IC(I)=365+UB+I
1320 CO(I)=378+UB+I:READP2(I):P3(I)=P2(I):NEXT:DATA107,64,64,64,64,115
1330 FORI=1TO5:CA(I)=412+UB+I*40:CP(I)=CA(I)+6:READP4(I),P5(I):NEXT
1340 IFPEEK(50003)=0THENPOKE53281,1:PRINT"[147]":POKE53281,6:POKE53280,14:GOTO1347
1342 PRINT"[147]"
1347 DATA114,114,93,93,93,93,93,93,113,113:PRINT" A B C"
1350 PRINT" [176][192][192][192][178][192][192][192][178][192][192][192][174]":PRINT" [221] [221] [221] [221] MAIN"
1360 PRINT" [221] [221] [221] [221] MEMORY":PRINT" [173][192][192][192][177][192][192][192][177][192][192][192][189]":PRINT:PRINT
1370 PRINT"[176][192][192][192][192][192][174] [176][192][192][192][192][192][192][192][174] [176][192][192][192][192][192][192][174]":PRINT"[221] [221] [221]CONTROL[221] [221] [221]"
1380 PRINT"[221] [221] [221] [221] [221] [221]":PRINT"[173][192][192][192][192][192][189] [173][192][192][192][192][192][192][192][189] [173][192][192][192][192][192][192][189]"
1390 PRINT" INPUT OUTPUT":PRINT:PRINT
1400 PRINT" [176][192][192][192][192][192][192][192][174] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1410 PRINT" [221] [221] [221] [221]"
1420 PRINT" [221] [221] [221] [221]"
1430 PRINT" [173][192][192][192][192][192][192][192][189] [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
1440 PRINT" ACCUMULATOR PROGRAM MEMORY"
1470 GOSUB835
1480 GOSUB1850:FORI=1TO4:READP$(I):NEXT
1490 DATA"10 INPUT A","20 INPUT B","30 LET C=A+B","40 PRINT C"
1500 GOSUB835
1510 I=1:GOSUB1810:FORI=5TO1STEP-1:POKECP(I),P5(I)+128:NEXT:FORI=1TO1000:NEXT
1515 PRINTLEFT$(UD$,24);TAB(9)"PLEASE ENTER A NUMBER."
1520 FORI=6TO1STEP-1:POKEIC(I),P2(I)+128:NEXT:PRINT"? ";
1530 US$="H0123456789":UL=1:GOSUB35:A=VAL(UR$):GOSUB845
1540 PRINT"";A:GOSUB1850:FORI=1TO1000:NEXT:FORI=1TO6:POKEIC(I),P2(I)+128:NEXT
1550 FORI=1TO2000:NEXT:FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT:PRINT"";A
1560 FORI=1TO1000:NEXT:GOSUB1850
1570 GOSUB 835
1580 PRINT" ":GOSUB1850:I=2:GOSUB1810:FORI=5TO1STEP-1:POKECP(I),P5(I)+128
1590 NEXT:FORI=1TO1000:NEXT:FORI=6TO1STEP-1:POKEIC(I),P2(I)+128:NEXT
1595 PRINTLEFT$(UD$,24);TAB(9)"PLEASE ENTER A NUMBER."
1600 PRINT"? ";
1610 GOSUB35:B=VAL(UR$):GOSUB845
1620 GOSUB1850:FORI=1TO1000:NEXT:FORI=1TO6:POKEIC(I),P2(I)+128:NEXT
1630 FORI=1TO2000:NEXT:FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT:PRINT"";B
1640 FORI=1TO1000:NEXT:GOSUB1850
1650 GOSUB 835
1660 PRINT" ":GOSUB1850:I=3:GOSUB1810:FORI=1TO5:POKECP(I),P5(I)+128:NEXT
1670 FORI=1TO1000:NEXT:GOSUB1850:FORI=1TO4:POKEMC(I),P1(I)+128:NEXT:FORI=1TO1000:NEXT
1680 FORI=1TO5:POKECA(I),P4(I)+128:NEXT:FORI=1TO500:NEXT:PRINT"";A
1690 FORI=1TO2000:NEXT:GOSUB1850:FORI=1TO1000:NEXT:FORI=1TO4:POKEMC(I),P1(I)+128:NEXT
1700 FORI=1TO1000:NEXT:FORI=1TO5:POKECA(I),P4(I)+128:NEXT:FORI=1TO500:NEXT
1710 PRINT"";A+B:FORI=1TO500:NEXT:FORI=1TO2000:NEXT:GOSUB1850
1720 FORI=5TO1STEP-1:POKECA(I),P4(I)+128:NEXT:FORI=1TO1000:NEXT
1730 FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT:FORI=1TO500:NEXT
1740 PRINT"";A+B:GOSUB1850
1750 GOSUB 835
1760 I=4:GOSUB1810:FORI=1TO5:POKECP(I),P5(I)+128:NEXT:FORI=1TO1000:NEXT:GOSUB1850
1770 FORI=1TO4:POKEMC(I),P1(I)+128:NEXT:FORI=1TO1000:NEXT:FORI=1TO6:POKECO(I),P3(I)+128:NEXT
1780 FORI=1TO500:NEXT:PRINT"";A+B:GOSUB1850
1790 PRINT"";A+B:GOSUB 835
1800 GOTO1870
1810 PRINT""+" "
1820 PRINT""+P$(I)
1830 GOSUB 835
1840 RETURN
1850 FORI=1TO4:POKEMC(I),P1(I):NEXT:FORI=1TO6:POKEIC(I),P2(I):POKECO(I),P3(I):NEXT
1860 FORI=1TO5:POKECA(I),P4(I):POKECP(I),P5(I):NEXT:RETURN
1870 IFPEEK(50003)=0THENPOKE53281,1:PRINT"[147]":POKE53281,6:POKE53280,14:GOTO1877
1872 PRINT"[147]"
1877 FORI=1TO4:READMC(I),P1(I):MC(I)=MC(I)-32768+UB:NEXT
1880 DATA32983,114,33023,93,33063,93,33103,113:FORI=1TO6:IC(I)=33133-32768+UB+I
1890 CO(I)=33146-32768+UB+I:READP2(I):P3(I)=P2(I):NEXT:DATA107,64,64,64,64,115
1900 FORI=1TO5:CA(I)=33180-32768+UB+I*40:CP(I)=CA(I)+6:READP4(I),P5(I):NEXT
1910 IFPEEK(50003)=0THENPOKE53281,1:PRINT"[147]":POKE53281,6:POKE53280,14:GOTO1917
1912 PRINT"[147]"
1917 DATA114,114,93,93,93,93,93,93,113,113:PRINT" A B C"
1920 PRINT" [176][192][192][192][178][192][192][192][178][192][192][192][174]":PRINT" [221] [221] [221] [221] MAIN"
1930 PRINT" [221] [221] [221] [221] MEMORY":PRINT" [173][192][192][192][177][192][192][192][177][192][192][192][189]":PRINT:PRINT
1940 PRINT"[176][192][192][192][192][192][174] [176][192][192][192][192][192][192][192][174] [176][192][192][192][192][192][192][174]":PRINT"[221] [221] [221]CONTROL[221] [221] [221]"
1950 PRINT"[221] [221] [221] [221] [221] [221]":PRINT"[173][192][192][192][192][192][189] [173][192][192][192][192][192][192][192][189] [173][192][192][192][192][192][192][189]"
1960 PRINT" INPUT OUTPUT":PRINT:PRINT
1970 PRINT" [176][192][192][192][192][192][192][192][174] [176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
1980 PRINT" [221] [221] [221] [221]"
1990 PRINT" [221] [221] [221] [221]"
2000 PRINT" [173][192][192][192][192][192][192][192][189] [173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
2010 PRINT" ACCUMULATOR PROGRAM MEMORY":GOSUB2290
2020 GOSUB 835
2030 FORI=1TO4:READP$(I):NEXT
2040 DATA"10 INPUT A","20 INPUT B","30 LET C=A+B","40 PRINT C":I=1:GOSUB2270
2050 FORI=5TO1STEP-1:POKECP(I),P5(I)+128:NEXT:FORI=6TO1STEP-1:POKEIC(I),P2(I)+128
2055 PRINTLEFT$(UD$,24);TAB(9)"PLEASE ENTER A NUMBER."
2060 NEXT:PRINT"? ";
2070 GOSUB35:A=VAL(UR$):GOSUB845
2080 GOSUB2290:FORI=1TO6:POKEIC(I),P2(I)+128:NEXT
2090 FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT:PRINT"";A:PRINT" "
2100 GOSUB2290:I=2:GOSUB2270:FORI=5TO1STEP-1:POKECP(I),P5(I)+128:NEXT:FORI=6TO1STEP-1
2105 PRINTLEFT$(UD$,24);TAB(9)"PLEASE ENTER A NUMBER."
2110 POKEIC(I),P2(I)+128:NEXT:PRINT"? ";
2120 GOSUB35:B=VAL(UR$):GOSUB845
2130 GOSUB2290:FORI=1TO6:POKEIC(I),P2(I)+128:NEXT
2140 FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT:PRINT"";B
2150 PRINT" ":GOSUB2290:I=3:GOSUB2270:FORI=1TO5:POKECP(I),P5(I)+128:NEXT:GOSUB2290
2160 FORI=1TO4:POKEMC(I),P1(I)+128:NEXT:FORI=1TO5:POKECA(I),P4(I)+128:NEXT
2170 PRINT"";A:GOSUB2290:FORI=1TO4:POKEMC(I),P1(I)+128:NEXT
2180 FORI=1TO5:POKECA(I),P4(I)+128:NEXT:PRINT"";A+B:GOSUB2290
2190 FORI=5TO1STEP-1:POKECA(I),P4(I)+128:NEXT:FORI=4TO1STEP-1:POKEMC(I),P1(I)+128:NEXT
2200 PRINT"";A+B:GOSUB2290:I=4:GOSUB2270
2210 FORI=1TO5:POKECP(I),P5(I)+128:NEXT:GOSUB2290:FORI=1TO4:POKEMC(I),P1(I)+128:NEXT
2220 FORI=1TO6:POKECO(I),P3(I)+128:NEXT
2230 PRINT"";A+B:GOSUB2290
2240 PRINT"";A+B:FORI=1TO500:NEXT
2250 GOSUB 835
2260 PRINT"[147]END OF SIMULATION":GOTO 300
2270 PRINT""+" "
2280 PRINT""+P$(I):RETURN
2290 FORI=1TO4:POKEMC(I),P1(I):NEXT:FORI=1TO6:POKEIC(I),P2(I):POKECO(I),P3(I):NEXT
2300 FORI=1TO5:POKECA(I),P4(I):POKECP(I),P5(I):NEXT:RETURN