Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language BASIC

(Atari 8Bit)

Date:04/05/10
Author:barrym
URL:n/a
Comments:2
Info:n/a
Score: (2.98 in 47 votes)
1 REM BEER SONG FOR 8-BIT ATARI BASIC
2 REM by barrym 2010-04-04
3 REM THANKS TO Atari800Win PLus 3.1!!
9 GRAPHICS 0:B=99
10 ? :W=1:C=1:GOSUB 40:? ","
15 W=0:C=0:GOSUB 40:IF B=0 THEN 30
20 B=B-1:? "Take one down and pass it
 around,":W=2:GOSUB 40:GOTO 10
30 B=99:? "Go to the store and buy some
 more,":W=3
40 IF B=0 THEN 50
45 IF C=0 THEN ? " ";
47 ? B;:GOTO 60
50 IF C=1 THEN ? "N";
55 IF C=0 THEN ? " n";
57 ? "o more";
60 ? " bottle";:IF B<>1 THEN ? "s";
70 ? " of beer";:IF W>0 THEN ? "on the
 wall";
80 IF W<>1 THEN ? "."
90 IF W<3 THEN RETURN

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
1M. Eric Carr05/27/0512
TRS-80 LEVEL 1barrym04/01/102
trs-80 color computerbarrym06/10/100
TI99/4A EXTENDEDbarrym06/26/100
5Anonymous04/20/052

Comments

>>  barrym said on 05/19/10 04:40:47

barrym Oops! I messed up and submitted one of my sub-optimal versions.
The variable C conveyed redundant information and was eliminated
in the final version. I apologize, and will provide the revised
code to anyone interested enough to ask for it.

>>  barrym said on 08/18/10 04:36:07

barrym Sorry, it was gnawing at me.

1 REM BEER SONG FOR 8-BIT ATARI BASIC
2 REM by barrym 2010-04-04
3 REM THANKS TO Atari800Win PLus 3.1!!
9 GRAPHICS 0:B=99
10 ? :W=-1:GOSUB 40
15 ? ",":GOSUB 40:IF B=0 THEN 30
20 ? "Take one down and pass it around,"
25 B=B-1:GOSUB 40:GOTO 10
30 ? "Go to the store and buy some more,"
35 B=99:W=2
40 IF B=0 THEN 55
45 IF W+1 THEN ? " ";
50 ? B;:GOTO 70
55 IF W<0 THEN ? "N";
60 IF W+1 THEN ? " n";
65 ? "o more";
70 ? " bottle";:IF B-1 THEN ? "s";
75 ? " of beer";
80 IF W THEN ? " on the wall";
85 W=W+1:IF W THEN ? "."
90 IF W<3 THEN RETURN

Now I feel better...

Download Source | Write Comment

Add Comment

Please provide a value for the fields Name, Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.

Please don't post large portions of code here! Use the form to submit new examples or updates instead!

Name:

eMail:

URL:

Security Code:
  
Comment: