Classic Computer Magazine Archive PROGRAM LISTING: 83-10/LOCO.PLT


10 R:LOCOMOTIVE
20 R:ANTIC OCTOBER, 1983
30 R:
40 J:*MAINLINE
100 *TRAIN
110 C(#M=25)+(#M=4):#R=#R+1
120 C(#M=25)+(#M=4):#D=#D*-1
130 C:#M=#M+#D
140 C(#R=20):#R=0
150 C:@B82=#M
160 C:@B84=#R
170 J(#D<0):*TRAINRIGHT
180 T:        [8 BLANKS
190 T:  ````  [
200 T:   �� [
210 T:  ����� [
220 T:  ````
[
230 E:
240 *TRAINRIGHT
250 T:         [9 BLANKS
260 T:   ````  [REM
270 T:  ��   [REM
280 T:  �����  [REM
290 T: ````  [REM
300 R:INCLUDE BLANKS & REMARK SIGN       AFTER GRAPHIC ... THEY HOLD SPACES!
310 E:
1000 R:
1010 *MAINLINE
1020 U:*STARTUP
1030 *LOCO1
1040 C:#L=1500 [LOUDNESS VALUE
1050 *LOCO2
1060 C:@B53761=(#L-#X)/100
1070 C:#L=#L-#X
1080 J(#L>400):*LOCO2
1090 C(#X<150):#X=#X+1
1100 C:#Z=#Z-1
1110 J(#Z=0):*LOCO3
1120 U:*TRAIN
1130 J:*LOCO1
1140 *LOCO3
1150 PA:60
1160 U:*WHISTLE
1170 PA:60
1180 C:@B82=2[RESTORES LEFT MARGIN
1190 E:
2000 R:
2010 *WHISTLE
2020 C:#W=3 [NUMBER OF WHISTLES
2030 *WHISTLE1
2040 C:@B53762=40 [FREQ. VOICE 1
2050 C:@B53764=10 [FREQ. VOICE 2
2060 C:@B53766=90 [FREQ. VOICE 3
2070 C:@B53763=160+10[CNTRL VOICE 1
2080 C:@B53765=160+8 [CNTRL VOICE 2
2090 C:@B53767=160+10[CNTRL VOICE 3
2100 PA:50
2110 C:@B53763=160
2120 C:@B53765=160
2130 C:@B53767=160
2140 PA:35
2150 C:#W=#W-1
2160 E(#W=0):
2170 J:*WHISTLE1
3000 R:
3010 *STARTUP
3020 R: THESE VARIABLES POSITION TRAIN
3030 C:#M=5 [LEFT MARGIN LOCATION
3040 C:#R=5 [ROW NUMBER
3050 C:#D=1 [DIRECTION 1=LEFT,-1=RIGHT
3060 R: THESE VARIABLES CONTROL SOUNDS        AND NUMBER OF PUFFS
3070 C:#Z=188 [NUMBER OF PUFFS
3080 C:#X=15 [DECREASES LOUDNESS
3090 C:@B53760=15[ FREQUENCY, VOICE 0
3100 C:@B53761=3 [CNTRL VOICE 0
3110 U:*TRAIN
3120 PA:120
3130 U:*WHISTLE
3140 PA:30
3150 E:

Back to previous page