ROM Computer Magazine Archive ROM MAGAZINE ISSUE 1 — AUGUST/SEPTEMBER 1983 / PAGE 6

Stock Broker-A game that lets you play the stock market.
By Bob Cockroft & Tim Reekie
    This game was inspired from the board game 'Stock Ticker'(TM) where a person buys and sells stocks to try and earn more money. There are six stocks that are used in this game They are; Grain, Industrial, Bonds, Oil, Silver, and Gold. The game can be played solitare or with as many players as you want. The game requires a minimum of 32K to run.
    When we played this game we used the paper money and stocks from 'Stock Ticker' but if you want you can keep track of how much money and stocks you have on a piece of paper. When the program is run it takes a few seconds to set up the graph which keeps track of the stocks. The graph is made by the Atari's four players and two of the missiles. Each person starts out with a certain amount of money, which stocks can be bought with. When we played the game we each started with five thousand dollars and had a time limit before the game was over. You can make up your own type of rules. Send in your ideas.
    Each player would then be given a chance to buy or sell stocks. The first question asked by the computer is 'what stock?' You would reply by typing in either; G-Grain, I-Industrial, B-Bonds, O=Oi1, S-Silver, or A-Gold. The next question asked is whether you'll buy or sell the stock. B-Buy or S-Sell. After you choose what stock you wish to buy or sell you have to enter how much of the stock. Remember you must have enough money to pay for the stock (if buying) or have the stock (if selling). The computer will now print out how much you have to pay for the stock (if buying) or the amount of money received if selling.
    The last question is whether you're finished or not (Y/N)? If everyone who is playing the game has bought or sold all they want for that turn type Y if not type N. When Y is type in the computer will begin to move the stocks according to the buying and selling that took place during that game turn. Dividends come on the bottom of the screen for each of the stocks. This dividend is how much you receive per thousand of the stock you own. Hot tips are helpful tips that appear on the bottom of the screen. These tips can be anything from saying Grain will fall to saying Gold will rise. These tips may not always be true but thats the chance you have to take when you play the market. After each tip or dividend you must push a key to continue.
    Another added feature added to this stock market game is that you don't have to start the game with all the stocks at par. By typing in P(where it asks for what stock) a couple of times it is possible to have some stocks go up and others go down. This can make the game more enjoyable to play.
    Those are all the rules that we use, now type in the program and enter the world of big business. One more thing in closing. When a stock splits you may sell your stock at double the value or receive as much stock as you have. Remember the stock returns back to par when splitting, If a stock goes off the market you lose all the shares which you have in that particular stock. The stock also returns back to par.
    For those who don't have time to type in the program below send $4.00 and a blank disk or cassete to:
ROM
P.O. BOX 252,
Maple Ridge, B.C.
V2X 7G1
Stock Ticker is a register trademark of Parker Bros.
     Below is a picture of the program when run:

Stock Broker screen

1 SR=100:A=100:B=100:O=100:I=100:G=100
2 DIM ST$(1):DIM F$(1):DIM BS$(1)
3 DIM SR$(16):DIM MR$(14):DIM MU$(12):DIM PU$(18)
5 DIM FR$(120)
6 TR=0
7 DIM QQ$(3)
8 DIM S1$(6),S2$(6),S3$(6),S4$(6),S5$(6),S6$(6),T$(6)
9 S1$="GRAIN":S2$="IND":S3$="BONDS":S4$="OIL":S5$="SILVER":S6$="GOLD"
10 GRAPHICS 0
11 J1=70
12 GOL=0:GRA=0:IND=0:OIL=0:SIL=0:BON=0
13 DIM Q$(6)
14 PA=17
15 ST=0

