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

(TRS-80 LEVEL 1)

Date:04/01/10
Author:barrym
URL:n/a
Comments:2
Info:n/a
Score: (3.00 in 29 votes)
1 REM BEER SONG FOR TRS-80 LEVEL 1 BASIC BY BARRYM 2010-03-31
2 REM THANKS TO JEFF VAVASOUR FOR HIS EXCELLENT SIMULATOR!
9 B=99
10 P.:W=1:GOS.40:P.",";:W=0:GOS.40:B=B-1:W=2
20 IFB>-1T.P." TAKE ONE DOWN AND PASS IT AROUND,":GOS.40:G.10
30 B=99:P." GO TO THE STORE AND BUY SOME MORE,":W=3
40 IFB>0T.P.B;:G.60
50 P." NO MORE ";
60 P."BOTTLE";:IFB<>1T.P."S";
70 P." OF BEER";:IFW>0T.P." ON THE WALL";
80 IFW<>1T.P."."
90 IFW<3T.RET.

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
Atari 8Bitbarrym04/05/102
2M. Eric Carr05/27/0512
trs-80 color computerbarrym06/10/100
TI99/4A EXTENDEDbarrym06/26/100
5Anonymous04/20/052

Comments

>>  barrym said on 07/17/10 05:25:24

barrym I'm sorry that the output doesn't exactly match the reference lyrics, but my code was
limited by the hardware (upper-case, 64 column) :-)

>>  barrym said on 07/27/10 08:18:37

barrym I suddenly remembered that Level 1 basic doesn't require the 'THEN' in 'IF...THEN',
so I removed all of the 'T.'s and it still works fine. By the way, the compacted
source code is reminiscent of most programs from the Level 1 era because of limited
RAM (usually 4k). Execution speed could also be noticeably improved by using
abbreviations for the keywords and eliminating unnecessary spaces from the program,
because Level 1 didn't tokenize :-)

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: