Welcome Guest
( Log In | Register )
The time is now 1:32 am
You last visited January 18, 2017, 12:48 am
All times shown are
Eastern Time (GMT-5:00)

3rd Part: "Nostalgia" "Old" Basic Language interpreters, Commodore 64 Basic Interpreter # 1.

Published:

http://download.polytechnic.edu.na/pub4/download.sourceforge.net/pub/sourceforge/c/project/cb/cbmbasic/cbmbasic/1.0/

http://download.polytechnic.edu.na/pub4/download.sourceforge.net/pub/sourceforge/c/project/cb/cbmbasic/cbmbasic/1.0/cbmbasic-1.0-win32.zip

When using this Commodore 64 Basic Interpreter you need to turn "Caps Lock" ON otherwise it will not work, it will just give you:

Syntax Errors.

-------

Type inside the DOS box:

10 DIM N$(20)

20 PRINT "WHAT IS YOUR NAME";
30 INPUT N$
40 PRINT "HELLO, "; N$; "!"
50 END

Then type:
run
then press the "Enter" key.
---------------

    10 PRINT"YOUR NAME": INPUT N$
    20 PRINT"HELLO",N$
---------------
10 PRINT"ENTER A NUMBER": INPUT A
    20 PRINT A
----------------

    10 PRINT"ENTER A WORD": INPUT A$
    20 PRINT A$
------------

    10 PRINT"ENTER A NUMBER": INPUT A
    20 PRINT A "TIMES 5 EQUALS" A*5
------------
10 PRINT"TYPE 2 NUMBERS": INPUT A: INPUT B
------------
  BEFORE CRUNCHING:              AFTER CRUNCHING:

  10 PRINT"HELLO...";            10 PRINT "HELLO...";:FORT=1TO500:NEXT:
  20 FOR T=1 TO 500: NEXT           PRINT"HELLO, AGAIN...":GOTO10
  30 PRINT"HELLO, AGAIN..."
  40 GOTO 10
-----------
As this program is not the real hardware C-64 machine but only a software on a Pc machine it can't run all the C-64 programs.
I guess that for example the Peek and Poke keyword commands don't work and the same will be true for some other
commands that might work on an emulator, but not on this here interpreter.
------------------
100 FOR L = 1 TO 100
    110 IF RND(1) < .5 THEN X=X+1: GOTO 130
    120 Y=Y+1
    130 NEXT L
    140 PRINT "HEADS=" X
    150 PRINT "TAILS= " Y
------------------
Color commands might not work either on this C-64 basic Interpreter so it is not really 100% compatible with the real thing.
------------
Sound Commands would not work either I guess.
-----------
10 FOR B=99 TO 1 STEP -1
20 GOSUB 100
30 T$=T$+" OF BEER ON THE WALL"
40 PRINT T$;", ";T$
50 PRINT "TAKE ONE DOWN AND PASS IT AROUND, "
60 IF B-1<=0 THEN PRINT "NO MORE BOTTLES OF BEER ON THE WALL":GOTO 80
70 GOSUB 200:PRINT " OF BEER ON THE WALL"
80 PRINT:NEXT
91 PRINT "GO TO THE STORE AND BUY SOME MORE, 99 BOTTLES OF BEER ON THE WALL"
92 END
100 T$=STR$(B)+" BOTTLE":IF B>1 THEN T$=T$+"S"
110 RETURN
200 A=B-1:PRINT STR$(A)+" BOTTLE";
210 IF A>1 THEN PRINT "S";
220 RETURN
----------
http://ebookbrowse.com/c64-programmers-reference-guide-02-basic-language-vocabulary-pdf-d47081109
Entry #328

Comments

1.
ToddComment by Todd - April 3, 2011, 8:38 am
I still have my original C-64. Not sure if it would still work though. That machine, plus my VIC-20, were the computers I learned to program creatively on.
2.
Rick GComment by Rick G - April 3, 2011, 10:16 am
I learned on a Timex computer that came out a little before the Commodore 64. The Basic programming language was easy and fun to use. But they lost me at Basic +. Your lines of code bring back fond memories.

You must be a Lottery Post member to post comments to a Blog.

Register for a FREE membership, or if you're already a member please Log In.