--- title: "The Gambler" id: 51794 type: "computer_media" slug: "the-gambler" url: "http://localhost/computer_media/the-gambler/" markdown_url: "http://localhost/computer_media/the-gambler.md" published_at: "2023-08-13T23:14:32+00:00" modified_at: "2026-04-04T20:17:59+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2019/02/20230809-041332.jpg" excerpt: "Two casino games in one package — a full-featured Blackjack dealer with double-down and six-card bonus, plus an animated slot machine with 14 payline combinations and a 1000× jackpot." category: - name: "Archived Media" slug: "archived-media" taxonomy: "category" url: "http://localhost/category/archived-media/" post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "Timex Computer Corporation" slug: "timex-computer-corporation" taxonomy: "post_tag" url: "http://localhost/tag/timex-computer-corporation/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" model: - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" genre: - name: "Gambling" slug: "gambling" taxonomy: "genre" url: "http://localhost/type/gambling/" - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_type: "Cassette" download_url: "https://archive.org/download/timex-sinclair-software-archive/The Gambler (1982)(Timex)(US)(TS1000)(Cassette).zip" mediadate: "1982" producer_company: - id: 11401 title: "Timex Computer Corporation" type: "company" url: "http://localhost/company/timex-computer-corporation/" related_products: - id: 14323 title: "The Gambler" type: "product" url: "http://localhost/product/gambler/" media_type_tags: "Gambling, Game" --- # The Gambler This cassette contains two separate BASIC programs: a Blackjack card game and a Slot Machine simulation. The Blackjack program implements a full casino-style game including double-down, six-card blackjack (paying 150%), dealer stand/hit rules (stands on 17+), and ace handling via dedicated subroutines that subtract 10 when a hand busts. Cards are stored in two parallel arrays — a numeric value array B(52) and a character label array H$(52) — and the shuffle routine uses rejection sampling to ensure no more than four of any rank appear. The Slot Machine program encodes three reels as fixed strings (L$, M$, R$) and animates spinning by stepping through substring positions, then evaluates the payline using a cascade of IF comparisons covering 14 winning combinations including a 1000× jackpot for triple sevens. Both programs share an identical machine-code invocation pattern using USR 16608 via POKE 16625 and include a dead-code POKE utility at line 9000 for patching memory directly from BASIC. *** ## Program Analysis The cassette image contains two independent BASIC programs. The first (starting at line 10) is a Blackjack card game; the second (starting at line 5 with `REM "SLOT"`) is a slot machine. Both share structural similarities including a machine-code hook pattern and a POKE utility routine. ### Program 1: Blackjack — Structure Execution flows through three setup subroutines before entering the main deal loop: 1. Line 200: `GOSUB 3500` — introduction screen and rules display 2. Line 210: `GOSUB 2500` — card shuffle 3. Line 220: `GOSUB 2900` — background/layout draw 4. Lines 300–440: variable initialization for each round 5. Lines 500–590: deal dispatcher using counter `K` 6. Lines 600–780: card deal subroutines for player (600) and dealer (700) 7. Lines 800/900: ace adjustment subroutines 8. Lines 1000–1850: game logic (blackjack, double-down, hit, stand, score comparison) 9. Lines 1850–2030: next-deal flow including reshuffle trigger at `I>42` 10. Lines 4000–4340: card display subroutines 11. Lines 5000–5050: end-of-game summary ### Blackjack — Card Representation Two parallel arrays are maintained for the deck. `B(52)` holds numeric point values (1–10, with J/Q/K all stored as 10 and aces as 11). `H$(52)` holds display labels: numeric ranks as `STR$`, face cards as “K”, “Q”, “J”, and aces as “A”. The shuffle at lines 2500–2710 uses rejection sampling: a random rank 1–13 is drawn; if `A(C)` already equals 4 (four cards of that rank placed), the draw is retried. After shuffling, `A()` is reset to zeros for reuse. A notable encoding quirk: rank 1 represents a Jack (display “J”, value 10), rank 11 represents an Ace (“A”, value 11). This is non-standard but internally consistent. ### Blackjack — Ace Handling Counters `M8` (player aces) and `M9` (dealer aces) track how many soft aces remain in each hand. When a total exceeds 21, subroutine 800 (player) or 900 (dealer) subtracts 10 and decrements the ace counter, effectively converting a soft hand to a hard hand. The expression `S=S-10*(M8>0)` exploits the Boolean-as-integer idiom where a true condition evaluates to 1. ### Blackjack — Deal Dispatcher Counter `K` increments each iteration of the deal loop at line 510. Values 1 and 3 route to the player card routine (line 600); values 2 and 4 route to the dealer routine (line 700). After four cards are dealt, subsequent hits branch based on flags: `K9=1` means dealer is drawing, `X=1` means player is hitting. This single-loop architecture handles both the initial deal and subsequent hit cards. ### Blackjack — Scoring and Special Rules - **Player blackjack (21 on first two cards):** bet increased by 50% at line 1070 (`B=B+B*.5`) - **Double down:** available when player total is 10 or 11; bet is doubled and exactly one more card is dealt - **Six-card blackjack:** counter `C6` tracks cards dealt to player; reaching 6 without busting triggers the 150% payout at line 1250 - **Dealer rules:** dealer draws on 16 or less, stands on 17–21, busts above 21 - **Stand-off:** equal scores result in no money changing hands - **Reshuffle trigger:** when `I>42` (fewer than 10 cards remain), the deck is reshuffled ### Blackjack — Card Display Subroutines Three display routines handle card rendering. Subroutine 4000 prints player cards, advancing column pointer `J` by 5 each call. Subroutine 4100 prints the dealer’s face-down card as a block of `▒` characters. Subroutine 4200 prints dealer face-up cards, advancing `R` and `O`. Subroutine 4300 reveals the dealer’s down card by overwriting the `▒` block with the stored card label `Z$`. Ten-valued cards (stored as “1” in `H$`) are handled specially to print “10” spanning two columns. ### Blackjack — Machine Code Hook Lines 2920–2930 (and equivalently in the rules display at line 2252) use a pattern of `POKE 16625,128` followed by `LET C1=USR 16608` and then `POKE 16625,0`. Address 16625 is the system variable RAMTOP-related area; this sequence calls a machine-code routine at address 16608. The purpose is not defined within the visible BASIC but is consistent with a custom CLS or screen-setup routine patched via the POKE utility at lines 9000–9060. ### Blackjack — Input Handling Most key-wait loops poll `INKEY$` directly without `PAUSE`, using short `FOR/NEXT` delay loops to create a flashing prompt effect. The Enter key is detected as `CHR$ 118`. Bet input uses `INPUT B` with range validation against minimum `MN` and maximum `MN*10`. ### Program 2: Slot Machine — Structure The slot machine is organized as follows: 1. Lines 10–170: initialization, reel string definitions, welcome screen 2. Lines 200, 2000–2295: main screen layout with PLOT-based borders and payoff table 3. Lines 2300–2347: bet input loop 4. Lines 2350–3999: spin subroutine (animation + result evaluation) 5. Lines 6000–6099: win animation (dollar-sign pyramid) 6. Lines 8000–9000: end-of-game summary ### Slot Machine — Reel Encoding Three reels are encoded as 60-character strings `L$`, `M$`, `R$` where each character represents one stop symbol. The symbols and their approximate frequencies on the reels are: | Symbol | Meaning | Approx. count (L$) | | --- | --- | --- | | 7 | Seven (jackpot) | 1 | | T | Top symbol | 1 | | D | Diamond | 2 | | S | Star/Special | 3 | | M | Melon | 4 | | W | Watermelon | 4 | | A | Apple | 5 | | O | Orange | 6 | | B | Bar | 6 | | C | Cherry | 10 | | $ | Padding (positions 1–2) | 2 | ### Slot Machine — Spin Animation For each reel, a random stop position is chosen: `A(N)=INT(RND*53)+1`. The animation then steps a window of three consecutive characters from the reel string, printing them at rows 9, 10, and 11 of the respective column. The loop runs from `K` (start position, clipped to minimum 3) to `A(N)+1`, creating a spinning effect. After the loop, the final payline character is captured: `C$(1)=L$(X)`, `C$(2)=M$(V)`, `C$(3)=R$(Q)` — note that `X`, `V`, and `Q` are the loop variables captured at their post-loop values (one past the final iteration). There is a mixing bug in the middle reel animation: line 2424 prints from `R$` (the right reel string) rather than `M$` for the bottom row, meaning the visual spin for reel 2’s bottom position uses the wrong reel data during animation (though the captured payline value `C$(2)=M$(V)` is correct). ### Slot Machine — Payline Evaluation Lines 3060–3190 evaluate the payline through a cascade of IF statements, each potentially overwriting multiplier `P`. This means later rules can override earlier ones. The ordering is significant: the cherry partial-match rules (lines 3060–3070, paying 2× and 5×) are checked first and can be overridden by the three-cherry rule at line 3190 (paying 10×). The full payoff table: | Combination | Multiplier | | --- | --- | | 7 7 7 | 1000× | | T T T | 100× | | D D D | 60× | | S S S | 50× | | M M M | 35× | | W W W | 30× | | A A A | 20× | | O O O | 20× | | M M A | 20× | | B B A | 18× | | B B B | 14× | | C C C | 10× | | C C (any) | 5× | | C (any) (any) | 2× | ### Slot Machine — Win Animation and Bet Validation On a win, subroutine 6000 displays a growing pyramid of dollar signs then erases it, repeating up to `P` times (capped at 20 by line 6005 to limit animation duration for large wins). Bet validation at lines 2312–2344 compares the string `B$` against “0” and “9999999999” as string comparisons before converting to numeric, which provides basic overflow protection. Bets exceeding the current total `T` or equal to 0 terminate or loop appropriately. ### Shared Patterns and Dead Code Both programs contain an identical machine-code POKE utility at lines 9000–9060/9120: an `INPUT A` / `INPUT B` loop that POKEs value B into address A and increments A, allowing sequential memory patching from BASIC. This is unreachable during normal play and represents a development/debugging aid. Both programs also share the `POKE 16625,128` / `USR 16608` machine-code invocation idiom for their screen setup routines. In the Blackjack program, lines 120–140 (a `FOR/NEXT` loop building a solid-block string) are commented out as REM statements and replaced by the direct assignment at line 145, suggesting an optimization made during development to avoid the loop overhead. ## Source Code ``` 10 REM :-E£RND7)5 ▞4 GOSUB #6 COPYRNDQ 7▌TAB LIST RNDE COPYRND$TAB DIM RNDTAN SLOW# 110 LET X$="" 120 REM FOR I=0 TO 31 130 REM LET X$=X$+"█" 140 REM NEXT I 145 LET Q$="█████████████████████████████" 147 LET X$=Q$ 150 DIM A(13) 160 DIM B(52) 170 DIM H$(52) 180 LET B=0 190 LET W=0 195 LET C$=" " 200 GOSUB 3500 210 GOSUB 2500 220 GOSUB 2900 300 LET C6=2 310 LET X=0 320 LET K=0 330 LET M8=0 340 LET M9=0 350 LET K9=0 360 LET X9=0 370 LET N=13 380 LET J=2 390 LET Q=5 400 LET R=2 410 LET S=0 420 LET D=0 430 LET P=-1 440 LET O=4 500 REM DEAL CARDS 510 LET I=I+1 520 LET K=K+1 530 IF K=1 THEN GOTO 600 540 IF K=2 THEN GOTO 700 550 IF K=3 THEN GOTO 600 560 IF K=4 THEN GOTO 700 570 IF K9=1 THEN GOTO 1600 580 IF X=1 THEN GOTO 1450 590 GOTO 1300 600 REM PLAYER CARD 1 AND 3 610 LET M8=M8+(H$(I)="A") 620 LET S=S+B(I) 630 IF S>21 THEN GOSUB 800 640 GOSUB 4000 650 IF K=1 THEN GOTO 500 660 IF S<10 THEN PRINT AT 19,P+1;S 670 IF S>=10 THEN PRINT AT 19,P;S 680 GOTO 500 700 REM DEALER CARD 2 AND 4 710 LET M9=M9+(H$(I)="A") 720 LET D=D+B(I) 730 IF D>21 THEN GOSUB 900 740 IF K=2 THEN LET Z$=H$(I) 750 IF K=2 THEN GOSUB 4100 760 IF K=2 THEN GOTO 500 770 IF K=4 THEN GOSUB 4200 780 GOTO 1000 800 REM PLAYER ACES 810 LET S=S-10*(M8>0) 820 LET M8=M8-(M8>0) 830 RETURN 900 REM DEALER ACES 910 LET D=D-10*(M9>0) 920 LET M9=M9-(M9>0) 930 RETURN 1000 REM CHECK BLACKJ AND D/DOWN 1010 IF S=21 THEN GOTO 1050 1020 IF D=21 THEN GOTO 1100 1030 IF S=10 OR S=11 THEN GOTO 1150 1040 GOTO 1300 1050 REM PLAYER BLACKJACK 1060 PRINT AT 15,3;"[*]█[B][L][A][C][K][J][A][C][K]█[*]" 1070 LET B=B+B*.5 1080 GOTO 1760 1100 REM DEALER BLACKJACK 1110 GOSUB 4300 1120 PRINT AT 7,3;"[*]█[B][L][A][C][K][J][A][C][K]█[*]" 1130 GOTO 1800 1150 REM DOUBLE DOWN 1160 PRINT AT N+1,J;"[D][O][U][B][L][E]";AT N+2,J+1;"[D][O][W][N]";AT N+4,J+2;"[Y][/][N]" 1170 LET D$=INKEY$ 1180 IF D$="" THEN GOTO 1170 1190 PRINT AT N+1,J;"██████";AT N+2,J+1;"████";AT N+4,J+2;"███" 1200 IF D$="N" THEN GOTO 1300 1210 LET X9=1 1220 LET B=B+B 1230 PRINT AT 1,5;B 1240 GOTO 1350 1250 REM 6 CARD WIN 1260 PRINT AT 15,3;"[*]█[6]█[C][A][R][D]█[B][L][A][C][K][J][A][C][K]█[*]" 1270 LET B=B+B*.5 1280 GOTO 1760 1300 REM HIT ROUTINE 1305 IF C6=6 THEN GOTO 1250 1310 PRINT AT N,J+1;"[H][I][T]";AT N+2,J+2;"[?]";AT N+4,J+1;"[Y][/][N]" 1320 IF INKEY$ ="Y" THEN GOTO 1350 1330 IF INKEY$ ="N" THEN GOTO 1370 1340 GOTO 1320 1350 LET X=1 1355 LET C6=C6+1 1360 GOTO 500 1370 PRINT AT N,J+1;"███";AT N+2,J+2;"█";AT N+4,J+1;"███" 1400 REM DEALER DOWN CARD UP 1405 LET K9=1 1410 GOSUB 4300 1420 IF D>=10 THEN PRINT AT 3,O;D 1430 IF D<10 THEN PRINT AT 3,O+1;D 1435 IF D>16 AND D<22 THEN GOTO 1690 1440 GOTO 500 1450 REM NEXT PLAYER CARDS 1460 LET M8=M8+(H$(I)="A") 1470 LET S=S+B(I) 1480 IF S>21 THEN GOSUB 800 1490 GOSUB 4000 1510 IF S>=10 THEN PRINT AT 19,P;S 1520 IF S<10 THEN PRINT AT 19,P+1;S 1530 IF X9=1 THEN GOTO 1400 1540 IF S=10 OR S=11 THEN GOTO 1150 1550 IF S<21 THEN GOTO 1300 1560 IF S=21 THEN GOTO 1400 1570 PRINT AT 15,3;"[*]█[B][U][S][T][E][D]█[H][A][N][D]█[*]" 1580 GOTO 1810 1600 REM DEALER CARDS 1610 LET M9=M9+(H$(I)="A") 1620 LET D=D+B(I) 1630 IF D>21 THEN GOSUB 900 1640 GOSUB 4200 1650 IF D>16 AND D<22 THEN GOTO 1690 1660 IF D<=16 THEN GOTO 500 1670 IF D>21 THEN PRINT AT 7,3;"[*]█[B][U][S][T][E][D]█[H][A][N][D]█[*]" 1680 GOTO 1750 1690 PRINT AT 7,3;"[=]█[D][E][A][L][E][R]█[S][T][A][N][D][S]█[=]" 1700 REM SCORE COMPARISON 1710 IF S>D THEN GOTO 1750 1720 IF S42 THEN GOTO 2800 1870 PRINT AT 21,19;"PRESS ENTER" 1880 IF INKEY$ =CHR$ 118 THEN GOTO 1970 1890 FOR L=1 TO 5 1900 NEXT L 1910 IF INKEY$ =CHR$ 118 THEN GOTO 1970 1920 PRINT AT 21,19;X$(1 TO 13) 1930 IF INKEY$ =CHR$ 118 THEN GOTO 1970 1940 FOR L=1 TO 5 1950 NEXT L 1960 GOTO 1870 1970 LET B=0 1980 PRINT AT 1,5;"████";AT 1,25;"███████" 1990 PRINT AT 3,2;Q$;AT 5,2;Q$;AT 6,2;Q$;AT 7,2;Q$;AT 8,2;Q$;AT 9,2;Q$ 2000 PRINT AT 13,2;Q$;AT 14,2;Q$;AT 15,2;Q$;AT 16,2;Q$;AT 17,2;Q$;AT 19,2;Q$;AT 21,19;Q$(1 TO 13) 2010 PRINT AT 1,5;B;AT 1,25;W 2020 GOSUB 3210 2030 GOTO 300 2250 REM RULES 2252 LET C1=USR 16608 2255 PRINT AT 0,0;Y$+"[*][*][*]" 2260 PRINT AT 1,6;" BLACKJACK RULES" 2265 PRINT AT 1,0;"[*]";AT 2,0;"[*]";AT 1,31;"[*]";AT 2,31;"[*]" 2270 PRINT AT 3,0;"[*]-DEALER DRAWS WITH 16 0R LESS [*]" 2275 PRINT "[*] AND STANDS WITH 17 0R MORE [*]" 2280 PRINT "[*]-EVEN SCORE IS A STAND OFF [*]" 2290 PRINT "[*]-WITH A SCORE OF 10 OR 11 [*]" 2295 PRINT "[*] PLAYER CAN DOUBLE DOWN [*]" 2300 PRINT "[*]-BLACKJACK OF PLAYER IS PAID [*]" 2305 PRINT "[*] IMMEDIATELY AT 150 PERCENT [*]" 2310 PRINT "[*]-SIX CARDS AND A SCORE OF 21 [*]" 2315 PRINT "[*] OR LESS COUNTS AS BLACKJACK [*]" 2317 PRINT "[*]";AT 12,31;"[*]" 2320 PRINT "[*]-A MINIMUM BET IS ESTABLISHED [*]" 2325 PRINT "[*] AT THE START OF THE GAME [*]" 2330 PRINT "[*]-THIS MINIMUM BET CAN BE [*]" 2335 PRINT "[*] ANYWHERE FROM ""5"" TO ""100"" [*]" 2340 PRINT "[*]-MAXIMUM BET CANNOT BE LARGER [*]" 2345 PRINT "[*] THAN 10 TIMES MINIMUM BET [*]" 2350 PRINT "[*]-TO END GAME ENTER ""0"" BET [*]" 2355 PRINT AT 19,0;"[*]";AT 19,31;"[*]";AT 20,0;"[*]";AT 20,31;"[*]";AT 21,0;"[*][*][*]";AT 21,28;"[*][*][*][*]" 2360 PRINT AT 21,3;"[H][I][T]█[-][E][N][T][E][R][-]█[T][O]█[S][T][A][R][T]█[G][A][M][E]" 2370 IF INKEY$ =CHR$ 118 THEN GOTO 3620 2380 FOR L=1 TO 5 2390 NEXT L 2400 PRINT AT 21,3;"HIT -ENTER- TO START GAME" 2410 IF INKEY$ =CHR$ 118 THEN GOTO 3620 2420 FOR L=1 TO 5 2430 NEXT L 2440 GOTO 2360 2500 REM SHUFFLE CARDS 2510 FAST 2520 FOR I=1 TO 52 2530 LET C=INT (RND*13)+1 2540 LET B(I)=C 2550 LET A(C)=A(C)+1 2560 IF A(C)<5 THEN GOTO 2580 2570 GOTO 2530 2580 LET H$(I)=STR$ B(I) 2590 IF B(I)=11 THEN LET H$(I)="A" 2600 IF B(I)=13 THEN LET H$(I)="K" 2610 IF B(I)=12 THEN LET H$(I)="Q" 2620 IF B(I)=1 THEN LET H$(I)="J" 2630 IF B(I)=13 THEN LET B(I)=10 2640 IF B(I)=12 THEN LET B(I)=10 2650 IF B(I)=1 THEN LET B(I)=10 2660 NEXT I 2670 FOR I=1 TO 13 2680 LET A(I)=0 2690 NEXT I 2700 LET I=0 2710 RETURN 2800 REM RESHUFFLE 2810 IF INKEY$ =CHR$ 118 THEN GOTO 2850 2820 PRINT AT 20,10;"[E][N][D]█[O][F]█[D][E][C][K][.]" 2830 PRINT AT 21,1;"[H][I][T]█[E][N][T][E][R]███[T][O]█[R][E][S][H][U][F][F][L][E]█[C][A][R][D][S]" 2840 GOTO 2810 2850 CLS 2860 LET B=0 2870 GOTO 210 2900 REM BACKGROUND AND LAYOUT 2905 FAST 2910 POKE 16625,128 2920 LET C1=USR 16608 2930 POKE 16625,0 3010 PRINT AT 1,1;"[B][E][T][:]";AT 1,5;B;AT 1,16;"[W][I][N][N][I][N][G][S][:]";AT 1,25;W 3020 PRINT AT 11,2;"[-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-][-]" 3030 PRINT AT 4,1;"[D]";AT 5,1;"[E]";AT 6,1;"[A]";AT 7,1;"[L]";AT 8,1;"[E]";AT 9,1;"[R]" 3040 PRINT AT 12,1;"[P]";AT 13,1;"[L]";AT 14,1;"[A]";AT 15,1;"[Y]";AT 16,1;"[E]";AT 17,1;"[R]" 3210 PRINT AT 14,11;"ENTER BET" 3220 SLOW 3230 INPUT B 3235 IF B=0 THEN GOTO 5000 3240 IF B>=MN AND B<=MN*10 THEN GOTO 3280 3250 PRINT AT 14,10;"[W][R][O][N][G]█[B][E][T][:]";B 3260 PRINT AT 16,9;"[M][I][N][=]";MN;"█[M][A][X][=]";MN*10;AT 18,11;"[R][E][E][N][T][E][R]█[B][E][T]" 3270 GOTO 3230 3280 PRINT AT 14,10;X$(1 TO 19);AT 16,9;X$(1 TO 19);AT 18,11;X$(1 TO 19) 3290 PRINT AT 1,5;B 3300 RETURN 3500 REM INTRODUCTION 3510 LET Y$="[*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*][*]" 3520 LET F$=" " 3530 PRINT AT 3,1;Y$;AT 4,1;"[*]";AT 4,29;"[*]" 3540 PRINT AT 5,1;"[*] WELCOME TO BLACKJACK [*]" 3550 PRINT AT 6,1;"[*]";AT 6,29;"[*]";AT 7,1;Y$ 3560 PRINT AT 9,4;"DO YOU WANT THE RULES ?" 3570 PRINT AT 11,8;"(""Y"" OR ""N"")" 3580 SLOW 3590 IF INKEY$ ="Y" THEN GOTO 2250 3600 IF INKEY$ ="N" THEN GOTO 3620 3610 GOTO 3590 3620 LET C1=USR 16608 3622 PRINT AT 0,0;" " 3630 PRINT AT 4,6;"ENTER MINIMUM BET" 3640 INPUT MN 3650 PRINT AT 4,6;" MINIMUM BET: ";MN;" " 3660 PRINT AT 8,3;F$;AT 10,4;F$;AT 13,6;F$(1 TO 20) 3670 IF MN<5 OR MN>100 THEN GOTO 3820 3680 PRINT AT 7,6;" MAXIMUM BET: ";MN*10 3690 PRINT AT 17,0;"NOTE: DECK WILL BE RESHUFFLED" 3700 PRINT AT 19,6;"IF 9 CARDS OR LESS REMAIN" 3710 PRINT AT 21,6;"BEFORE NEXT DEAL" 3720 IF INKEY$ =CHR$ 118 THEN GOTO 3810 3730 PRINT AT 12,2;"HIT ENTER TO SHUFFLE CARDS" 3740 FOR L=1 TO 5 3750 NEXT L 3760 IF INKEY$ =CHR$ 118 THEN GOTO 3810 3770 PRINT AT 12,2;"[H][I][T]█[E][N][T][E][R]███[T][O]█[S][H][U][F][F][L][E]█[C][A][R][D][S]" 3780 FOR L=1 TO 5 3790 NEXT L 3800 GOTO 3720 3810 RETURN 3820 PRINT AT 8,3;"MINIMUM OF """;MN;""" NOT VALID" 3830 PRINT AT 10,4;"LIMITS ARE ""5"" AND ""100""" 3840 PRINT AT 13,6;"REENTER MINIMUM BET" 3850 GOTO 3640 4000 REM PRINT PLAYER CARDS 4010 PRINT AT N,J;C$;AT N+1,J;C$;AT N+2,J;C$;AT N+3,J;C$;AT N+4,J;C$ 4020 IF H$(I)="1" THEN PRINT AT N,J;"10";AT N+4,J+2;"10" 4030 IF H$(I)<>"1" THEN PRINT AT N,J;H$(I);AT N+4,J+3;H$(I) 4040 LET J=J+5 4050 LET P=P+5 4060 RETURN 4100 REM PRINT DEALER DOWN CARD 4110 LET R$="[▒][▒][▒][▒]" 4120 PRINT AT Q,R;R$;AT Q+1,R;R$;AT Q+2,R;R$;AT Q+3,R;R$;AT Q+4,R;R$ 4130 LET R=R+5 4140 RETURN 4200 REM PRINT DEALER UP CARDS 4210 PRINT AT Q,R;C$;AT Q+1,R;C$;AT Q+2,R;C$;AT Q+3,R;C$;AT Q+4,R;C$ 4220 IF H$(I)="1" THEN PRINT AT Q,R;"10";AT Q+4,R+2;"10" 4230 IF H$(I)<>"1" THEN PRINT AT Q,R;H$(I);AT Q+4,R+3;H$(I) 4240 LET R=R+5 4250 LET O=O+5 4260 IF K=4 THEN GOTO 4290 4270 IF D<10 THEN PRINT AT 3,O+1;D 4280 IF D>=10 THEN PRINT AT 3,O;D 4290 RETURN 4300 REM DEALER DOWN CARD UP 4310 PRINT AT 5,2;C$;AT 6,2;C$;AT 7,2;C$;AT 8,2;C$;AT 9,2;C$ 4320 IF Z$="1" THEN PRINT AT 5,2;"10";AT 9,4;"10" 4330 IF Z$<>"1" THEN PRINT AT 5,2;Z$;AT 9,5;Z$ 4340 RETURN 5000 REM END OF GAME 5005 PRINT AT 14,10;X$(1 TO 19) 5010 IF W>0 THEN PRINT AT 5,5;"GOOD GOING";AT 7,5;"YOU WON ";W;" DOLLARS" 5020 IF W<0 THEN PRINT AT 5,5;"SORRY ABOUT THAT";AT 7,5;"YOU LOST ";ABS W;" DOLLARS" 5030 IF W<0 THEN PRINT AT 9,5;"[N][O][W]█[P][A][Y]█[U][P]█[O][R]█[E][L][S][E]" 5040 IF W=0 THEN PRINT AT 5,5;"OH WELL YOU DID NOT";AT 7,5;"LOSE EITHER....LUCKY" 5050 STOP 9000 REM 9010 INPUT A 9020 INPUT B 9030 PRINT B 9040 POKE A,B 9050 LET A=A+1 9060 GOTO 9020 5 REM :-E£RND7)5 ▞4 GOSUB #6 COPYRNDQ█7▌TAB LIST RNDE COPYRND$TAB DIM RNDTAN [(]# 10 REM "SLOT" 20 LET T=100 22 SLOW 25 DIM A(3) 27 DIM C$(3) 28 GOSUB 1000 30 PRINT AT 10,10;"SLOT MACHINE" 40 PRINT AT 20,2;"HIT ENTER WHEN READY" 50 INPUT Y$ 52 DIM L$(60) 53 DIM M$(60) 54 DIM R$(60) 56 LET L$="$$[W][C][M][O][A][W][C][S][B][M][O][A][C][D][O][W][A][S][C][M][T][B][S][D][B][C][W][A][7][O][M][C][B][O][C][W][D][B][C][O][A][B][M][A][W][C][S][B][A][T][C][B][O]" 58 LET M$="$$[C][W][A][B][M][W][C][S][A][B][T][D][A][C][O][S][B][D][W][C][O][B][M][C][M][O][D][B][C][A][O][B][C][A][O][W][C][M][7][W][C][S][O][A][B][M][W][C][O][B][S][T]" 59 LET R$="$$[C][S][B][O][B][D][C][S][W][A][B][C][M][T][O][C][M][C][O][T][C][M][B][C][A][C][S][D][A][B][7][B][W][B][M][O][D][W][A][C][M][W][S][O][W][B][A][O][C][A][O][W][A]" 60 GOSUB 1000 70 PRINT AT 2,5;"WELCOME" 120 PRINT AT 4,2;"YOU HAVE $100 TO START WITH" 130 PRINT AT 6,2;"MINIMUM BET IS $1" 140 PRINT AT 8,2;"MAXIMUM BET CANNOT EXCEED" 142 PRINT AT 9,2;"TOTAL LEFT" 150 PRINT AT 12,2;"BET 0 TO QUIT" 160 PRINT AT 20,2;"PRESS ENTER WHEN READY" 170 INPUT Q$ 180 FAST 200 GOSUB 2000 1000 REM 1010 POKE 16625,128 1020 LET L1=USR 16608 1099 RETURN 2000 REM 2010 GOSUB 1000 2020 FOR X=38 TO 63 2030 UNPLOT X,40 2040 UNPLOT X,5 2050 NEXT X 2051 FOR N=1 TO 9 2052 PRINT AT 12,N;CHR$ 136 2053 NEXT N 2054 FOR N=9 TO 11 2055 PRINT AT N,1;CHR$ 136 2056 PRINT AT N,9;CHR$ 136 2057 NEXT N 2060 PRINT AT 10,2;CHR$ 136 2062 PRINT AT 9,2;CHR$ 128 2063 PRINT AT 11,2;CHR$ 128 2070 PRINT AT 10,5;CHR$ 136 2072 PRINT AT 9,5;CHR$ 128 2074 PRINT AT 11,5;CHR$ 128 2080 PRINT AT 10,8;CHR$ 136 2082 PRINT AT 9,8;CHR$ 128 2084 PRINT AT 11,8;CHR$ 128 2085 PRINT AT 10,10;"<-PAYLINE" 2090 FOR Y=5 TO 40 2100 UNPLOT 38 ,Y 2120 NEXT Y 2140 PRINT AT 2,22;"PAYOFFS" 2150 PRINT AT 3,20;"[7]█[7]█[7] =1000" 2160 PRINT AT 4,20;"[T]█[T]█[T] = 100" 2170 PRINT AT 5,20;"[D]█[D]█[D] = 60" 2180 PRINT AT 6,20;"[S]█[S]█[S] = 50" 2190 PRINT AT 7,20;"[M]█[M]█[M] = 35" 2200 PRINT AT 8,20;"[W]█[W]█[W] = 30" 2210 PRINT AT 9,20;"[A]█[A]█[A] = 20" 2220 PRINT AT 10,20;"[O]█[O]█[O] = 20" 2230 PRINT AT 11,20;"[M]█[M]█[A] = 20" 2240 PRINT AT 12,20;"[B]█[B]█[A] = 18" 2250 PRINT AT 13,20;"[B]█[B]█[B] = 14" 2260 PRINT AT 14,20;"[C]█[C]█[C] = 10" 2270 PRINT AT 15,20;"[C]█[C]█. = 5" 2280 PRINT AT 16,20;"[C]█. . = 2" 2290 PRINT AT 2,1;"TOTAL LEFT $";T 2292 FOR N=1 TO 9 2293 PRINT AT 8,N;CHR$ 136 2294 NEXT N 2295 SLOW 2300 PRINT AT 20,2;"ENTER BET" 2310 INPUT B$ 2311 PRINT AT 13,4;B$ 2312 IF B$<"0" THEN GOTO 2300 2313 IF B$>"9999999999" THEN GOTO 2300 2314 LET B=VAL B$ 2333 IF B>T THEN GOTO 2300 2340 IF B=0 THEN GOTO 8000 2344 IF B<0 THEN GOTO 2300 2345 GOSUB 2350 2346 PRINT AT 13,4;"███████" 2347 PRINT AT 5,1;"███████████" 2348 GOTO 2300 2350 REM 2360 PRINT AT 20,2;"████████████" 2380 FOR N=1 TO 3 2385 LET A(N)=INT (RND*53)+1 2388 NEXT N 2390 LET K=A(1)-5 2391 IF K<1 THEN LET K=3 2392 IF K>A(1) THEN LET A(1)=A(1)+3 2393 FOR X=K TO (A(1)+1) 2396 PRINT AT 9,2;L$(X+2) 2397 PRINT AT 10,2;L$(X+1) 2399 PRINT AT 11,2;L$(X) 2400 NEXT X 2401 LET K=A(2)-5 2402 IF K<1 THEN LET K=3 2403 LET C$(1)=L$(X) 2405 IF K>A(2) THEN LET A(2)=A(2)+3 2410 FOR V=K TO (A(2)+1) 2420 PRINT AT 9,5;M$(V+2) 2422 PRINT AT 10,5;M$(V+1) 2424 PRINT AT 11,5;R$(V) 2425 NEXT V 2427 LET C$(2)=M$(V) 2430 LET K=A(3)-5 2440 IF K<1 THEN LET K=3 2450 IF K>A(3) THEN LET A(3)=A(3)+3 2500 FOR Q=K TO (A(3)+1) 2520 PRINT AT 9,8;R$(Q+2) 2540 PRINT AT 10,8;R$(Q+1) 2560 PRINT AT 11,8;R$(Q) 2940 NEXT Q 2950 LET C$(3)=R$(Q) 3000 PRINT AT 10,2;C$(1) 3020 PRINT AT 10,5;C$(2) 3040 PRINT AT 10,8;C$(3) 3050 LET P=0 3060 IF C$(1)="[C]" THEN LET P=2 3070 IF C$(1)="[C]" AND C$(2)="[C]" THEN LET P=5 3080 IF C$(1)="[7]" AND C$(2)="[7]" AND C$(3)="[7]" THEN LET P=1000 3090 IF C$(1)="[T]" AND C$(2)="[T]" AND C$(3)="[T]" THEN LET P=100 3100 IF C$(1)="[D]" AND C$(2)="[D]" AND C$(3)="[D]" THEN LET P=60 3110 IF C$(1)="[S]" AND C$(2)="[S]" AND C$(3)="[S]" THEN LET P=50 3120 IF C$(1)="[M]" AND C$(2)="[M]" AND C$(3)="[M]" THEN LET P=35 3130 IF C$(1)="[W]" AND C$(2)="[W]" AND C$(3)="[W]" THEN LET P=30 3140 IF C$(1)="[A]" AND C$(2)="[A]" AND C$(3)="[A]" THEN LET P=20 3150 IF C$(1)="[O]" AND C$(2)="[O]" AND C$(3)="[O]" THEN LET P=20 3160 IF C$(1)="[M]" AND C$(2)="[M]" AND C$(3)="[A]" THEN LET P=20 3170 IF C$(1)="[B]" AND C$(2)="[B]" AND C$(3)="[A]" THEN LET P=18 3180 IF C$(1)="[B]" AND C$(2)="[B]" AND C$(3)="[B]" THEN LET P=14 3190 IF C$(1)="[C]" AND C$(2)="[C]" AND C$(3)="[C]" THEN LET P=10 3200 IF P>0 THEN PRINT AT 5,1;"WIN $";P*B 3220 IF P>0 THEN LET T=T+(P*B) 3225 IF P>0 THEN GOSUB 6000 3230 IF P=0 THEN LET T=T-B 3233 IF T=0 OR T<0 THEN GOTO 8000 3235 PRINT AT 2,1;"TOTAL LEFT $ " 3240 PRINT AT 2,1;"TOTAL LEFT $";T 3999 RETURN 6000 REM 6005 IF P>50 THEN LET P=20 6010 FOR N=1 TO P 6012 PRINT AT 14,4;"$" 6014 PRINT AT 15,3;"$$$" 6016 PRINT AT 16,2;"$$$$$" 6018 PRINT AT 17,1;"$$$$$$$" 6020 PRINT AT 14,4;"█" 6022 PRINT AT 15,3;"███" 6024 PRINT AT 16,2;"█████" 6026 PRINT AT 17,1;"███████" 6030 NEXT N 6099 RETURN 8000 GOSUB 1000 8020 IF T>100 THEN PRINT AT 5,2;"GOOD GOING YOU MADE $";T-100 8040 IF T=0 THEN PRINT AT 5,2;"SEE YA LATER--LOSER" 8045 IF T=0 THEN STOP 8060 IF T<=100 AND T<>0 THEN PRINT AT 5,2;"BETTER LUCK NEXT TIME" 8070 IF T<100 THEN PRINT AT 8,2;"YOU LOST ";100-T;" DOLLARS" 9000 STOP 9005 INPUT A 9010 INPUT B 9011 PRINT B 9012 POKE A,B 9104 LET A=A+1 9120 GOTO 9010 ```