Open nigeleke opened 10 months ago
Similarly Get out of jail
;GET OUT OF JAIL FREE OUTJAL: MOVE AC,POSN ;CHECK TO SEE IF GET OUT IOR AC,POSN+1 ;CARD'S BEEN PICKED SKIPE CHNCM JRST [TLNE AC,P.CHNJ ;CHANCE CARD? JRST GETCHN+1 ;YES, PICK AGAIN JRST CANPIK] ;NO TLNE AC,P.CMJ ;COMMUNITY CARD? JRST GETCHN+1 ;YES, PICK AGAIN CANPIK: OUTSTR [ASCIZ\GET OUT OF JAIL FREE. ] JUMPN PLAYER,[OUTSTR [ASCIZ\KEEP OR SELL ?] INCHWL C JSR CMPLIN CAIN C,"K" JRST .+1 ;KEEP CAIN C,"S" JRST [MOVEI AC,50 ;SELL FOR $40 ADDM AC,CASH+1 JRST PICKEX+1] OUTSTR [ASCIZ\PLEASE ANSWER ] JRST @.]
similarly cailac
CAILAC: HRRZ AC1,POSN(PLAYER) CAIL AC1,AC ;PLAYER PASSES GO? JRST [MOVEI AC1,^D200 ;YES ADDM AC1,CASH(PLAYER) JRST .+1]
Check this code: NORMGO: HRRZ AC2,AC ADD AC2,N CAILE AC2,47 ;PAST GO ? JRST [MOVEI AC1,^D200 ;ADD ON MONEY ADDM AC1,CASH(PLAYER) HRRI AC,-50(AC2) ;CORRECT POSITION JRST .+2] ;EXIT HRR AC,AC2
Where does the JRST actually jump to? What is the '.' (current location) actually referring too? The closure or the base context?