--- title: "Blackjack (Syntax)" id: 76341 type: "computer_media" slug: "blackjack-syntax" url: "http://localhost/computer_media/blackjack-syntax/" markdown_url: "http://localhost/computer_media/blackjack-syntax.md" published_at: "2026-11-11T08:03:09+00:00" modified_at: "2026-11-11T08:03:09+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/blackjack-syntax-1.png" excerpt: "Twenty-one against the computer dealer on a 1K ZX80." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "ZX80" slug: "zx80" taxonomy: "post_tag" url: "http://localhost/tag/zx80/" model: - name: "Sinclair ZX80" slug: "zx80" taxonomy: "model" url: "http://localhost/model/zx80/" indiv: - name: "Wayne Root" slug: "wayne-root" taxonomy: "indiv" url: "http://localhost/indiv/wayne-root/" genre: - name: "Card Game" slug: "card-game" taxonomy: "genre" url: "http://localhost/type/card-game/" media_type: "Program" programmers: - name: "Wayne Root" slug: "wayne-root" taxonomy: "indiv" url: "http://localhost/indiv/wayne-root/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Blackjack%20%28Syntax%29%20%281982%29%28Root%2C%20Wayne%29%28ZX80%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/blackjack-syntax-1.png" - url: "http://localhost/wp-content/uploads/2026/11/blackjack-syntax-2.png" - url: "http://localhost/wp-content/uploads/2026/11/blackjack-syntax-3.png" article_media: - id: 52502 title: "4K/1K Blackjack" type: "article" url: "http://localhost/article/4k-1k-blackjack/" related_content: - id: 26923 title: "Program Improvements" type: "article" url: "http://localhost/article/program-improvements-10/" media_type_tags: "Card Game" license: false --- # Blackjack (Syntax) Twenty-one against the computer dealer on a 1K ZX80. Your cards are listed on the left and the dealer’s on the right, with the totals underneath; the dealer’s total is hidden until it plays. Press NEWLINE for another card, or SPACE and NEWLINE to stand, and the dealer then draws to 17 and the program prints WIN or LOSE. You can hold at most five cards, and aces always count 11. NEWLINE plays again; SPACE and NEWLINE exits. The listing in SYNTAX explains each line after a semicolon; those notes are left out of the file. As printed, line 670 shows the dealer’s first card (only its total is masked). The March 1982 Program Improvements column gives Clifford Efaw’s changes for the 8K ROM, including 670 PRINT P(Z),CHR$ (15). Published in Syntax January 1982 ([4K/1K Blackjack](https://timexsinclair.com/article/4k-1k-blackjack/)). ## Source Code ``` 10 DIM P(5) 20 DIM C(5) 30 DIM D(10) 40 LET Q=0 50 LET U=0 60 LET V=1 70 FOR J=3 TO 5 80 LET C(J)=0 90 LET P(J)=0 100 NEXT J 110 GO SUB 360 120 GO SUB 500 130 GO SUB 550 140 GO SUB 500 150 GO SUB 550 160 GO TO 200 170 INPUT A$ 180 IF NOT A$="" THEN GO TO 230 190 GO SUB 500 200 IF S>21 THEN GO TO 300 210 IF S=21 THEN GO TO 230 220 GO TO 170 230 LET V=0 240 GO SUB 600 250 GO TO 270 260 GO SUB 550 270 IF T<17 THEN GO TO 260 280 IF T>21 THEN GO TO 340 290 IF T13 THEN GO TO 420 440 IF X>10 THEN LET X=10 450 IF X=1 THEN LET X=11 460 LET D(J)=X 470 NEXT J 480 LET K=0 490 RETURN 500 LET K=K+1 510 LET Q=Q+1 520 LET P(Q)=D(K) 530 GO SUB 600 540 RETURN 550 LET K=K+1 560 LET U=U+1 570 LET C(U)=D(K) 580 GO SUB 600 590 RETURN 600 CLS 610 LET S=0 620 LET T=0 630 FOR Z=1 TO 5 640 IF V=Z THEN GO TO 670 650 PRINT P(Z),C(Z) 660 GO TO 680 670 PRINT P(Z),C(Z) 680 PRINT 690 LET S=S+P(Z) 700 LET T=T+C(Z) 710 NEXT Z 720 IF V=1 THEN GO TO 750 730 PRINT S,T 740 GO TO 760 750 PRINT S,CHR$(15) 760 PRINT 770 RETURN ```