Beer Party Atari
- Type
- Other
- Category
- Party scoring application
- Author
- Dr. John C. Ferguson
- Published in
- Antic, May 1985 (Vol. 4, No. 1)
- Year
- 1985
- Language
- Atari BASIC
- Requirements
- 16K RAM, Atari BASIC; disk drive recommended (can be run without one)
About the program
Antic's editors were tired of hearing that "the Atari is just a game machine", and just as tired of recipe filers and disk directory programs. So they gave Dr. John C. Ferguson, a marine biology professor at Eckerd College in St. Petersburg, Florida, their "Honorary Antic Unprecedented Application Program of the Year Award" for this one.
Ferguson was hosting a large party for people from work, and he wanted to stop everyone talking shop all evening. His answer was a blind beer tasting. Five pitchers labelled A to E were kept topped up out of sight from cans of popular brands. Each guest tasted all five, then typed their ratings into the Atari. It worked out the average for each beer, saved the running totals to disk and showed a bar chart of the standings. Guests were surprised how quickly the order changed as more votes came in: "it became almost like a horse race". The editors suggested that non-drinkers could rename it "Rootbeer Party Atari".
Typing it in
The screen designs use a few special characters. {inv} … {/inv} means press the Atari (inverse) key before and after. {CTRL-D} and the other control characters mean hold CTRL and press the letter. In the big-text lines (for example line 1060), characters such as #$, '*, %& and [] are drawn as beer steins and glasses by the redefined character set (lines 10000–10200), so type them exactly as shown. Antic printed TYPO II checksums beside each line of the magazine listing. They are not part of the program.
No disk drive? The article says to put REM after the line numbers of lines 110–160 and line 1450. The scores are then kept in memory only.
How to use it
- Put your five brands into lines 1550–1630, in place of Busch, Black Label, Miller, Meister Brau and Pabst Light. Keep a note of which letter is which pitcher.
- RUN it. Answer
Nthe first time to start a new BEERDATA file (an old one is replaced). AnswerYto carry on with saved data, as Ferguson had to after a power cut in the middle of his party. - Each guest rates beers A–E on a scale from 1 (poor) to 9 (fine), entering 5 for any beer they didn't taste, checks the entries and confirms with
Y. Pressing the space bar at the rating screen jumps straight to the results. The totals are saved and the bar chart appears. PressSwhile the chart is showing to see the average scores as numbers.
How it works
- Lines 1030–1055 rewrite the GRAPHICS 0 display list, mixing in lines of the larger GRAPHICS 1 and 2 text. One screen then shows headings, glasses and ordinary text in three sizes.
- Before each
PRINT #6, location 87 (the OS's record of the current graphics mode) is POKEd, so the OS formats output for the large-text lines (line 1060). - After every guest, line 1450 writes the five running totals and the number of voters to
D:BEERDATA, so a crash loses nothing.
Listing
10 REM BEER PARTY ATARI
20 REM BY DR. JOHN FERGUSON
30 REM ANTIC MAGAZINE
50 DIM S$(10)
100 CLOSE #1:OPEN #1,4,0,"K:":REM OPEN KEYBOARD FOR INPUT
110 GRAPHICS 0:? :? :? "DO YOU WANT TO ADD TO A PREVIOUS FILE":? :? :? "(Y/N)? ";
120 GET #1,K:IF K<>89 THEN BA=0:BB=0:BC=0:BD=0:BE=0:N=0:GOTO 1000
130 ? :? :? :? :? "MAKE SURE 'BEERDATA' IS IN DRIVE AND PRESS ANY KEY.":? :? :?
140 GET #1,K
150 CLOSE #2:OPEN #2,4,0,"D:BEERDATA"
160 INPUT #2;BA,BB,BC,BD,BE,NUM:CLOSE #2:REM RETRIEVE OLD DATA
1000 GRAPHICS 8:REM CLEAR MEMORY
1010 GOSUB 10010:REM CHANGE CHARACTER SET
1015 GRAPHICS 0:POKE 709,136:POKE 710,2:POKE 712,2:POKE 752,1:REM SET COLORS AND BLANK CURSOR
1020 POKE 756,CHSET/256
1030 DL=PEEK(560)+256*PEEK(561):REM CUSTOMIZE DISPLAY LIST
1040 FOR N=6 TO 9:POKE DL+N,7:NEXT N
1050 POKE DL+10,6:POKE DL+11,8:POKE DL+3,66+7:POKE DL+21,6:POKE DL+22,6
1055 POKE DL+27,65:POKE DL+28,PEEK(560):POKE DL+29,PEEK(561)
1057 POKE 82,0:POSITION 0,0:REM SET FIRST SCREEN
1060 POKE 87,2:? #6," {inv}beer{/inv} #$ '* %& {inv}sampling{/inv} []"
1070 ? #6," rate beers 1 to 9"
1080 POKE 87,0:POSITION 4,4
1110 ? "Poor Average Fine"
1120 ? " {CTRL-Q}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-R}{CTRL-E}"
1130 ? " 1 2 3 4 5 6 7 8 9":?
1140 ? " (Enter +5+ if not tasted)"
1150 POKE 85,2:POSITION 14,12:? #6,"BEER +{inv}a{/inv}+ - ?"
1160 ? :? :? :? " (Push spacebar to see results)"
1170 GOSUB 2010
1200 GOSUB 2110:A=K-48:POSITION 30,12:? "{inv}b{/inv}":GOSUB 2010
1210 GOSUB 2110:B=K-48:POSITION 30,12:? "{inv}c{/inv}":GOSUB 2010
1220 GOSUB 2110:C=K-48:POSITION 30,12:? "{inv}d{/inv}":GOSUB 2010
1230 GOSUB 2110:D=K-48:POSITION 30,12:? "{inv}e{/inv}":GOSUB 2010
1240 GOSUB 2110:E=K-48
1300 REM * SET SECOND SCREEN
1305 ? "{CLEAR}":POSITION 0,0
1310 POKE 87,2:? #6," sampled #$ '* %& beers []"
1315 ? #6," YOUR RATINGS ARE:"
1320 POKE 87,0:POSITION 0,3
1330 ? " BEER +A+ = ";A;" ":?
1340 ? " BEER +B+ = ";B;" ":?
1360 ? " BEER +C+ = ";C;" ":?
1380 ? " BEER +D+ = ";D;" ":?
1400 ? " BEER +E+ = ";E;" ":?
1410 POKE 85,2:POSITION 11,12:? #6," CORRECT? ({inv}y{/inv}:{inv}n{/inv})"
1430 GET #1,K:IF K<>89 THEN 1015
1440 BA=BA+A:BB=BB+B:BC=BC+C:BD=BD+D:BE=BE+E:NUM=NUM+1
1450 CLOSE #2:OPEN #2,8,0,"D:BEERDATA":? #2,BA:? #2,BB:? #2,BC:? #2,BD:? #2,BE:? #2,NUM:CLOSE #2:REM SAVE DATA
1500 REM SET THIRD SCREEN
1510 POKE DL+21,2:POKE DL+22,2:? "{CLEAR}":POSITION 0,0
1520 POKE 87,2:? #6," {inv}taste{/inv} #$ '* %& {inv}results{/inv} []"
1530 ? #6," N = ";NUM
1540 POKE 87,0:POKE 82,0:POSITION 0,3
1550 ? "BUSCH {CTRL-D}";:L=BB:GOSUB 2205:REM BEER B
1560 ? " |"
1570 ? "BLACK LABEL {CTRL-D}";:L=BD:GOSUB 2205:REM BEER D
1580 ? " |"
1590 ? "MILLER {CTRL-D}";:L=BE:GOSUB 2205:REM BEER E
1600 ? " |"
1610 ? "MEISTER BRAU {CTRL-D}";:L=BA:GOSUB 2205:REM BEER A
1620 ? " |"
1630 ? "PABST LIGHT {CTRL-D}";:L=BC:GOSUB 2205:REM BEER C
1640 ? " {CTRL-Z}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-W}{CTRL-R}{CTRL-R}{CTRL-E}"
1650 ? " 1 2 3 4 5 6 7 8 9"
1670 ? " Average Score"
1680 ? :? :? " (Press spacebar to enter data)"
1700 GET #1,K:IF K<>83 THEN 1015
1800 REM SHOW SCORE ROUTINE
1810 TRAP 40000:TRAP 1510
1820 L=BB:POSITION 33,3:GOSUB 2310
1830 L=BD:POSITION 33,5:GOSUB 2310
1840 L=BE:POSITION 33,7:GOSUB 2310
1850 L=BA:POSITION 33,9:GOSUB 2310
1860 L=BC:POSITION 33,11:GOSUB 2310
1870 GOTO 1700
2000 REM GET KEY SUBROUTINE
2010 GET #1,K:IF K=32 THEN POP :GOTO 1500
2020 IF K<49 OR K>57 THEN ? CHR$(253):GOTO 2010
2030 RETURN
2100 REM ENTER DATA SUBROUTINE
2110 POSITION 35,12:? K-48:SOUND 0,40,10,14:FOR T=1 TO 50:NEXT T:SOUND 0,0,0,0:POSITION 35,12:? "?":RETURN
2200 REM GRAPHING SUBROUTINE
2205 IF NUM=0 THEN ? :RETURN
2210 LE=INT((L/NUM)*3)
2220 IF LE=3 THEN ? "!":RETURN
2230 FOR N=4 TO LE:? "!";:NEXT N:? "!":RETURN
2300 REM SCORE FORMAT SUBROUTINE
2310 ? "(";
2320 LE=(L/NUM)+5E-03
2330 S$=STR$(LE)
2340 IF LEN(S$)>3 THEN ? S$(1,4);:GOTO 2390
2350 IF LEN(S$)=3 THEN ? S$;"0";
2360 IF LEN(S$)=1 THEN ? S$;".00";
2390 ? ")":RETURN
10000 REM CHARACTER SET SUBROUTINE
10010 POKE 106,PEEK(106)-5:GRAPHICS 0:CHSET=(PEEK(106)+1)*256:? :? "ONE MOMENT; ALTERING CHARACTER SET"
10015 CHI=CHSET/256:CLO=0:POKE 203,CLO:POKE 204,CHI
10020 DIM XFR$(28):RESTORE 10030:FOR N=1 TO 28:READ ML:XFR$(N,N)=CHR$(ML):NEXT N
10030 DATA 104,169,0,133,205,168,169,224,133,206,177,205,145,203,200,208
10040 DATA 249,230,204,230,206,165,206,201,228,208,239,96
10050 XFR=USR(ADR(XFR$))
10060 RESTORE 10100
10070 READ A:IF A=-1 THEN RETURN
10080 FOR Z=0 TO 7:READ J:POKE CHSET+A*8+Z,J:NEXT Z
10090 GOTO 10070
10100 DATA 1,124,124,56,56,56,16,16,56
10110 DATA 3,127,64,64,64,64,64,127,127
10120 DATA 4,224,32,62,35,33,33,225,225
10130 DATA 5,127,127,127,127,127,127,127,255
10140 DATA 6,225,254,224,224,224,224,224,240
10150 DATA 7,31,16,16,8,15,15,15,7
10160 DATA 10,240,16,16,32,224,224,224,192
10170 DATA 11,36,36,36,0,0,0,0,0
10180 DATA 59,7,7,3,3,3,1,1,31
10190 DATA 61,192,192,128,128,128,0,0,240
10200 DATA -1
Download
The original program from the Antic disk, to LOAD or ENTER instead of typing it: BEER.BAS.
Credits
- Program listing: Beer Party Atari — program listing (Antic, May 1985 (Vol. 4, No. 1)) — Dr. John C. Ferguson
- Picture: The ratings screen, with the custom beer-glass characters. — Dr. John C. Ferguson (program); screenshot by the site
- Antic, May 1985 - Vol. 4 No. 1: scan of the printed magazine, PDF pages 43-44 (article) — Internet Archive, 1985
- Antic disk, May 1985 - Vol. 4 No. 1: BEER.BAS (detokenized listing) — Dr. John C. Ferguson, 1985
