100 HOME : VTAB 12: HTAB 4: PRINT "Be Sure The Caps Lock Key Is Down!": VTAB 23: HTAB 8: PRINT "Press Return to Continue";: GET RE$
110 TEXT : HOME : VTAB 9: HTAB 13: PRINT "B L A C K J A C K": VTAB 13: HTAB 13: PRINT "1. Instructions": PRINT : HTAB 13: PRINT "2. Play Game"
120 VTAB 23: HTAB 13: PRINT "Choose Number!";: GET A$
130 IF VAL(A$) <1 OR VAL(A$) >2 THEN PRINT CHR$(7);: GOTO 120
140 IF VAL(A$) = 2 THEN 320
150 HOME : HTAB 10: PRINT "I N S T R U C T I O N S": HTAB 9: PRINT "_________________________": REM 25'_'
160 VTAB 4: PRINT "Blackjack is a one or two player game": PRINT "that pits your gambling skills against": PRINT "those of the 'House' (Dealer)."
170 PRINT : PRINT "The object of the game is to come as": PRINT "close to 21 as possible, without going": PRINT "over, and to beat the House."
180 VTAB 12: PRINT "You can receive up to five cards.": PRINT "In case of a tie, the House wins."
190 VTAB 15: PRINT "Blackjack (a Jack and an Ace) is worth": PRINT "1.5 times your bet rounded down to the": PRINT "nearest dollar.": PRINT
200 PRINT "Five cards under 21 is worth 2 times": PRINT "your bet."
210 VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$: HOME
220 PRINT "The House must take a card on a": PRINT "count of 16 or under, and must stay on": PRINT "a count of 17 or over."
230 PRINT : PRINT "You'll be given $1000 to play with.": HTAB 10: PRINT "(Pretend of course!)": PRINT : PRINT "Your bets must be between $1 and $99": PRINT "and must be whole dollars only."
240 PRINT : PRINT "On your turn you will be prompted to": PRINT "place your bet. If you have made a": PRINT "previous bet, that bet will be shown as": PRINT "the default. To accept your previous"
250 PRINT "bet, just press Return. If you wish": PRINT "to make a different bet, just enter it": PRINT "and press Return."
260 PRINT : PRINT "On your turn you will be given": PRINT "the option of, turn your down card,": PRINT "take a card, double your bet, or split": PRINT "if your cards are of equal value."
270 VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$
280 HOME : PRINT "If you chose to double, your bet": PRINT "will be rededucted and you will be": PRINT "given only one card."
290 PRINT : PRINT "If you chose to split, your bet": PRINT "will be rededucted and you will be": PRINT "dealt an extra hand to play."
300 VTAB 18: HTAB 14: PRINT "GOOD LUCK!"
310 VTAB 24: HTAB 8: PRINT "Press Return to Continue";: GET RE$
320 HOME : VTAB 9: HTAB 10: PRINT "Up to two players may": HTAB 9: PRINT "play against the 'House'."
330 VTAB 14: HTAB 5: PRINT "How many players will be playing?": VTAB 16: HTAB 20: GET PL$: IF VAL(PL$) <1 OR VAL(PL$) >2 THEN VTAB 16: CALL -868: PRINT CHR$(7);: GOTO 330
1970 IF EE >21 THEN VTAB 23: CALL -868: FOR T = 1 TO 1000: NEXT : VTAB 23: HTAB 14: FLASH : PRINT " B U S T E D ": FOR S = 1 TO 10: POKE 2060,1: POKE 2061,10: CALL 2062: NEXT
1980 IF EE >21 THEN FOR T = 1 TO 2000: NEXT : NORMAL : VTAB 23: CALL -868: FOR A = 23 TO 33 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :EE = 0:Y = 0: POP : GOTO 1510
1990 RETURN
2000 IF DD = 11 AND V = 11 THEN V = 1
2010 IF V = 11 THEN DD = 11
2020 IF DD = 11 AND EE +V >21 THEN EE = EE +V -10:DD = 1: RETURN
2030 EE = EE +V: RETURN
2040 IF BB = 11 AND V = 11 THEN V = 1
2050 IF V = 11 AND VA +V >21 THEN V = 1
2060 IF V = 11 THEN BB = 11
2070 IF BB = 11 AND VA +V >21 THEN VA = VA +V -10:BB = 1: RETURN
2080 VA = VA +V: RETURN
2090 IF VA >21 THEN GOSUB 2220
2100 IF VA >21 THEN VA = 0:Y = 0: FOR A = 9 TO 27 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT : POP : GOTO 1510
2110 RETURN
2120 FOR T = 1 TO 1500: NEXT :M1 = M1 + INT( VAL(B1$) *3): GOSUB 3930: VTAB 21: HTAB 12: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
2140 VTAB 23: CALL -868: VTAB 23: HTAB 12: FLASH : PRINT " B L A C K J A C K ": NORMAL : GOSUB 4180: FOR T = 1 TO 2000: NEXT : VTAB 23: CALL -868: GOSUB 3930
2150 VTAB 21: HTAB 12: FLASH : PRINT "$": NORMAL : FOR T = 1 TO 1600: NEXT :M1 = M1 + INT( VAL(B1$) *2.5): VTAB 21: HTAB 12: PRINT "$ ";: HTAB 13: PRINT M1: RETURN
2160 FOR T = 1 TO 1000: NEXT : FOR A = 11 TO 27 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :VA = 0: RETURN
2170 FOR T = 1 TO 1000: NEXT : FOR A = 9 TO 19 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :VA = 0: RETURN
2180 FOR T = 1 TO 1000: NEXT : FOR A = 23 TO 33 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :EE = 0: RETURN
2190 POKE 237,11: POKE 238,25: POKE 239,Y1: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,11: POKE 238,25: CALL 2051: RETURN
2200 POKE 237,23: POKE 238,25: POKE 239,Z1: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,23: POKE 238,25: CALL 2051: RETURN
2210 POKE 237,9: POKE 238,25: POKE 239,Y1: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,9: POKE 238,25: CALL 2051: RETURN
2220 VTAB 23: HTAB 1: CALL -868: FOR T = 1 TO 1000: NEXT : VTAB 23: HTAB 14: FLASH : PRINT " B U S T E D ": FOR S = 1 TO 10: POKE 2060,1: POKE 2061,10: CALL 2062: NEXT
2230 FOR T = 1 TO 2000: NEXT : NORMAL : VTAB 23: CALL -868: RETURN
2240 VTAB 23: CALL -868: VTAB 23: PRINT "You add $";: PRINT VAL(B1$);: PRINT " to your bet - Press Return";: GET RE$: VTAB 23: HTAB 1: CALL -868
3220 VTAB 23: CALL -868: VTAB 23: HTAB 12: FLASH : PRINT " B L A C K J A C K ": NORMAL : GOSUB 4180: FOR T = 1 TO 2000: NEXT : VTAB 23: CALL -868: GOSUB 3940
3230 VTAB 21: HTAB 32: FLASH : PRINT "$": NORMAL : FOR T = 1 TO 1600: NEXT :M2 = M2 + INT( VAL(B2$) *2.5): VTAB 21: HTAB 32: PRINT "$ ";: HTAB 33: PRINT M2: RETURN
3240 FOR T = 1 TO 1000: NEXT : FOR A = 11 TO 27 STEP 2: POKE 237,A: POKE 238,70: CALL 2057: NEXT :VB = 0: RETURN
3250 FOR T = 1 TO 1000: NEXT : FOR A = 9 TO 19 STEP 2: POKE 237,A: POKE 238,70: CALL 2057: NEXT :VB = 0: RETURN
3260 FOR T = 1 TO 1000: NEXT : FOR A = 23 TO 33 STEP 2: POKE 237,A: POKE 238,70: CALL 2057: NEXT :HH = 0: RETURN
3270 POKE 237,11: POKE 238,70: POKE 239,Y2: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,11: POKE 238,70: CALL 2051: RETURN
3280 POKE 237,23: POKE 238,70: POKE 239,Z2: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,23: POKE 238,70: CALL 2051: RETURN
3290 POKE 237,9: POKE 238,70: POKE 239,Y2: CALL 2048: FOR T = 1 TO 1500: NEXT : POKE 237,9: POKE 238,70: CALL 2051: RETURN
3300 VTAB 23: CALL -868: FOR T = 1 TO 1000: NEXT : VTAB 23: HTAB 14: FLASH : PRINT " B U S T E D ": FOR S = 1 TO 10: POKE 2060,1: POKE 2061,10: CALL 2062: NEXT
3310 FOR T = 1 TO 2000: NEXT : NORMAL : VTAB 23: CALL -868: RETURN
3320 VTAB 23: CALL -868: VTAB 23: PRINT "You add $";: PRINT VAL(B2$);: PRINT " to your bet - Press Return";: GET RE$: VTAB 23: CALL -868
3410 IF VA = 0 AND VB = 0 AND EE = 0 AND HH = 0 THEN FOR T = 1 TO 2000: NEXT : FOR A = 11 TO 27 STEP 2: POKE 237,A: POKE 238,115: CALL 2057: NEXT : POP : GOTO 3530
3420 RETURN
3430 IF VC >16 AND VC <22 THEN FOR T = 1 TO 1000: POP : GOTO 3620
3440 FOR T = 1 TO 1000: NEXT : IF VC <17 THEN RETURN
3450 IF LL = 11 AND V = 11 THEN V = 1
3460 IF V = 11 THEN LL = 11
3470 IF LL = 11 AND VC +V >21 THEN VC = VC +V -10:LL = 1: RETURN
3480 VC = VC +V: RETURN
3490 IF VC = >22 THEN VTAB 23: CALL -868: VTAB 23: HTAB 8: FLASH : PRINT " H O U S E B U S T E D ": FOR S = 1 TO 10: POKE 2060,1: POKE 2061,10: CALL 2062: NEXT
3500 IF VC = >22 THEN FOR T = 1 TO 2000: NEXT : NORMAL : VTAB 23: CALL -868
3510 IF VC = >22 THEN VC = 0: FOR A = 11 TO 27 STEP 2: POKE 237,A: POKE 238,115: CALL 2057: NEXT : POP : GOTO 3620
3520 RETURN
3530 IF M1 = 0 THEN GOTO 4270
3540 IF VAL(PL$) = 2 AND M2 = 0 THEN GOTO 4300
3550 VTAB 23: CALL -868: VTAB 23: HTAB 2: PRINT "1. New Hand 2. New Game 3. Quit ";: GET A$
3560 IF VAL(A$) <1 OR VAL(A$) >3 THEN VTAB 23: CALL -868: GOTO 3530
3570 IF VAL(A$) = 1 AND P <15 THEN VTAB 23: CALL -868: POKE 237,35: POKE 238,115: CALL 2057: GOSUB 4100: GOSUB 4160: GOTO 710
3580 IF VAL(A$) = 1 THEN VTAB 23: CALL -868: GOTO 730
3590 IF VAL(A$) = 2 THEN GOTO 110
3600 IF VAL(A$) = 3 THEN VTAB 23: CALL -868: GOSUB 4190
3610 GOTO 3530
3620 FOR T = 1 TO 1500: NEXT : IF VA >0 AND VA <22 AND R = 1 THEN POKE 237,9: POKE 238,25: POKE 239,Y1: CALL 2048: FOR T = 1 TO 500: NEXT
3630 IF VA >0 AND VA <22 AND R = 0 THEN POKE 237,11: POKE 238,25: POKE 239,Y1: CALL 2048: FOR T = 1 TO 500: NEXT
3640 IF EE >0 AND EE <22 THEN POKE 237,23: POKE 238,25: POKE 239,Z1: CALL 2048: FOR T = 1 TO 500: NEXT
3650 IF VB >0 AND VB <22 AND Z = 1 THEN POKE 237,9: POKE 238,70: POKE 239,Y2: CALL 2048: FOR T = 1 TO 500: NEXT
3660 IF VB >0 AND VB <22 AND Z = 0 THEN POKE 237,11: POKE 238,70: POKE 239,Y2: CALL 2048: FOR T = 1 TO 500: NEXT
3670 IF HH >0 AND HH <22 THEN POKE 237,23: POKE 238,70: POKE 239,Z2: CALL 2048: FOR T = 1 TO 1000: NEXT
3680 FOR T = 1 TO 1000: NEXT : IF VA >0 AND VA <22 AND VA >VC AND X = 0 THEN GOSUB 3930
3690 IF VA >0 AND VA <22 AND VA >VC AND X = 0 THEN M1 = M1 + VAL(B1$) *2: VTAB 21: HTAB 12: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3700 IF X = 1 AND VA >0 AND VA <22 AND VA >VC THEN GOSUB 3930
3710 IF X = 1 AND VA >0 AND VA <22 AND VA >VC THEN M1 = M1 + VAL(B1$) *3: VTAB 21: HTAB 12: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3720 IF VA >0 AND VA <22 AND VA >VC THEN VTAB 21: HTAB 12: NORMAL : PRINT "$ ";: HTAB 13: PRINT M1
3730 IF Y = 1 AND VA >0 AND VA <22 AND VA >VC THEN FOR T = 1 TO 500: NEXT : FOR A = 9 TO 19 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :VA = 0
3740 IF EE >0 AND EE <22 AND EE >VC THEN GOSUB 3930
3750 IF EE >0 AND EE <22 AND EE >VC THEN M1 = M1 + VAL(B1$) *2: VTAB 21: HTAB 12: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3760 IF EE >0 AND EE <22 AND EE >VC THEN VTAB 21: HTAB 12: NORMAL : PRINT "$ ";: HTAB 13: PRINT M1
3770 IF Y = 1 AND EE >0 AND EE <22 AND EE >VC THEN FOR T = 1 TO 500: NEXT : FOR A = 23 TO 33 STEP 2: POKE 237,A: POKE 238,25: CALL 2057: NEXT :EE = 0
3780 IF XX = 0 AND VB >0 AND VB <22 AND VB >VC THEN GOSUB 3940
3790 IF XX = 0 AND VB >0 AND VB <22 AND VB >VC THEN M2 = M2 + VAL(B2$) *2: VTAB 21: HTAB 32: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3800 IF XX = 1 AND VB >0 AND VB <22 AND VB >VC THEN GOSUB 3940
3810 IF XX = 1 AND VB >0 AND VB <22 AND VB >VC THEN M2 = M2 + VAL(B2$) *3: VTAB 21: HTAB 32: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3820 IF VB >0 AND VB <22 AND VB >VC THEN VTAB 21: HTAB 32: NORMAL : PRINT "$ ";: HTAB 33: PRINT M2
3830 IF W = 1 AND VB >0 AND VB <22 AND VB >VC THEN FOR T = 1 TO 500: NEXT : FOR A = 9 TO 19 STEP 2: POKE 237,A: POKE 238,70: CALL 2057: NEXT :VB = 0
3840 IF HH >0 AND HH <22 AND HH >VC THEN GOSUB 3940
3850 IF HH >0 AND HH <22 AND HH >VC THEN M2 = M2 + VAL(B2$) *2: VTAB 21: HTAB 32: FLASH : PRINT "$": FOR T = 1 TO 1600: NEXT
3860 IF HH >0 AND HH <22 AND HH >VC THEN VTAB 21: HTAB 32: NORMAL : PRINT "$ ";: HTAB 33: PRINT M2
3870 IF W = 1 AND HH >0 AND HH <22 AND HH >VC THEN FOR T = 1 TO 500: NEXT : FOR A = 23 TO 33 STEP 2: POKE 237,A: POKE 238,70: CALL 2057: NEXT :HH = 0
3880 REM *** ERASE CARDS ***
3890 FOR T = 1 TO 500: NEXT : FOR A = 9 TO 33 STEP 4: POKE 237,A: POKE 238,25: CALL 2057: NEXT
3900 FOR T = 1 TO 500: NEXT : FOR A = 9 TO 33 STEP 4: POKE 237,A: POKE 238,70: CALL 2057: NEXT
3910 FOR T = 1 TO 500: NEXT : FOR A = 11 TO 27 STEP 4: POKE 237,A: POKE 238,115: CALL 2057: NEXT
3920 GOTO 3530
3930 SCALE= 1: ROT= 0: FOR A = 1 TO 12: HCOLOR= 5: DRAW 7 AT 2,55: DRAW 7 AT 1,55: HCOLOR= 4: DRAW 7 AT 2,55: DRAW 7 AT 1,55: NEXT : RETURN
3940 SCALE= 1: ROT= 0: FOR A = 1 TO 12: HCOLOR= 5: DRAW 7 AT 2,100: DRAW 7 AT 1,100: HCOLOR= 4: DRAW 7 AT 2,100: DRAW 7 AT 1,100: NEXT : RETURN
3950 POKE 2060,2: POKE 2061,2: CALL 2062
3960 REM **** RANK CARDS ****
3970 IF D%(P) = 17 OR D%(P) = 33 OR D%(P) = 49 OR D%(P) = 65 THEN V = 11: RETURN
3980 IF D%(P) = 18 OR D%(P) = 34 OR D%(P) = 50 OR D%(P) = 66 THEN V = 2: RETURN
3990 IF D%(P) = 19 OR D%(P) = 35 OR D%(P) = 51 OR D%(P) = 67 THEN V = 3: RETURN
4000 IF D%(P) = 20 OR D%(P) = 36 OR D%(P) = 52 OR D%(P) = 68 THEN V = 4: RETURN
4010 IF D%(P) = 21 OR D%(P) = 37 OR D%(P) = 53 OR D%(P) = 69 THEN V = 5: RETURN
4020 IF D%(P) = 22 OR D%(P) = 38 OR D%(P) = 54 OR D%(P) = 70 THEN V = 6: RETURN
4030 IF D%(P) = 23 OR D%(P) = 39 OR D%(P) = 55 OR D%(P) = 71 THEN V = 7: RETURN
4040 IF D%(P) = 24 OR D%(P) = 40 OR D%(P) = 56 OR D%(P) = 72 THEN V = 8: RETURN
4050 IF D%(P) = 25 OR D%(P) = 41 OR D%(P) = 57 OR D%(P) = 73 THEN V = 9: RETURN
4060 IF D%(P) = 26 OR D%(P) = 42 OR D%(P) = 58 OR D%(P) = 74 OR D%(P) = 27 OR D%(P) = 43 OR D%(P) = 59 OR D%(P) = 75 OR D%(P) = 28 OR D%(P) = 44 THEN V = 10: RETURN
4070 IF D%(P) = 60 OR D%(P) = 76 OR D%(P) = 29 OR D%(P) = 45 OR D%(P) = 61 OR D%(P) = 77 THEN V = 10: RETURN
4080 FOR F = 1 TO 10: POKE 237,35: POKE 238,115: CALL 2057: POKE 237,35: POKE 238,115: CALL 2051: NEXT : RETURN
4090 REM *** SHUFFLE CARDS ***
4100 VTAB 23: HTAB 1: CALL -868: VTAB 23: HTAB 14: PRINT "Shuffling Cards": FOR T = 1 TO 300: NEXT
4110 FOR A = 1 TO 52: POKE 237,19: POKE 238,40 +(30 *( INT(A/2) = A/2)): CALL 2051
4120 B = D%( RND(1) *104 +1):D%( RND(0) *104 +1) = D%( RND(1) *104 +1):D%( RND(0) *104 +1) = B
4270 FOR T = 1 TO 2000: NEXT : TEXT : HOME : VTAB 10: HTAB 13: PRINT "I'm Sorry ";: PRINT N1$: PRINT : HTAB 8: PRINT "You Have Gone Bankrupt!"
4280 IF VAL(PL$) = 2 THEN A = LEN(N2$): IF M2 >1000 THEN VTAB 15: HTAB 14 -A: PRINT N2$" Has Had A Good Day": PRINT : HTAB 13: PRINT "Winning $"M2 -1000: GOTO 4330
4290 IF VAL(PL$) = 2 AND M2 <1000 THEN VTAB 15: HTAB 10 -A: PRINT N2$" Has Not Had A Very Good Day": PRINT : HTAB 13: PRINT "Loosing $"1000 -M2: GOTO 4330
4300 FOR T = 1 TO 2000: NEXT : TEXT : HOME : VTAB 10: HTAB 13: PRINT "I'm Sorry ";: PRINT N2$: PRINT : HTAB 8: PRINT "You Have Gone Bankrupt!"
4310 A = LEN(N1$): IF M1 >1000 THEN VTAB 15: HTAB 14 -A: PRINT N1$" Has Had A Good Day": PRINT : HTAB 13: PRINT "Winning $"M1 -1000: GOTO 4330
4320 IF M1 <1000 THEN VTAB 15: HTAB 10 -A: PRINT N1$" Has Not Had A Very Good Day": PRINT : HTAB 13: PRINT "Loosing $"1000 -M1
4330 VTAB 22: HTAB 8: PRINT "1. New Game 2. Quit": HTAB 13: PRINT "Choose Number!";: GET A$
4340 IF VAL(A$) <1 OR VAL(A$) >2 THEN GOTO 4330
4350 IF VAL(A$) = 2 THEN HOME : PRINT CHR$(4)"RUN A.MENU"