--- title: "Humorisq" id: 53865 type: "computer_media" slug: "humorisq" url: "http://localhost/computer_media/humorisq/" markdown_url: "http://localhost/computer_media/humorisq.md" published_at: "2024-05-13T19:05:04+00:00" modified_at: "2026-03-30T21:43:01+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2024/05/SCR-20240623-foxw.png" excerpt: "Test your knowledge of comedy legends by matching last names to first names in this 100-comedian quiz with tiered scoring and retry logic." 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: "TS 2068" slug: "ts2068" taxonomy: "post_tag" url: "http://localhost/tag/ts2068/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Joan Kealy" slug: "joan-kealy" taxonomy: "indiv" url: "http://localhost/indiv/joan-kealy/" genre: - name: "Game" slug: "game" taxonomy: "genre" url: "http://localhost/type/game/" media_contents: - id: 55396 title: "SINCUS Exchange Tape 103 – Potpourri" type: "computer_media" url: "http://localhost/computer_media/sincus-exchange-tape-103-potpourri/" media_type: "Program" programmers: - name: "Joan Kealy" slug: "joan-kealy" taxonomy: "indiv" url: "http://localhost/indiv/joan-kealy/" mediadate: "198x" images: - url: "http://localhost/wp-content/uploads/2024/05/SCR-20240623-foxw.png" - url: "http://localhost/wp-content/uploads/2024/05/SCR-20240623-fovp.png" media_type_tags: "Game" --- # Humorisq This program is a first-name-recall quiz covering 100 comedians from vaudeville, radio, movies, and television, stored as last-name/first-name pairs in DATA statements spanning lines 1000–1900. The player selects a multiple of 10 (up to 100) as the number of questions, and the program uses RESTORE with a calculated offset (`Q=T*10+1000-10`) to resume from the correct DATA position on a retry. Scoring is calculated as a percentage via `GRADE=100-(100/T*G)` and mapped to five tiered feedback messages. The program includes a SAVE routine at line 9998 that writes both the main program and a companion SCREEN$ file named “HR,” which is loaded at startup with a decorative flashing title screen. *** ## Program Analysis ### Program Structure The program is organized into several logical sections: 1. **Lines 5–25:** Initialization, screen setup, and loading of a companion SCREEN$ file (“HR”) with a flashing title display. 2. **Lines 30–34:** Instructions display and question-count input, normalized to multiples of 10. 3. **Lines 35–76:** Main quiz loop — reads a last name, prompts for a first name, reads the correct answer, and evaluates the response. 4. **Lines 80–100:** Post-quiz flow, calling the scoring subroutine and handling replay. 5. **Lines 1000–1905:** DATA blocks containing 100 comedian last/first name pairs, ten comedians per hundred-numbered group. 6. **Lines 8000–8035:** Scoring subroutine computing a percentage grade and printing one of five tiered feedback messages. 7. **Lines 9991–9993:** Closing editorial note printed after play, with a RETURN to the calling flow. 8. **Lines 9995–9999:** Utility lines including a SAVE routine for archiving the program and its SCREEN$ file. ### DATA Organization The 100 comedians are stored as interleaved last-name/first-name string pairs across DATA lines 1000–1900, with exactly 10 comedians (20 DATA items) per hundred-line block. This layout is deliberately chosen to support the retry-with-offset logic. Line 1905 contains a `RESTORE 1000` that resets the DATA pointer after a full run, though in practice the retry path uses a calculated restore point rather than this line directly. | DATA Line | Comedians (last names) | | --- | --- | | 1000 | Abbott, Adams, Alda, Allen, Arden, Ball, Benny, Berle, Berman, Bishop | | 1100 | Bracken, Brenner, Brooks, Bruce, Burnett, Burns, Caesar, Cambridge, Cantor, Carney | | 1200 | Carroll, Carter, Chaplin, Chase, Coca, Cohen, Colonna, Cox, Conway, Cosby | | 1300 | Costello, Dangerfield, Davis, DeLuise, Diller, Durante, Eden, Erwin, Ewell, Fetchit | | 1400 | Fields, Fontaine, Gingold, Gleason, Gobel, Griffin, Hackett, Haley, Hardy, Hawn | | 1500 | Herbert, Hope, Ingels, Kaplan, Keaton, Kelly, King, Klein, Knotts, Korman | | 1600 | Lahr, Langdon, Laurel, Lawrence, Lester, Lewis, Little, Lloyd, Lynde, Martin | | 1700 | Mason, Meara, Morgan, Nabors, Newhart, Oakie, O’Connor, Olsen, Pitts (9 only) | | 1800 | Pryor, Raye, Rickles, Rivers, Rowan, Russell, Sahl, Sellers, Silvers, Skelton | | 1900 | Stang, Storch, Summerville, Tomlin, Turpin, Walker, Wilson, Winters, Worley, Youngman | ### Retry and RESTORE Logic The retry mechanism at line 91 is the most technically interesting part of the program. When the player chooses to try again, the code computes `Q=T*10+1000-10` and calls `RESTORE Q`. Here, `T` is the loop counter from the main quiz `FOR T=1 TO M` loop. After completing `M` questions, `T` equals `M+1` (since `NEXT T` increments past the limit). For example, after answering 10 questions, `T=11`, giving `Q=11*10+1000-10=1100` — which is exactly the DATA line for the next group of comedians. This is an elegant scheme that chains through the DATA blocks in order on successive retries. However, the formula has an off-by-one characteristic: after the first round (`M=10`), `T` will be 11, giving `Q=1100`. The player then picks a new `M` at line 33 and the loop restarts at `T=1`, reading from line 1100. This means subsequent retry rounds correctly advance through the decade blocks. ### Scoring Subroutine The scoring subroutine at line 8000 uses `G` (wrong answers) and `T` (total attempted, as `M+1` after loop exit) to compute `GRADE=100-(100/T*G)`. Because `T` is `M+1` at this point rather than `M`, the divisor is slightly inflated, meaning the grade will be marginally more generous than intended. The five grade bands and their feedback messages are: - **≥80%:** Suggests quitting your job for quiz show money. - **≥70%:** Credits the player for spanning comedic history. - **≥60%:** Compliments humor appreciation. - **≥50%:** “Sharp-witted.” - **<50%:** Humorous jab suggesting a career as a TV evangelist. ### Key BASIC Idioms and Techniques - `VAL "number"` is used extensively in lines 20 and 25 as a memory optimization, storing numeric literals as shorter string tokens rather than full floating-point constants. - The input normalization `LET M=10*INT(M/10)` at line 34 silently rounds any non-multiple-of-10 input down, reinforcing the instruction but without error feedback to the user. - A short ascending BEEP loop (`FOR B=0 TO 50 STEP 5: BEEP A,B: NEXT B`) appears twice (lines 20 and 54) as a fanfare effect with slightly different durations (`A=.05` vs `A=.005`). - The `PRINT AT` and `INVERSE 1` attributes are used at line 55 to highlight the correct answer before revealing whether the player was wrong. ### Anomalies and Bugs - Line 55’s conditional logic has a structural issue: the `NEXT T` for wrong answers is inside the `IF B$<>C$` branch, but there is no `NEXT T` on the correct-answer path until line 76. This means correct answers fall through to line 60 (`LET C=C+1`) and then line 76 (`CLS : NEXT T`), which works correctly — but `C` (the correct-answer counter) is incremented yet never used in scoring; only `G` (wrong answers) feeds the grade formula. - Line 9995 (`PRINT AT 21,8;"PRESS ANY KEY": PAUSE 0: CLS`) is never called from the main program flow, making it dead code. - The DATA block at line 1700 contains only 9 comedians (18 DATA items) rather than 10, meaning the 1700-series block is one comedian short. This would cause a `DATA error` if a player attempts to answer questions 71–80 in a single uninterrupted session, as the READ at the start of question 80 would attempt to cross into the 1800 block prematurely. - The comparison `IF B$<>C$` is case-sensitive. Since the DATA contains uppercase first names and the player types via INPUT (which on this platform produces uppercase by default after line 25’s CAPS lock activation via `POKE 23658,8`), this is generally handled correctly by the POKE at line 25. ### Save/Load Architecture The program uses a two-file save strategy. Line 9998 saves the BASIC program as “HUMORISQ” with `LINE 5` for auto-run, then instructs the user to manually reload the screen and execute line 9999, which saves the current screen display as a SCREEN$ file named “HR.” At startup, line 10 loads this SCREEN$ file to restore the title screen graphic, providing a polished loading experience. ## Source Code ``` 5 INK 9: PAPER 0: BORDER 0: CLS 10 FLASH 1: PRINT "LOADING": PAUSE 90: FLASH 0: LOAD "HR"SCREEN$ 15 LET G=0: LET C=0 20 LET A=VAL ".05": FOR B=VAL "0" TO VAL "50" STEP VAL "5": BEEP A,B: NEXT B 25 POKE VAL "23658",VAL "8": FLASH VAL "1": PRINT AT VAL "7",VAL "8"; INK VAL "6"; PAPER 0;" YOUR CAPS HAVE ";AT VAL "11",VAL "8";" BEEN TURNED ON " 30 INK 9: PAUSE 200: FLASH 0: CLS : PRINT ''"THE OBJECT OF THIS QUIZ IS TO RESPOND TO THE LAST NAME OF A COMEDIAN WITH THE RIGHT FIRST NAME.";''"THESE ARE COMEDIANS FROM VAUDE- VILLE, RADIO, MOVIES, & TV.";''"SOME ARE LEGENDS; SOME ARE COMEDIANS COURTESY OF SITUATION COMEDY--THEY'VE NEVER RAISED A LAUGH WITHOUT A GOOD SCRIPT." 32 PRINT ''"IF YOU HAVE A PHENOMENAL MEMORY,THIS IS THE QUIZ FOR YOU." 33 INPUT "# YOU ARE GAME FOR?(MULTIPLES OF10 ONLY;MAX=100)";M 34 CLS : LET M=10*INT (M/10) 35 FOR T=1 TO M 40 READ A$ 50 PRINT AT 2,2;A$;: INPUT "FIRST NAME? ";C$ 51 PRINT ", ";C$ 53 READ B$ 54 LET A=.005: FOR B=0 TO 50 STEP 5: BEEP A,B: NEXT B 55 PRINT AT 10,10; INK 6; INVERSE 1;B$: PAUSE 90: IF B$<>C$ THEN PRINT ; INVERSE 0;''"YOU GOOFED": BEEP 1,-35: LET G=G+1: PAUSE 60: CLS : NEXT T 60 LET C=C+1 76 CLS : NEXT T 80 GO SUB 8000 90 INPUT "TRY AGAIN? Y/N?";R$: IF R$="" THEN GO TO 90 91 IF R$="Y" THEN LET Q=T*10+1000-10: RESTORE Q: GO TO 33 95 GO SUB 9991 100 STOP 1000 DATA "ABBOTT","BUD","ADAMS","JOEY","ALDA","ALAN","ALLEN","WOODY","ARDEN","EVE","BALL","LUCILLE","BENNY","JACK","BERLE","MILTON","BERMAN","SHELLEY","BISHOP","JOEY" 1100 DATA "BRACKEN","EDDIE","BRENNER","DAVID","BROOKS","MEL","BRUCE", "LENNY","BURNETT","CAROL","BURNS","GEORGE","CAESAR","SID","CAMBRIDGE","GODFREY","CANTOR","EDDIE","CARNEY","ART" 1200 DATA "CARROLL","PAT","CARTER","NELL","CHAPLIN","CHARLIE","CHASE","CHEVY","COCA","IMOGENE","COHEN","MYRON","COLONNA","JERRY","COX","WALLY","CONWAY","TIM","COSBY","BILL" 1300 DATA "COSTELLO","LOU","DANGERFIELD","RODNEY","DAVIS","JOAN","DELUISE","DOM","DILLER","PHYLLIS","DURANTE","JIMMY","EDEN","BARBARA","ERWIN","STUART","EWELL","TOM","FETCHIT","STEPIN" 1400 DATA "FIELDS","TOTIE","FONTAINE","FRANK","GINGOLD","HERMIONE","GLEASON","JACKIE","GOBEL","GEORGE","GRIFFIN","ANDY","HACKETT","BUDDY","HALEY","JACK","HARDY","OLIVER","HAWN","GOLDIE" 1500 DATA "HERBERT","HUGH","HOPE","BOB","INGELS","MARTY","KAPLAN","GABE","KEATON","BUSTER","KELLY","PATSY","KING","ALAN","KLEIN","ROBERT","KNOTTS","DON","KORMAN","HARVEY" 1600 DATA "LAHR","BERT","LANGDON","HARRY","LAUREL","STAN","LAWRENCE","VICKI","LESTER","JERRY","LEWIS","JERRY","LITTLE","RICH","LLOYD","HAROLD","LYNDE","PAUL","MARTIN","STEVE" 1700 DATA "MASON","JACKIE","MEARA","ANNE","MORGAN","HENRY","NABORS","JIM","NEWHART","BOB","OAKIE","JACK","O'CONNOR","CARROLL","OLSEN","OLE","PITTS","ZASU" 1800 DATA "PRYOR","RICHARD","RAYE","MARTHA","RICKLES","DON","RIVERS","JOAN","ROWAN","DAN","RUSSELL","NIPSEY","SAHL","MORT","SELLERS","PETER","SILVERS","PHIL","SKELTON","RED" 1900 DATA "STANG","ARNOLD","STORCH","LARRY","SUMMERVILLE","SLIM","TOMLIN","LILY","TURPIN","BEN","WALKER","NANCY","WILSON","FLIP","WINTERS","JONATHAN","WORLEY","JO ANNE","YOUNGMAN","HENNY" 1905 RESTORE 1000 8000 REM SCORING HERE 8005 LET GRADE=100-(100/T*G) 8010 CLS : PRINT "YOUR ACHIEVEMENT IS ";GRADE;" %" 8015 IF GRADE>=80 THEN PRINT ''"SERIOUSLY,";'"YOU'RE WASTING YOUR TIME; QUIT YOUR JOB & FLY TO COAST FOR BIG BUCKS ON QUIZ SHOWS.": GO TO 90 8020 IF GRADE>=70 THEN PRINT ''"YOU'RE GIFTED; THESE COMEDIANS' CAREERS SPANNED FOUR GENERATIONS& SEVEN DECADES.": GO TO 90 8025 IF GRADE>=60 THEN PRINT ''"VERY GOOD; YOU OBVIOUSLY ENJOY HUMOR. QUITE A QUIPPER YOURSELF?": GO TO 90 8030 IF GRADE>=50 THEN PRINT ''"YOU'RE SHARP-WITTED YOURSELF.": GO TO 90 8035 IF GRADE<50 THEN PRINT ''"YOU HAVE A GREAT FUTURE AS A TV EVANGELIST; YOUR HUMOR IS VERY SUBTLE.": GO TO 90 9991 CLS : PRINT "IF YOU SAID--STEVE ALLEN, FRED ALLEN, W. C. FIELDS--YOU GOT THEOLE FOGHORN." 9992 INK 9: PRINT '"THE INFLEXIBILITY OF COMPUTERS SCARES EDUCATORS; WE NEED MORE ERROR-TRAPPING FOR UNEXPECTED ANSWERS'CAUSE THE DIVERGENT THINKERS ARE THE FUTURE'S INNOVATORS. PLEASE SEND ME A MINI-MOD FOR TRAPPING THESE HONEST NON-MISTAKES WHEN READ- DATA IS CONTROLLING THE INFO FLOW. TO J KEALY, 3334 ZION, B-11, EL PASO, TX,79904." 9993 RETURN 9995 PRINT AT 21,8;"PRESS ANY KEY": PAUSE 0: CLS 9997 STOP 9998 SAVE "HUMORISQ" LINE 5: PRINT "RE-LOAD ""HR""SCREEN$ ";'"WHEN READY, GOTO 9999": STOP 9999 SAVE "HR"SCREEN$ ```