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

Avatar Todd -
#1
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.
Avatar Rick G -
#2
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.

Post a Comment

Please Log In

To use this feature you must be logged into your Lottery Post account.

Not a member yet?

If you don't yet have a Lottery Post account, it's simple and free to create one! Just tap the Register button and after a quick process you'll be part of our lottery community.

Register