16 DIM GR1$(120),GR2$(120),GR3$(120),GR4$(120),IN1$(120),IN2$(120),IN3$(120)/IN4$(120),BO1$(120),BO2$(120)
17 DIM BO3$(120)/BO4$(120),OI1$(120),OI2$(120),OI3$(120),OI4$(120),SI1$(120),SI2$(l20),SI3$(120),SI4$(120)
18 DIM AU1$(120),AU2$(120),AU3$(120),AU4$(120)
19 GOSUB 2000
20 SST=0:GT=0:AT=0:IT=0:BT=0:OT=0
21 POKE 559,62
30 POKE 53252,154:POKE 53253,156
32 POKE 53254,177:POKE 53255,179
35 POKE 53248,66:POKE 53249,88:POKE 53250,110:POKE 53251,132
40 POKE 704,218
42 POKE 705,88
43 POKE 706,202
44 POKE 707,88
45 POKE 711,88
50 IP=PEEK(106)-16
60 POKE 54279,IP
70 POKE 53277,3
80 J=IP*256+1024
81 J1=IP*256+1280
82 J2=IP*256+1536
83 J3=IP*256+1792
85 GRB=IP*256+768
90 POKE J+132,240
120 POKE J1+132,240
122 POKE J2+132,240
124 POKE J3+132,240
150 POKE GRB+132,255
200 LO=255
205 GM=240:IM=240:BM=240:OM=240
210 GR=INT(G/2)
215 IN=INT(I/2)
220 BO=INT(B/2)
225 OI=INT(O/2)
230 SI=INT(SR/2)
235 AU=INT(A/2)
250 FOR MR-1 TO -100 STEP -1
255 IF MR<-GR THEN GM=0
260 IF MR<-IN THEN IM=0
265 IF MR<-BO THEN BM=0
270 IF MR<-OI [HEN OM=0
280 POKE J+132+MR,GM
285 POKE J1+132+MR,IM
290 POKE J2+132+MR,BM
295 POKE J3+132+MR,OM
296 NEXT MR
300 IF SI=AU THEN BA=AU
305 IF SI>AU THEN BA=AU
310 IF SI<AU THEN BA=SI
370 IF SI=AO THEN FOR MR=-BA
375 SI>AU THEN TO=15:NA=SI
380 IF SI<AU THEN TO=:240:NA=AU
390 FOR MR=-BA TO -100 STEP -1
395 IF MR<-NA THEN TO=0
400 POKE GRB+132+MR,TO
405 NEXT MR
410 FOR MR=1 TO -100 STEP -1
420 IF MR<-BA THEN 500
430 POKE GRB+132+MR,LO
440 NEXT MR
441 RETURN
500 POSITION 1,5
502 PRINT "PAR"

504 POSITION 2,13
505 PRINT "GRAIN"
506 POSITION 3,14:PRINT G:IF G<100 THEN POKE 40565,0
510 POSITION 9,13
515 PRINT "IND"
516 POSITION 9,14:PRINT I:IF I<100 THEN POKE 40571/0
520 POSITION 14,13
525 PRINT "BONDS"
526 POSITION 15,14:PRINT B:IF B<100 THEN POKE 40577,0
530 POSITION 20,13
535 PRINT "OIL"
536 POSITION 20,14:PRINT O:IF O<100 THEN POKE 40582,0
540 POSITION 24,13
545 PRINT "SILVER"
546 POSITION 25,14:PRINT SR:IF SR<100 THEN POKE 40587,0
550 POSITION 31,13
555 PRINT "GOLD"
556 POSITION 31,14:PRINT A:IF A<100 THEN POKE 40593,0
560 POSITION 1,6
570 PRINT "---~------------------------------"
580 POSITION 1,14
1001 GOTO 1020
1010 GOSUB 200
1020 GOSUB 3008
1022 IF R>=TR THEN GOSUB 8000:R=R+1
1029 FOR II=1 TO 5
1030 Y=INT(RND(0)*6)
1031 G=G+GT:GT=0
1032 A=A+AT:AT=0
1033 I=I+IT:IT=0
1034 O=O+OT:OT=0
1035 S=S+ST:ST=0
1036 B=B+BT:BT=0
1040 YY=INT(RND(0)*3)
1050 YYY=INT(RND(0)*3)
1120 IF YYY=0 THEN D=5
1130 IF YYY=1 THEN D=10
1140 IF YYY=2 THEN D=20
1141 IF Y=0 THEN X1=G:T$=S1$
1142 IF Y=1 THEN X1=A:T$=S6$
1193 IF Y=2 THEN X1=I:T$=S2$
1144 IF Y=3 THEN X1=O:T$=S4$
1145 IF Y=4 THEN X1=SR:T$=S5$
1146 IF Y=5 THEN X1=B:T$=S3$
1150 IF YY=0 THEN GOTO 1200
1151 IF YY=1 THEN D=-D
1152 X=D+ZZ:IF Y=5 THEN B=B+X
1153 IF Y=0 THEN G=G+X
1154 IF Y=1 THEN A=A+X
1155 IF Y=2 THEN I=I+X
1156 IF Y=3 THEN O=O+X
1157 IF Y=4 THEN SR=SR+X
1159 IF G>199 THEN Q$=S1$:GOSUB 10000
1160 IF A>199 THEN Q$=S6$:GOSUB 10000
1161 IF I>199 THEN Q$=S2$:GOSUB 10000
1162 IF O>199 THEN Q$=S4$:GOSUB 10000
1164 IF B>199 THEN Q$=S3$:GOSUB 10000
1165 IF G<1 THEN Q$=S1$:GOSUB 10500
1166 IF A<1 THEN Q$=S6$:GOSUB 10500
1167 IF I<1 THEN Q$=S2$:GOSUB 10500
1168 IF O<1 THEN Q$=S4$:GOSUB 10500
1169 IF SR<1 THEN Q$=S5$:GOSUB 10500
1170 IF B<1 THEN Q$=S3$:GOSUB 10500
1172 IF SR>199 THEN Q$=S3$:GOSUB 10000

1178 IF G>199 OR G<1 THEN G=100
1180 IF A>199 OR A<1 THEN A=100
1182 IF I>199 OR I<1 THEN I=100
1184 IF B>199 OR B<1 THEN B=100
1186 IF O>199 OR O<1 THEN O=100
1188 IF SR>199 OR SR<1 THEN SR=100
1195 POKE 710,5
1200 IF X1<101 OR YY>0 THEN 1260
1210 W=10*D
1220 POSITION 1,PA
1230 PRINT "DIV/1000 SHARES",T$,W
1232 IF PA>21 THEN PA=16
1235 PA=PA+1
1260 NEXT II
1261 Z=0
1262 GOTO 1010
2000 GOL=0:GRA=0:IND=0
2010 OIL=0:SIL=0:BON=0
2020 SR$="SEVERE RECESSION"
2030 MR$="MILD RECESSION"
2040 MU$="MILD UPSWING"
2050 PU$="PHENOMENAL UPSWING"
2060 GOSUB 6000
2090 RETURN
3000 COSUB 4000
3001 CO=CO+1
3009 POSITION 1,15
3010 PRINT "STOCK?    ":INPUT ST$
3011 FOR RU=1 TO 38:POKE 40642+RU,0:NEXT RU
3012 R=R+1
3013 FOR RU=10 TO 29:POKE 40082+RU,0:NEXT RU
3014 IF ST$="Px OR ST$='/Q" THEN 3235
3015 POSITION 1,15
3020 PRINT " B/S?":INPUT BS$
3021 FOR RU=1 TO 38:POKE 40642+RU,0:NEXT RU
3025 POSITION 1,15
3030 PRINT "QUANTITY?":INPUT Q
3031 FOR RU=1 TO 38:POKE 40612+RU,0:NEXT RU
3035 POSITION 1,15
3040 IF BS$="S" THEN Q=-Q
3050 IF ST$="A" THEN ST=GOL:X=A:GOTO 3117
3060 IF ST$="G" THEN ST=GRA:X=G:GOTO 3117
3070 IF ST$="I" THEN ST=IND:X=I:GOTO 3117
3080 IF ST$="O" THEN ST=OIL:X=O:GOTO 3117
3090 IF ST$="S" THEN ST=SIL:X=SR:GOTO 3117
3100 IF ST$="B" THEN ST=BON:X=B:GOTO 3117
3110 PRINT "RE-ENTER STOCK"GOTO 3010
3117 WT=X*Q:POSITION 20,16:PRINT "VALUE ";WT/100
3122 C=(Q/((STM*2)+12000))*100
3123 ST=ST+Q
3124 MOE=INT(RND(0)*5)-3
3126 IF C<(-25+MOE) THEN X=X-40
3128 IF C<(-10+MOE) AND C>(-25+MOE) THEN X=X-25
3130 IF C<(-5+MOE) AND C>(-10+MOE) THEN X=X-10
3132 IF C>(5+MOE) AND C<(10+MOE) THEN X=X+10
3134 IF C>(10+MOE) AND C<(25+MOE) THEN X=X+15
3136 IF C>(25+MOE) THEN X=X+30
3137 LIN=INT(RND(0)*8)+1
3138 IF X<50 AND LIN=1 THEN X=X-40
3140 IF ST$="A" THEN A=X:GOL=ST
3150 IF ST$="G" THEM G=X:GRA=ST    '
3160 IF ST$="I" THEN I=X:IND=ST
3170 IF ST$="O" THEN O=X:OIL=ST
3180 IF ST$="S" THEN SR=X:SIL=ST

3190 IF ST$="B" THEN B=X:BON=ST
3200 PRINT "FINISHED?":INPUT F$
3203 IF F$="N" THEN 3009
3220 IF F$="Y" THEN 3235
323[ GOTO 3200
3235 FOR RU=1 TO 280:POKE 40659+RU,0:NEXT RU
3240 RETURN
4000 HT=INT(RND(0)*20)
4001 E=INT(RND(0)*100)
4002 IF E>65 THEN E=1
4010 IF HT>2 THEN RETURN
4109 CH=INT(RND(0)*25)+1
1112 POKE 559,62
4115 POSITION 1,19
4120 PRINT "            HOT   TIPS"
1131 IF CH=1 THEN FR$=GR1$:IF E=1 THEN GT=20
4134 IF CH=2 THEN FR$=GR2$:IF E=1 THEN GT=-20
4136 IF CH=3 THEN FR$=GR3$:IF E=1 THEN GT=15
4138 IF CH=4 THEN FR$=GR4$:IF E=1 THEN GT=-15
4140 IF CH=5 THEN FR$=IN1$:IF E=1 THEN IT=25
4142 IF CH=6 THEN FR$=IN2$:IF E=1 THEN IT=-25
4144 IF CH=7 THEN FR$=IN3$:IF E=1 THEN IT=20
4146 IF CH=8 THEN FR$=IN4$:IF E=1 THEN IT=-20
4148 IF CH=9 THEN FR$=BO1$:IF E=1 THEN BT=10
4150 IF CH=10 THEN FR$=BO2$:IF E=1 THEN BT=-10
4152 IF CH=11 THEN FR$=BO3$:IF E=1 THEN BT=5
4154 IF CH=12 THEN FR$=BO4$:IF E=1 THEN BT=-5
4156 IF CH=13 THEN FR$-SI1$:IF E=1 THEN ST=30
4158 IF CH=14 THEN FR$=SI2$:IF E=1 THEN ST=-30
4160 IF CH=15 THEN FR$=SI3$:IF E=1 THEN ST=20
4162 IF CH=16 THEN FR$=SI4$:IF E=1 THEN ST=-20
4164 IF CH=17 THEN FR$=OI1$:IF E=1 THEN OT=40
4166 IF CH=18 THEN FR$=OI2$:IF E=1 THEN OT=-40
4168 IF CH=19 THEN FR$=OI3$:IF E=1 THEN OT=30
4170 IF CH=20 THEN FR$=OI1$:IF E=1 THEN OT=-30
4172 IF CH=21 THEN FR$=AU1$:IF E=1 THEN AT=35
4174 IF CH=22 THEN FR$=AU2$:IF E=1 THEN AT=-35
4176 IF CH=23 THEN FR$=AU3$:IF E=1 THEN AT=25
4178 IF CH=24 THEN FR$=AU4$:IF E=1 THEN AT=-25
4180 ? FR$
4200 IF PEEK(753)=0 THEN 4200
4205 FOR RU=1 TO 120:POKE 40772+RU,0:NEXT RU
4210 GOTO 500
4400 RETURN
6000 GR1$="GRAIN WILL RISE!   UNEXPECTED FROST   DESTROYS AMERICAN CROPS"
6010 GR2$="GRAIN WILL FALL!  RECORD WHEAT CROPS  DUE TO GOOD WEATHER!"
6020 GR3$="GRAIN WILL RISE!  UNEXPECTED LOCUST   PLAGUES OVER PRAIRIES!"
6030 GR4$="GRAIN WILL FALL!  RUSSIANS REJECT     AMERICAN GRAIN EXPORTS!"
6040 IN1$="IND, WILL RISE!   C.P. RAIL WISHES    TO BUY MANY MAJOR INDUSTRIES!"
6050 IN2$="IND, WILL FALL!   INTEREST RATES      PREDICTED TO RISE SICNICANTLY SDON!"
6060 IN3$=xIND, WILL RISE!   WORLD-WIDE INCREASE IN HOUSING STARTS!"
6070 IN4$="IND, WILL FALL!   WORLD-WIDE GENERAL  STRIKE PLANNED FOR NEXT MONTH!"
6080 BO1$="BONDS WILL SKY-ROCKET WITH PREDICTED  FALL IN INFLATON!"
6090 BO2$="BONDS WILL PLUMMET WITH PREDICTED RISE IN INFLATION!"
6100 BO3$="BONDS WILL RISE!  CANADA SAVINGS      BONDS WILL PAY 40% INTEREST!"
6110 BO4$="BONDS WILL FALL!   BANK OF CANADA     WILL BE UNABLE TO PAY BOND INTEREST!"
6120 OI1$="OIL WILL RISE!   ARABS ARE PLOTTING   MAJOR OIL EMBARGO!"
6130 OI2$="OIL WILL FALL!   BRAZILIANS DEVISE    METHOD OF DERIVING OIL FROM COFFEE!"
6140 OI3$="OIL WILL RISE!   PRINCE IBIN-AGOOF    CLOSES ALL ARABIAN OIL WELLS AND CHICKEN-FARM INSTEAD!"
6150 OI4$="OIL WILL FALL!   AYATOLLAH WILL TRADE HIS OIL FOR WESTERN WATER!"
6160 SI1$="SILVER WILL FALL!  MAJOR SILVER       DEPOSIT FOUND IN THE ROCKIES'''
6170 SI2$="SILVER WILL FALL!  HUNT'S WILL DECIDE TO SELL ALL THEIR SILVER"
6180 SI3$="SILVER WILL RISE!  HUNT'S WILL TRY    TO BUY 60% OF THE WORLD'S 5ILVER"
6190 SI4$="SILVER WILL RISE! SILVER CONSUMPTION  WILL INCREASE BY 50Z!"
7000 AU1$="GOLD WILL RISE! RUSSIAN PLANS SECRET  NUCLEAR ATTACK ON WEST!"
7010 AU2$="GOLD WILL FALL! RONNIE IS GOING TO    SELL ALL AMERICA'S GOLD RESERVES!"
7020 AU3$="GOLD WILL RISE! FORT KNOX HAS BEEN    ROBBED!"
7030 AU4$="GOLD WILL FALL!  GOLD FOUND ON        PRAIRIES! 'MORE GOLD THAN WHEAT'"
7010 RETURN
8000 CO=0
8030 TR=INT(RND(0))*4)+3
8040 TYPE=INT(RND(0)*7)
8050 R=1

8055 POSITION 12,1
8056 PRINT "                      "
8057 POSITION 12,1
8060 IF TYPE=0 THEN PRINT SR$:ZZ=-30
8070 IF TYPE=1 THEN PRINT MR$:ZZ=-10
8080 IF TYPE=2 THEN PRINT MU$:ZZ=5
8090 IF TYPE=3 THEN PRINT PU$:ZZ=10
8094 IF TYPE=4 THEN PRINT MR$:ZZ=-10
8095 IF TYPE>4 THEN ? "STABLE ECONOMY"
8100 RETURN
10000 RESTORE
10001 READ P1,T1
10005 JJ1=5
10010 SOUND 1,4,1,0:FOR N1=1 TO 4:NEXT N1
10020 SOUND 1,P1,10,15
10030 FOR N1=1 TO JJ1:NEXT N1
10040 IF T1<>1 THEN FOR N=1 TO T1*(JJ1/2):NEXT N
10050 IF T1<>4 THEN 10001
10100 DATA 108,2,85,1,85,2,72,1,72,2,53,1,53,2,42,1,42,2,53,1,53,2,72,1,72,2,85,1,85,2,47,1,47,2
10200 DATA 57,1,57,2,72,1,72,2,81,1,81,2,47,1,42,1,53,2,53,2,53,2,53,2,53,4
10250 POSITION 12,2:? Q$;"  SPLIT!!"
10298 RESTORE
10299 SOUND 1,1,1,0
10300 RETURN
10500 RESTORE 10600
10501 JJ1=6
10502 READ P1,T1
10510 SOUND 1,4,1,0:FOR N=1 TO 4:NEXT N
10520 SOUND 1,P1,10,15
10530 FOR N=1 TO JJ1:NEXT N
10540 IF T1<>1 THEN FOR N=1 TO T1*(JJ1/2):NEXT N
10550 IF T1<>4 THEN 10502
10600 DATA 144,3,144,3,144,1,144,3,121,3,128,2,128,3,144,2,144,3,153,3,144,4
10650 POSITION 12,2:? Q$;"  DROPPED OFF!"
10699 SOUND 1,1,1,1,0
10700 RETURN