IDENTIFICATION DIVISION. PROGRAM-ID. CRAPS. * This program similates a craps game. * 04-DEC-1989 ELG ENVIRONMENT DIVISION. CONFIGURATION SECTION. SPECIAL-NAMES. SYMBOLIC CHARACTERS ESCAPE IS 28. INPUT-OUTPUT SECTION. FILE-CONTROL. SELECT LOG-FILE ASSIGN TO "GAMES$LOC:" FILE STATUS IS F-STAT. DATA DIVISION. FILE SECTION. FD LOG-FILE VALUE OF ID "CRAPS.LOG". 01 LOG-RECORD. 05 LOG-WHO PIC X(13). 05 LOG-WHEN PIC X(6). 05 LOG-WHAT PIC X(5). 05 LOG-AMT PIC ZZZ,ZZZ,ZZZ.99. WORKING-STORAGE SECTION. 01 F-STAT PIC XX. 01 JPI-USERNAME PIC S9(9) COMP VALUE EXTERNAL JPI$_USERNAME. 01 RANDOM-NUMBER-STORAGE. 05 RANDOM-SEED PIC S9(9) COMP. 05 RANDOM-RETURN USAGE COMP-1. 05 RANDOM-VALUE PIC 99. 05 SYSTEM-TIME. 10 ST-HOURS PIC 99. 10 ST-MINUTES PIC 99. 10 ST-SECONDS PIC 99. 10 ST-HUNDREDTHS PIC 99. 05 IDX PIC 99 COMP. 05 RANDOM-ROLL-TABLE. 10 FILLER PIC X(12) VALUE "111213141516". 10 FILLER PIC X(12) VALUE "212223242526". 10 FILLER PIC X(12) VALUE "313233343536". 10 FILLER PIC X(12) VALUE "414243444546". 10 FILLER PIC X(12) VALUE "515253545556". 10 FILLER PIC X(12) VALUE "616263646566". 05 RANDOM-ROLL REDEFINES RANDOM-ROLL-TABLE OCCURS 36. 10 RANDOM-DIE-1 PIC 9. 10 RANDOM-DIE-2 PIC 9. 05 DICE-ROLLED. 10 DIE-ROLLED-1 PIC 9. 10 DIE-ROLLED-2 PIC 9. 05 ROLLED-TOTAL PIC 99. 88 SEVEN-OUT VALUE 7. 88 CRAPS-ROLL VALUES ARE 2 3 12. 88 ANY-CRAPS-ROLL VALUES ARE 2 3 11 12. 88 FIELD-ROLL VALUES ARE 2 3 4 9 10 11 12. 05 ROLLED-OUT PIC Z9. 05 CURRENT-POINT PIC 99. 88 COME-OUT-ROLL VALUE 0. 05 POINT-OUT PIC Z9. 05 BET-OUT PIC ZZZZ. 05 C-FLAG PIC 9. 88 NCLR VALUE 1. 05 ESC PIC X VALUE ESCAPE. 05 ANS PIC X. 01 CASH-ITEMS. 05 MARKER PIC S9(9) COMP. 05 CURRENT-CASH PIC S9(9) COMP. 01 BET-ITEMS. 05 DEF-BET PIC 9(4) COMP. 05 BNO PIC 99 COMP. 05 MAX-DP-ODDS PIC 9(4) COMP. 01 BETS-PLACED. 05 PASS PIC 9(4) COMP. 05 PL-ODDS PIC 9(4) COMP. 05 DPASS PIC 9(4) COMP. 05 DP-ODDS PIC 9(4) COMP. 05 COME PIC 9(4) COMP. 05 DCOME PIC 9(4) COMP. 05 PLACE-BETS. 10 P-4 PIC 9(4) COMP. 10 P-5 PIC 9(4) COMP. 10 P-6 PIC 9(4) COMP. 10 P-8 PIC 9(4) COMP. 10 P-9 PIC 9(4) COMP. 10 P-10 PIC 9(4) COMP. 05 COME-BETS. 10 C-4 PIC 9(4) COMP. 10 C-5 PIC 9(4) COMP. 10 C-6 PIC 9(4) COMP. 10 C-8 PIC 9(4) COMP. 10 C-9 PIC 9(4) COMP. 10 C-10 PIC 9(4) COMP. 05 DCOME-BETS. 10 DC-4 PIC 9(4) COMP. 10 DC-5 PIC 9(4) COMP. 10 DC-6 PIC 9(4) COMP. 10 DC-8 PIC 9(4) COMP. 10 DC-9 PIC 9(4) COMP. 10 DC-10 PIC 9(4) COMP. 05 HARD-WAYS. 10 H-4 PIC 9(4) COMP. 10 H-6 PIC 9(4) COMP. 10 H-8 PIC 9(4) COMP. 10 H-10 PIC 9(4) COMP. 05 SINGLE-ROLLS. 10 S-7 PIC 9(4) COMP. 10 S-2 PIC 9(4) COMP. 10 S-3 PIC 9(4) COMP. 10 S-11 PIC 9(4) COMP. 10 S-12 PIC 9(4) COMP. 10 S-CR PIC 9(4) COMP. 10 S-CE PIC 9(4) COMP. 10 FIELD PIC 9(4) COMP. 01 WIN-LOSE-CONSTANTS. 05 LOST PIC X(4) VALUE "lost". 05 WON PIC XXX VALUE "get". 01 WIN-LOSE-LINE. 05 WIN-LOSE-LINE-1. 10 FILLER PIC X(4) VALUE "You". 10 D-WHAT PIC X(5). 10 WIN-OUT PIC $$$$9. 10 FILLER PIC X(4) VALUE " on ". 10 D-WHERE PIC X(12). 05 FILLER PIC X(6) VALUE "(pays ". 05 D-PAYS PIC X(4). 05 FILLER PIC X VALUE ")". COPY "LIB11:CONKEY.LIB". PROCEDURE DIVISION. DECLARATIVES. ERR-HAN SECTION. USE AFTER ERROR PROCEDURE ON LOG-FILE. ERR-HANDLE. EXIT. END DECLARATIVES. MAIN-PROGRAM SECTION. BEGIN-RUN. CALL "LIB$GETJPI" USING JPI-USERNAME OMITTED OMITTED OMITTED BY DESCRIPTOR LOG-WHO. ACCEPT LOG-WHEN FROM DATE. ACCEPT SYSTEM-TIME FROM TIME. COMPUTE RANDOM-SEED = (ST-MINUTES + 1) * (ST-SECONDS + 1) * (ST-HUNDREDTHS + 1) * 4521. MOVE 0 TO CURRENT-POINT CURRENT-CASH MARKER. * PERFORM DISPLAY-SCREEN. DISPLAY "The house advances you an initial $500" LINE 23. ADD 500 TO MARKER CURRENT-CASH. PERFORM DISPLAY-BETS. CLR. DISPLAY LOW-VALUES LINE 24 ERASE LINE. MOVE 0 TO C-FLAG. LOOP. PERFORM PLACE-YOUR-BETS. IF PASS = 0 AND DPASS = 0 GO TO END-LOOP. PERFORM ROLL-DICE. PERFORM PROCESS-WINS. GO TO LOOP. ROLL-DICE. CALL "MTH$RANDOM" USING RANDOM-SEED GIVING RANDOM-RETURN. COMPUTE IDX ROUNDED = RANDOM-RETURN * 36 + 1. MOVE RANDOM-DIE-1(IDX) TO DIE-ROLLED-1. MOVE RANDOM-DIE-2(IDX) TO DIE-ROLLED-2. ADD DIE-ROLLED-1 DIE-ROLLED-2 GIVING ROLLED-TOTAL. MOVE ROLLED-TOTAL TO ROLLED-OUT. DISPLAY "The roll is " LINE 18 COLUMN 1 ERASE END SCREEN DIE-ROLLED-1 " and " DIE-ROLLED-2 " totalling" ROLLED-OUT COLUMN PLUS. END-LOOP. DISPLAY ESC "[1;24r" LOW-VALUES LINE 21 ERASE END SCREEN. OPEN EXTEND LOG-FILE. IF MARKER < CURRENT-CASH MOVE " WON" TO LOG-WHAT SUBTRACT MARKER FROM CURRENT-CASH MOVE CURRENT-CASH TO LOG-AMT DISPLAY "YOU WON $" CURRENT-CASH WITH CONVERSION " THIS SESSION" ELSE MOVE " LOST" TO LOG-WHAT SUBTRACT CURRENT-CASH FROM MARKER MOVE MARKER TO LOG-AMT DISPLAY "YOU LOST $" MARKER WITH CONVERSION " THIS SESSION". IF F-STAT NOT = "00" GO TO ALL-DONE. WRITE LOG-RECORD. IF F-STAT NOT = "00" GO TO ALL-DONE. CLOSE LOG-FILE. ALL-DONE. STOP RUN. * PROCESS-WINS SECTION. PW-START. DISPLAY ESC "[18;24r" LOW-VALUES LINE 21 ERASE END SCREEN. IF SINGLE-ROLLS NOT = LOW-VALUES PERFORM PW-SINGLE-ROLLS. IF CURRENT-POINT = 0 GO TO PW-COME-OUT. PW-HARD-WAYS. IF HARD-WAYS = LOW-VALUES GO TO PW-COME-BETS. IF SEVEN-OUT ADD H-4 H-6 H-8 H-10 GIVING WIN-OUT MOVE LOST TO D-WHAT MOVE "Hard ways" TO D-WHERE DISPLAY WIN-LOSE-LINE-1 MOVE LOW-VALUES TO HARD-WAYS GO TO PW-COME-BETS. MOVE "8:1" TO D-PAYS. IF H-4 NOT = 0 IF ROLLED-TOTAL = 4 MOVE "HARD FOUR" TO D-WHERE IF DIE-ROLLED-1 = 2 MULTIPLY H-4 BY 9 GIVING H-4 MOVE WON TO D-WHAT ADD H-4 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE H-4 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO H-4 END-IF. IF H-10 NOT = 0 IF ROLLED-TOTAL = 10 MOVE "HARD TEN" TO D-WHERE IF DIE-ROLLED-1 = 5 MULTIPLY H-10 BY 9 GIVING H-10 MOVE WON TO D-WHAT ADD H-10 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE H-10 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO H-10 END-IF. MOVE "10:1" TO D-PAYS. IF H-6 NOT = 0 IF ROLLED-TOTAL = 6 MOVE "HARD SIX" TO D-WHERE IF DIE-ROLLED-1 = 3 MULTIPLY H-6 BY 11 GIVING H-6 MOVE WON TO D-WHAT ADD H-6 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE H-6 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO H-6 END-IF. IF H-8 NOT = 0 IF ROLLED-TOTAL = 8 MOVE "HARD EIGHT" TO D-WHERE IF DIE-ROLLED-1 = 4 MULTIPLY H-8 BY 11 GIVING H-8 MOVE WON TO D-WHAT ADD H-8 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE H-8 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO H-8 END-IF. PW-COME-BETS. IF COME-BETS = LOW-VALUES GO TO PW-DCOME-BETS. IF SEVEN-OUT MOVE "COME numbers" TO D-WHERE MOVE LOST to D-WHAT ADD C-4 C-5 C-6 C-8 C-9 C-10 GIVING WIN-OUT DISPLAY WIN-LOSE-LINE MOVE LOW-VALUES TO COME-BETS GO TO PW-DCOME-BETS. IF ANY-CRAPS-ROLL GO TO PW-DCOME-BETS. MOVE WON TO D-WHAT. MOVE "1:1" TO D-PAYS. IF C-4 NOT = 0 AND ROLLED-TOTAL = 4 MOVE "COME FOUR" TO D-WHERE MULTIPLY C-4 BY 2 GIVING C-4 ADD C-4 TO CURRENT-CASH MOVE C-4 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-4. IF C-5 NOT = 0 AND ROLLED-TOTAL = 5 MOVE "COME FIVE" TO D-WHERE MULTIPLY C-5 BY 2 GIVING C-5 ADD C-5 TO CURRENT-CASH MOVE C-5 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-5. IF C-6 NOT = 0 AND ROLLED-TOTAL = 6 MOVE "COME SIX" TO D-WHERE MULTIPLY C-6 BY 2 GIVING C-6 ADD C-6 TO CURRENT-CASH MOVE C-6 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-6. IF C-8 NOT = 0 AND ROLLED-TOTAL = 8 MOVE "COME EIGHT" TO D-WHERE MULTIPLY C-8 BY 2 GIVING C-8 ADD C-8 TO CURRENT-CASH MOVE C-8 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-8. IF C-9 NOT = 0 AND ROLLED-TOTAL = 9 MOVE "COME NINE" TO D-WHERE MULTIPLY C-9 BY 2 GIVING C-9 ADD C-9 TO CURRENT-CASH MOVE C-9 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-9. IF C-10 NOT = 0 AND ROLLED-TOTAL = 10 MOVE "COME TEN" TO D-WHERE MULTIPLY C-10 BY 2 GIVING C-10 ADD C-10 TO CURRENT-CASH MOVE C-10 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO C-10. PW-DCOME-BETS. IF DCOME-BETS = LOW-VALUES GO TO PW-PLACE-BETS. IF SEVEN-OUT MOVE "D/COME numbers" TO D-WHERE MOVE WON TO D-WHAT ADD DC-4 DC-5 DC-6 DC-8 DC-9 DC-10 GIVING DC-10 MULTIPLY DC-10 BY 2 GIVING DC-10 ADD DC-10 TO CURRENT-CASH MOVE DC-10 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE LOW-VALUES TO DCOME-BETS GO TO PW-PLACE-BETS. IF ANY-CRAPS-ROLL GO TO PW-PLACE-BETS. MOVE LOST TO D-WHAT. MOVE "1:1" TO D-PAYS. IF DC-4 NOT = 0 AND ROLLED-TOTAL = 4 MOVE "D/COME FOUR" TO D-WHERE MOVE DC-4 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-4. IF DC-5 NOT = 0 AND ROLLED-TOTAL = 5 MOVE "D/COME FIVE" TO D-WHERE MOVE DC-5 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-5. IF DC-6 NOT = 0 AND ROLLED-TOTAL = 6 MOVE "D/COME SIX" TO D-WHERE MOVE DC-6 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-6. IF DC-8 NOT = 0 AND ROLLED-TOTAL = 8 MOVE "D/COME EIGHT" TO D-WHERE MOVE DC-8 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-8. IF DC-9 NOT = 0 AND ROLLED-TOTAL = 9 MOVE "D/COME NINE" TO D-WHERE MOVE DC-9 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-9. IF DC-10 NOT = 0 AND ROLLED-TOTAL = 10 MOVE "D/COME TEN" TO D-WHERE MOVE DC-10 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO DC-10. PW-PLACE-BETS. IF PLACE-BETS = LOW-VALUES GO TO PW-LINE-BETS. IF SEVEN-OUT MOVE "PLACE bets" TO D-WHERE MOVE LOST to D-WHAT ADD P-4 P-5 P-6 P-8 P-9 P-10 GIVING WIN-OUT DISPLAY WIN-LOSE-LINE-1 MOVE LOW-VALUES TO PLACE-BETS GO TO PW-LINE-BETS. IF ANY-CRAPS-ROLL GO TO PW-LINE-BETS. MOVE WON TO D-WHAT. IF P-4 NOT = 0 AND ROLLED-TOTAL = 4 MOVE "PLACE FOUR" TO D-WHERE MOVE "9:5" TO D-PAYS MULTIPLY P-4 BY 2.8 GIVING P-4 ADD P-4 TO CURRENT-CASH MOVE P-4 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-4. IF P-5 NOT = 0 AND ROLLED-TOTAL = 5 MOVE "PLACE FIVE" TO D-WHERE MOVE "7:5" TO D-PAYS MULTIPLY P-5 BY 2.4 GIVING P-5 ADD P-5 TO CURRENT-CASH MOVE P-5 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-5. IF P-6 NOT = 0 AND ROLLED-TOTAL = 6 MOVE "PLACE SIX" TO D-WHERE MOVE "7:6" TO D-PAYS COMPUTE P-6 = P-6 * 7 / 6 + P-6 ADD P-6 TO CURRENT-CASH MOVE P-6 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-6. IF P-8 NOT = 0 AND ROLLED-TOTAL = 8 MOVE "PLACE EIGHT" TO D-WHERE MOVE "7:6" TO D-PAYS COMPUTE P-8 = P-8 * 7 / 6 + P-8 ADD P-8 TO CURRENT-CASH MOVE P-8 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-8. IF P-9 NOT = 0 AND ROLLED-TOTAL = 9 MOVE "PLACE NINE" TO D-WHERE MOVE "7:5" TO D-PAYS MULTIPLY P-9 BY 2.4 GIVING P-9 ADD P-9 TO CURRENT-CASH MOVE P-9 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-9. IF P-10 NOT = 0 AND ROLLED-TOTAL = 10 MOVE "PLACE TEN" TO D-WHERE MOVE "9:5" TO D-PAYS MULTIPLY P-10 BY 2.8 GIVING P-10 ADD P-10 TO CURRENT-CASH MOVE P-10 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO P-10. PW-LINE-BETS. IF SEVEN-OUT IF PASS NOT = 0 MOVE "LINE & Odds" TO D-WHERE PERFORM PW-PASS-LINE-LOSS END-IF IF DPASS NOT = 0 PERFORM PW-DPASS-WIN END-IF IF COME NOT = 0 MOVE WON TO D-WHAT MOVE "1:1" TO D-PAYS MOVE "COME" TO D-WHERE MULTIPLY COME BY 2 GIVING COME ADD COME TO CURRENT-CASH DISPLAY WIN-LOSE-LINE MOVE 0 TO COME END-IF IF DCOME NOT = 0 MOVE "DON'T COME" TO D-WHERE MOVE LOST TO D-WHAT MOVE DCOME TO WIN-OUT DISPLAY WIN-LOSE-LINE-1 MOVE 0 TO DCOME END-IF GO TO PW-OTHERS. * * not a seven * IF COME NOT = 0 IF ROLLED-TOTAL = 11 MOVE WON TO D-WHAT MOVE "1:1" TO D-PAYS MOVE "COME" TO D-WHERE MULTIPLY COME BY 2 GIVING COME ADD COME TO CURRENT-CASH DISPLAY WIN-LOSE-LINE MOVE 0 TO COME ELSE PERFORM PW-MOVE-COME-BET. IF DCOME NOT = 0 IF ROLLED-TOTAL = 11 MOVE "DON'T COME" TO D-WHERE MOVE LOST TO D-WHAT MOVE DCOME TO WIN-OUT DISPLAY WIN-LOSE-LINE-1 MOVE 0 TO DCOME ELSE PERFORM PW-MOVE-DCOME-BET. * IF ANY-CRAPS-ROLL GO TO PW-OTHERS. * IF ROLLED-TOTAL NOT = CURRENT-POINT GO TO PW-OTHERS. IF DPASS NOT = 0 PERFORM PW-DPASS-LOSS. * IF PASS = 0 GO TO PW-OTHERS. PERFORM PW-PASS-LINE-WIN. * MOVE "Odds Bet" TO D-WHERE. IF CURRENT-POINT = 4 OR 10 MULTIPLY PL-ODDS BY 3 GIVING PL-ODDS MOVE "2:1" TO D-PAYS ELSE IF CURRENT-POINT = 5 OR 9 MULTIPLY PL-ODDS BY 2.5 GIVING PL-ODDS MOVE "3:2" TO D-PAYS ELSE MULTIPLY PL-ODDS BY 2.2 GIVING PL-ODDS MOVE "6:5" TO D-PAYS. ADD PL-ODDS TO CURRENT-CASH. MOVE PL-ODDS TO WIN-OUT. DISPLAY WIN-LOSE-LINE. MOVE 0 TO PL-ODDS. * * PW-OTHERS. IF SEVEN-OUT MOVE 0 TO CURRENT-POINT. IF ROLLED-TOTAL = CURRENT-POINT MOVE 0 TO CURRENT-POINT. GO TO PW-EXIT. * PW-MOVE-COME-BET. IF ROLLED-TOTAL = 4 MOVE COME TO C-4 ELSE IF ROLLED-TOTAL = 5 MOVE COME TO C-5 ELSE IF ROLLED-TOTAL = 6 MOVE COME TO C-6 ELSE IF ROLLED-TOTAL = 8 MOVE COME TO C-8 ELSE IF ROLLED-TOTAL = 9 MOVE COME TO C-9 ELSE IF ROLLED-TOTAL = 10 MOVE COME TO C-10 ELSE MOVE "COME" TO D-WHERE MOVE LOST TO D-WHAT MOVE COME TO WIN-OUT DISPLAY WIN-LOSE-LINE. MOVE 0 TO COME. * PW-MOVE-DCOME-BET. IF ROLLED-TOTAL = 4 MOVE DCOME TO DC-4 ELSE IF ROLLED-TOTAL = 5 MOVE DCOME TO DC-5 ELSE IF ROLLED-TOTAL = 6 MOVE DCOME TO DC-6 ELSE IF ROLLED-TOTAL = 8 MOVE DCOME TO DC-8 ELSE IF ROLLED-TOTAL = 9 MOVE DCOME TO DC-9 ELSE IF ROLLED-TOTAL = 10 MOVE DCOME TO DC-10 ELSE MOVE "DON'T COME" TO D-WHERE MOVE DCOME TO WIN-OUT IF ROLLED-TOTAL = 12 MOVE "push" TO D-WHAT ELSE MOVE LOST TO D-WHAT END-IF DISPLAY WIN-LOSE-LINE-1. IF ROLLED-TOTAL NOT = 12 MOVE 0 TO DCOME. * PW-SINGLE-ROLLS. IF S-7 NOT = 0 MOVE "SEVEN" TO D-WHERE MOVE "5:1" TO D-PAYS IF ROLLED-TOTAL = 7 MULTIPLY S-7 BY 5 GIVING S-7 MOVE WON TO D-WHAT ADD S-7 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-7 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-7 END-IF. MOVE "30:1" TO D-PAYS. IF S-2 NOT = 0 MOVE "TWO" TO D-WHERE IF ROLLED-TOTAL = 2 MULTIPLY S-2 BY 31 GIVING S-2 MOVE WON TO D-WHAT ADD S-2 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-2 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-2 END-IF. IF S-12 NOT = 0 MOVE "TWELVE" TO D-WHERE IF ROLLED-TOTAL = 12 MULTIPLY S-12 BY 31 GIVING S-12 MOVE WON TO D-WHAT ADD S-12 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-12 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-12 END-IF. MOVE "15:1" TO D-PAYS IF S-3 NOT = 0 MOVE "THREE" TO D-WHERE IF ROLLED-TOTAL = 3 MULTIPLY S-3 BY 16 GIVING S-3 MOVE WON TO D-WHAT ADD S-3 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-3 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-3 END-IF. IF S-11 NOT = 0 MOVE "ELEVEN" TO D-WHERE IF ROLLED-TOTAL = 11 MULTIPLY S-11 BY 16 GIVING S-11 MOVE WON TO D-WHAT ADD S-11 TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-11 TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-11 END-IF. IF S-CE NOT = 0 MOVE "CRAPS-ELEVEN" TO D-WHERE MOVE "7:1" TO D-PAYS IF ROLLED-TOTAL < 4 OR ROLLED-TOTAL > 10 MOVE WON TO D-WHAT MULTIPLY S-CE BY 8 GIVING S-CE ADD S-CE TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-CE TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-CE END-IF. IF S-CR NOT = 0 MOVE "ANY CRAPS" TO D-WHERE MOVE "8:1" TO D-PAYS IF ROLLED-TOTAL < 4 OR ROLLED-TOTAL = 12 MOVE WON TO D-WHAT MULTIPLY S-CR BY 9 GIVING S-CR ADD S-CR TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE S-CR TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO S-CR END-IF. IF FIELD NOT = 0 MOVE "FIELD" TO D-WHERE MOVE "1:1" TO D-PAYS IF FIELD-ROLL IF ROLLED-TOTAL = 2 OR 12 MOVE "2:1" TO D-PAYS MULTIPLY FIELD BY 3 GIVING FIELD ELSE MULTIPLY FIELD BY 2 GIVING FIELD END-IF MOVE WON TO D-WHAT ADD FIELD TO CURRENT-CASH ELSE MOVE LOST TO D-WHAT END-IF MOVE FIELD TO WIN-OUT DISPLAY WIN-LOSE-LINE MOVE 0 TO FIELD END-IF. * PW-PASS-LINE-WIN. MOVE "PASS LINE" TO D-WHERE. MOVE "1:1" TO D-PAYS. MOVE WON TO D-WHAT. MULTIPLY PASS BY 2 GIVING PASS. ADD PASS TO CURRENT-CASH. MOVE PASS TO WIN-OUT. DISPLAY WIN-LOSE-LINE. MOVE 0 TO PASS. PW-PASS-LINE-LOSS. MOVE LOST TO D-WHAT. ADD PL-ODDS PASS GIVING WIN-OUT. DISPLAY WIN-LOSE-LINE-1. MOVE 0 TO PASS PL-ODDS. PW-DPASS-LOSS. MOVE "DON'T PASS" TO D-WHERE. MOVE LOST TO D-WHAT. ADD DPASS DP-ODDS GIVING WIN-OUT. DISPLAY WIN-LOSE-LINE-1. MOVE 0 TO DPASS DP-ODDS. PW-DPASS-WIN. MOVE "DON'T PASS" TO D-WHERE. MOVE WON TO D-WHAT MOVE "1:1" TO D-PAYS. MULTIPLY DPASS BY 2 GIVING DPASS. ADD DPASS TO CURRENT-CASH. DISPLAY WIN-LOSE-LINE. MOVE 0 TO DPASS. IF DP-ODDS NOT = 0 PERFORM PW-PAY-DPASS-ODDS. PW-PAY-DPASS-ODDS. MOVE "Odds Bet" TO D-WHERE. IF CURRENT-POINT = 4 OR 10 COMPUTE DP-ODDS = DP-ODDS * 3 / 2 MOVE "1:2" TO D-PAYS ELSE IF CURRENT-POINT = 5 OR 9 COMPUTE DP-ODDS = DP-ODDS * 5 / 3 MOVE "2:3" TO D-PAYS ELSE COMPUTE DP-ODDS = DP-ODDS * 11 / 6 MOVE "5:6" TO D-PAYS. ADD DP-ODDS TO CURRENT-CASH. MOVE DP-ODDS TO WIN-OUT. DISPLAY WIN-LOSE-LINE. MOVE 0 TO DP-ODDS. * PW-COME-OUT. IF ROLLED-TOTAL = 7 OR 11 NEXT SENTENCE ELSE IF CRAPS-ROLL GO TO PW-CO-CRAPS ELSE GO TO PW-CO-SET-POINT. * IF PASS NOT = 0 PERFORM PW-PASS-LINE-WIN. IF DPASS NOT = 0 PERFORM PW-DPASS-LOSS. MOVE 0 TO CURRENT-POINT. GO TO PW-EXIT. PW-CO-CRAPS. IF PASS NOT = 0 MOVE "PASS LINE" TO D-WHERE PERFORM PW-PASS-LINE-LOSS. IF DPASS NOT = 0 IF ROLLED-TOTAL NOT = 12 PERFORM PW-DPASS-WIN ELSE MOVE "DON'T PASS" TO D-WHERE MOVE "push" TO D-WHAT MOVE DPASS TO WIN-OUT DISPLAY WIN-LOSE-LINE-1. MOVE 0 TO CURRENT-POINT. GO TO PW-EXIT. PW-CO-SET-POINT. DISPLAY "The point is " ROLLED-OUT. MOVE ROLLED-TOTAL TO CURRENT-POINT. IF CURRENT-POINT = 4 AND P-4 NOT = 0 DISPLAY "PLACE 4 is refunded" ADD P-4 TO CURRENT-CASH MOVE 0 TO P-4. IF CURRENT-POINT = 5 AND P-5 NOT = 0 DISPLAY "PLACE 5 is refunded" ADD P-5 TO CURRENT-CASH MOVE 0 TO P-5. IF CURRENT-POINT = 6 AND P-6 NOT = 0 DISPLAY "PLACE 6 is refunded" ADD P-6 TO CURRENT-CASH MOVE 0 TO P-6. IF CURRENT-POINT = 8 AND P-8 NOT = 0 DISPLAY "PLACE 8 is refunded" ADD P-8 TO CURRENT-CASH MOVE 0 TO P-8. IF CURRENT-POINT = 9 AND P-9 NOT = 0 DISPLAY "PLACE 9 is refunded" ADD P-9 TO CURRENT-CASH MOVE 0 TO P-9. IF CURRENT-POINT = 10 AND P-10 NOT = 0 DISPLAY "PLACE 10 is refunded" ADD P-10 TO CURRENT-CASH MOVE 0 TO P-10. PW-EXIT. PERFORM DISPLAY-BETS. * DISPLAY-SCREEN SECTION. DS-DISPLAY-HEADINGS. DISPLAY "TOTAL MARKERS $" LINE 1 COLUMN 1 ERASE SCREEN. DISPLAY "Don't Come" LINE 1 COLUMN 30. DISPLAY "Come" LINE 2 COLUMN 36. DISPLAY "CHIPS AVAILABLE" LINE 3 COLUMN 1. DISPLAY "Place" LINE 4 COLUMN 36. DISPLAY "SEVEN" LINE 7 COLUMN 8. DISPLAY "DON'T" LINE 8 COLUMN 66. DISPLAY "COME" LINE 9 COLUMN 47 "COME" COLUMN 67. DISPLAY "HARD" LINE 10 COLUMN 8. DISPLAY "6:" LINE 11 COLUMN 6. DISPLAY "8:" LINE 11 COLUMN 15. DISPLAY "FIELD" LINE 11 COLUMN 46. DISPLAY "4:" LINE 12 COLUMN 6. DISPLAY "10:" LINE 12 COLUMN 14. DISPLAY "NEXT" LINE 13 COLUMN 8 "DON'T" COLUMN 66. DISPLAY "2:" LINE 14 COLUMN 6. DISPLAY "3:" LINE 14 COLUMN 16. DISPLAY "PASS" LINE 14 COLUMN 47 "PASS" COLUMN 67. DISPLAY "11:" LINE 15 COLUMN 5. DISPLAY "12:" LINE 15 COLUMN 15. DISPLAY "Odds" LINE 15 COLUMN 47 "Odds" COLUMN 67. DISPLAY "C/E:" LINE 16 COLUMN 4. DISPLAY "A/C:" LINE 16 COLUMN 14. DISPLAY "Use arrow keys to move, PF4 to roll" LINE 17 COLUMN 42. DS-DISPLAY-POINT. DISPLAY "4 5 6 8 9 10" LINE 3 COLUMN 46. IF CURRENT-POINT = 4 DISPLAY "4" REVERSED LINE 3 COLUMN 46 ELSE IF CURRENT-POINT = 5 DISPLAY "5" REVERSED LINE 3 COLUMN 52 ELSE IF CURRENT-POINT = 6 DISPLAY "6" REVERSED LINE 3 COLUMN 58 ELSE IF CURRENT-POINT = 8 DISPLAY "8" REVERSED LINE 3 COLUMN 64 ELSE IF CURRENT-POINT = 9 DISPLAY "9" REVERSED LINE 3 COLUMN 70 ELSE IF CURRENT-POINT = 10 DISPLAY "10" REVERSED LINE 3 COLUMN 76. * DISPLAY-BETS SECTION. DISP-MARKER. DISPLAY MARKER WITH CONVERSION LINE 1 COLUMN 17. DISP-CURRENT-CASH. DISPLAY CURRENT-CASH WITH CONVERSION LINE 3 COLUMN 17. DB-S-7. MOVE S-7 TO BET-OUT. DISPLAY BET-OUT LINE 8 COLUMN 9. DB-H-6. MOVE H-6 TO BET-OUT. DISPLAY BET-OUT LINE 11 COLUMN 8. DB-H-8. MOVE H-8 TO BET-OUT. DISPLAY BET-OUT LINE 11 COLUMN 17. DB-H-4. MOVE H-4 TO BET-OUT. DISPLAY BET-OUT LINE 12 COLUMN 8. DB-H-10. MOVE H-10 TO BET-OUT. DISPLAY BET-OUT LINE 12 COLUMN 17. DB-S-2. MOVE S-2 TO BET-OUT. DISPLAY BET-OUT LINE 14 COLUMN 8. DB-S-3. MOVE S-3 TO BET-OUT. DISPLAY BET-OUT LINE 14 COLUMN 17. DB-S-11. MOVE S-11 TO BET-OUT. DISPLAY BET-OUT LINE 15 COLUMN 8. DB-S-12. MOVE S-12 TO BET-OUT. DISPLAY BET-OUT LINE 15 COLUMN 17. DB-S-CE. MOVE S-CE TO BET-OUT. DISPLAY BET-OUT LINE 16 COLUMN 8. DB-S-CR. MOVE S-CR TO BET-OUT. DISPLAY BET-OUT LINE 16 COLUMN 17. * DB-PASS. MOVE PASS TO BET-OUT. DISPLAY BET-OUT LINE 14 COLUMN 52. DB-PL-ODDS. MOVE PL-ODDS TO BET-OUT. DISPLAY BET-OUT LINE 15 COLUMN 52. DB-FIELD. MOVE FIELD TO BET-OUT. DISPLAY BET-OUT LINE 11 COLUMN 52. DB-COME. MOVE COME TO BET-OUT. DISPLAY BET-OUT LINE 9 COLUMN 52. DB-DCOME. MOVE DCOME TO BET-OUT. DISPLAY BET-OUT LINE 9 COLUMN 72. DB-DPASS. MOVE DPASS TO BET-OUT. DISPLAY BET-OUT LINE 14 COLUMN 72. DB-DP-ODDS. MOVE DP-ODDS TO BET-OUT. DISPLAY BET-OUT LINE 15 COLUMN 72. * DB-DC-4. MOVE DC-4 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 44. DB-DC-5. MOVE DC-5 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 50. DB-DC-6. MOVE DC-6 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 56. DB-DC-8. MOVE DC-8 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 62. DB-DC-9. MOVE DC-9 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 68. DB-DC-10. MOVE DC-10 TO BET-OUT. DISPLAY BET-OUT LINE 1 COLUMN 74. * DB-C-4. MOVE C-4 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 44. DB-C-5. MOVE C-5 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 50. DB-C-6. MOVE C-6 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 56. DB-C-8. MOVE C-8 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 62. DB-C-9. MOVE C-9 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 68. DB-C-10. MOVE C-10 TO BET-OUT. DISPLAY BET-OUT LINE 2 COLUMN 74. * DB-P-4. MOVE P-4 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 44. DB-P-5. MOVE P-5 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 50. DB-P-6. MOVE P-6 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 56. DB-P-8. MOVE P-8 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 62. DB-P-9. MOVE P-9 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 68. DB-P-10. MOVE P-10 TO BET-OUT. DISPLAY BET-OUT LINE 4 COLUMN 74. DISPLAY-BETS-EXIT. EXIT. * PLACE-YOUR-BETS SECTION. PB-START. PERFORM DS-DISPLAY-POINT. * IF COME-OUT-ROLL MOVE 65 TO BNO GO TO BET-PASS. IF PASS NOT = 0 AND PL-ODDS = 0 MOVE 75 TO BNO GO TO BET-PL-ODDS. IF DPASS NOT = 0 AND DP-ODDS = 0 MOVE 78 TO BNO GO TO BET-DP-ODDS. IF ROLLED-TOTAL > 10 MOVE 25 TO BNO ELSE IF ROLLED-TOTAL > 7 ADD ROLLED-TOTAL 8 GIVING BNO ELSE IF ROLLED-TOTAL > 3 ADD ROLLED-TOTAL 9 GIVING BNO ELSE MOVE 35 TO BNO. GO TO PB-DISPATCH. * BET-PASS. MOVE PASS TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 14 COLUMN 52 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF PASS NOT = DEF-BET IF COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + PASS PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO PASS ELSE PERFORM PB-INVALID-BET. PERFORM DB-PASS. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-PASS. * BET-PL-ODDS. MOVE PL-ODDS TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 15 COLUMN 52 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF PL-ODDS NOT = DEF-BET IF NOT COME-OUT-ROLL AND PASS NOT = 0 IF PL-ODDS > (PASS * 2) PERFORM PB-INV-DBL-LIMIT ELSE COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + PL-ODDS PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO PL-ODDS ELSE PERFORM PB-INVALID-BET. PERFORM DB-PL-ODDS. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-PL-ODDS. * BET-DPASS. MOVE DPASS TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 14 COLUMN 72 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DPASS NOT = DEF-BET IF COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + DPASS MOVE DEF-BET TO DPASS ELSE PERFORM PB-INVALID-BET. PERFORM DB-DPASS. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-DPASS. * BET-DP-ODDS. MOVE DP-ODDS TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 15 COLUMN 72 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = DP-ODDS IF NOT COME-OUT-ROLL AND DPASS NOT = 0 PERFORM COMPUTE-MAX-DP-ODDS IF DP-ODDS > MAX-DP-ODDS PERFORM PB-INV-DBL-LIMIT ELSE COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + DP-ODDS MOVE DEF-BET TO DP-ODDS ELSE PERFORM PB-INVALID-BET. PERFORM DB-DP-ODDS. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-DP-ODDS. * BET-COME. MOVE COME TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 9 COLUMN 52 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = COME IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + COME MOVE DEF-BET TO COME ELSE PERFORM PB-INVALID-BET. PERFORM DB-COME. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-COME. * BET-DCOME. MOVE DCOME TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 9 COLUMN 72 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = DCOME IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + DCOME MOVE DEF-BET TO DCOME ELSE PERFORM PB-INVALID-BET. PERFORM DB-DCOME. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-DCOME. * BET-P-4. MOVE P-4 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 44 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-4 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-4 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-4 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-4. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-4. * BET-P-5. MOVE P-5 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 50 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-5 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-5 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-5 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-5. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-5. * BET-P-6. MOVE P-6 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 56 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-6 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-6 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-6 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-6. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-6. * BET-P-8. MOVE P-8 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 62 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-8 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-8 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-8 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-8. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-8. * BET-P-9. MOVE P-9 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 68 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-9 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-9 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-9 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-9. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-9. * BET-P-10. MOVE P-10 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 4 COLUMN 74 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = P-10 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + P-10 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO P-10 ELSE PERFORM PB-INVALID-BET. PERFORM DB-P-10. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-P-10. * BET-H-4. MOVE H-4 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 12 COLUMN 8 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = H-4 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + H-4 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO H-4 ELSE PERFORM PB-INVALID-BET. PERFORM DB-H-4. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-H-4. * BET-H-6. MOVE H-6 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 11 COLUMN 8 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = H-6 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + H-6 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO H-6 ELSE PERFORM PB-INVALID-BET. PERFORM DB-H-6. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-H-6. * BET-H-8. MOVE H-8 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 11 COLUMN 17 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = H-8 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + H-8 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO H-8 ELSE PERFORM PB-INVALID-BET. PERFORM DB-H-8. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-H-8. * BET-H-10. MOVE H-10 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 12 COLUMN 17 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = H-10 IF NOT COME-OUT-ROLL COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + H-10 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO H-10 ELSE PERFORM PB-INVALID-BET. PERFORM DB-H-10. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-H-10. * BET-S-7. MOVE S-7 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 8 COLUMN 9 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-7 COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-7 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-7. PERFORM DB-S-7. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-7. * BET-S-2. MOVE S-2 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 14 COLUMN 8 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-2 COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-2 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-2. PERFORM DB-S-2. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-2. * BET-S-3. MOVE S-3 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 14 COLUMN 17 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-3 COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-3 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-3. PERFORM DB-S-3. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-3. * BET-S-11. MOVE S-11 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 15 COLUMN 8 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-11 COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-11 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-11. PERFORM DB-S-11. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-11. * BET-S-12. MOVE S-12 TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 15 COLUMN 17 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-12 COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-12 PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-12. PERFORM DB-S-12. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-12. * BET-S-CR. MOVE S-CR TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 16 COLUMN 17 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-CR COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-CR PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-CR. PERFORM DB-S-CR. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-CR. * BET-S-CE. MOVE S-CE TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 16 COLUMN 8 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF NCLR PERFORM CLR. IF DEF-BET NOT = S-CE COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + S-CE PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO S-CE. PERFORM DB-S-CE. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-S-CE. * BET-FIELD. MOVE FIELD TO DEF-BET. ACCEPT DEF-BET WITH CONVERSION LINE 11 COLUMN 52 DEFAULT CURRENT VALUE CONTROL KEY CONTROL-KEY. IF DEF-BET NOT = FIELD COMPUTE CURRENT-CASH = CURRENT-CASH - DEF-BET + FIELD PERFORM DISP-CURRENT-CASH MOVE DEF-BET TO FIELD. PERFORM DB-FIELD. IF NOT NORMAL-INPUT GO TO PB-CONTROL-KEY. GO TO BET-FIELD. * PB-INVALID-BET. DISPLAY "That bet is not valid at this time" LINE 24 BELL. MOVE 1 TO C-FLAG. PB-INV-DBL-LIMIT. DISPLAY "This casino only allows DOUBLE ODDS bets" LINE 24 BELL. MOVE 1 TO C-FLAG. COMPUTE-MAX-DP-ODDS. IF CURRENT-POINT = 6 OR 8 COMPUTE MAX-DP-ODDS = DPASS * 2.4 ELSE IF CURRENT-POINT = 4 OR 10 COMPUTE MAX-DP-ODDS = DPASS * 4 ELSE * IF CURRENT-POINT = 5 OR 9 COMPUTE MAX-DP-ODDS = DPASS * 3. * PB-CONTROL-KEY. IF PF4 GO TO PLACE-BETS-DONE. * IF LEFT-ARROW SUBTRACT 1 FROM BNO ELSE IF RIGHT-ARROW ADD 1 TO BNO ELSE IF UP-ARROW SUBTRACT 10 FROM BNO ELSE IF DOWN-ARROW ADD 10 TO BNO ELSE GO TO PB-INVALID-KEY. GO TO PB-NEXT-BET. PB-INVALID-KEY. DISPLAY "%Invalid function key" LINE 24 BELL. MOVE 1 TO C-FLAG. GO TO PB-DISPATCH. * PB-NEXT-BET. IF BNO > 80 GO TO PNB-80. IF BNO > 70 GO TO PNB-70. IF BNO > 60 GO TO PNB-60. IF BNO > 50 GO TO PNB-50. IF BNO > 40 GO TO PNB-40. IF BNO > 30 GO TO PNB-30. IF BNO > 20 GO TO PNB-20. * IF BNO < 10 MOVE 75 TO BNO. IF BNO < 13 MOVE 13 TO BNO. IF BNO = 19 MOVE 21 TO BNO. IF BNO = 20 MOVE 18 TO BNO. GO TO PB-DISPATCH. PNB-20. IF BNO = 22 OR 23 MOVE 25 TO BNO. IF BNO = 24 MOVE 21 TO BNO. IF BNO = 26 MOVE 28 TO BNO. IF BNO = 27 OR 30 MOVE 25 TO BNO. IF BNO = 29 MOVE 31 TO BNO. GO TO PD-D20. PNB-30. IF BNO = 33 MOVE 35 TO BNO. IF BNO = 34 MOVE 32 TO BNO. IF BNO > 35 IF COME-OUT-ROLL MOVE 68 TO BNO ELSE MOVE 28 TO BNO. GO TO PB-DISPATCH. PNB-40. IF BNO > 42 MOVE 65 TO BNO. GO TO PD-D40. PNB-50. IF BNO = 55 MOVE 35 TO BNO. IF BNO = 58 MOVE 28 TO BNO. IF BNO = 60 MOVE 68 TO BNO. GO TO PB-DISPATCH. PNB-60. IF BNO = 63 MOVE 65 TO BNO. IF BNO = 64 MOVE 62 TO BNO. IF BNO = 67 MOVE 65 TO BNO. IF BNO = 66 MOVE 68 TO BNO. IF BNO = 69 MOVE 61 TO BNO. IF BNO = 70 MOVE 68 TO BNO. GO TO PD-D60. PNB-70. IF BNO = 73 MOVE 75 TO BNO. IF BNO = 74 MOVE 62 TO BNO GO TO PD-D60. IF BNO = 76 MOVE 78 TO BNO. IF BNO = 77 MOVE 75 TO BNO. IF BNO = 79 MOVE 71 TO BNO. GO TO PD-D70. PNB-80. IF BNO = 81 MOVE 21 TO BNO. IF BNO = 82 MOVE 32 TO BNO. IF BNO = 85 MOVE 15 TO BNO. IF BNO = 88 MOVE 18 TO BNO. * PB-DISPATCH. IF BNO > 70 GO TO PD-D70. IF BNO > 60 GO TO PD-D60. IF BNO > 50 GO TO PD-D50. IF BNO > 40 GO TO PD-D40. IF BNO > 30 GO TO PD-D30. IF BNO > 20 GO TO PD-D20. IF BNO = 13 GO TO BET-P-4. IF BNO = 14 GO TO BET-P-5. IF BNO = 15 GO TO BET-P-6. IF BNO = 16 GO TO BET-P-8. IF BNO = 17 GO TO BET-P-9. IF BNO = 18 GO TO BET-P-10. PD-D20. IF BNO = 21 GO TO BET-S-7. IF BNO = 25 GO TO BET-COME. IF BNO = 28 GO TO BET-DCOME. PD-D30. IF BNO = 31 GO TO BET-H-6. IF BNO = 32 GO TO BET-H-8. IF BNO = 35 GO TO BET-FIELD. PD-D40. IF BNO = 41 GO TO BET-H-4. IF BNO = 42 GO TO BET-H-10. PD-D50. IF BNO = 51 GO TO BET-S-2. IF BNO = 52 GO TO BET-S-3. PD-D60. IF BNO = 61 GO TO BET-S-11. IF BNO = 62 GO TO BET-S-12. IF BNO = 65 GO TO BET-PASS. IF BNO = 68 GO TO BET-DPASS. PD-D70. IF BNO = 71 GO TO BET-S-CE. IF BNO = 72 GO TO BET-S-CR. IF BNO = 75 GO TO BET-PL-ODDS. IF BNO = 78 GO TO BET-DP-ODDS. * * error falls thru to here IF BNO < 13 MOVE 13 TO BNO GO TO BET-P-4. MOVE 65 TO BNO. GO TO BET-PASS. * * PLACE-BETS-DONE. IF CURRENT-CASH NOT < 0 DISPLAY "Rolling dice..." LINE 24 MOVE 1 TO C-FLAG GO TO PLACE-BETS-EXIT. DISPLAY "You have exceeded your current cash - another marker?" LINE 21 ERASE LINE. ACCEPT ANS COLUMN PLUS DEFAULT "Y" AT END STOP RUN. IF ANS = "N" OR "n" DISPLAY "Please change bets until shortage is overcome" LINE 22 ERASE END SCREEN GO TO BET-PASS. DISPLAY "The house advances you another $500" LINE 23. ADD 500 TO MARKER CURRENT-CASH. PERFORM DISP-MARKER THRU DISP-CURRENT-CASH. GO TO PLACE-BETS-DONE. PLACE-BETS-EXIT. EXIT.