8th Part: "Nostalgia" "Old" Basic Language interpreters, Commodore 64 Basic Interpreter # 1.

Published:

Updated:

Well, by now we have already seen some of the PRINT keyword.

Data can be PRINTed into standard columns, there being in the screen 4 such of them, at the very least on a Commodore 64.

Data items can be printed near each other.

Data can be printed a given number of spaces apart, you tell the computer how many spaces apart to print them.

You can also print data at TAB settings.

On the Commodore you can also print reversed characters their colors will be reversed.

In Commodore BASIC you can also print cursor movements so that the program is able to move the curson to particular point on the screen before you PRINT.

With the PRINT command you can also Clear the screen.

On a Commodore 64 to clear the screen you hold down the Shift and then press  the CLR/Home key, the same kind be done in a program with line numbers:

10 PRINT "SHIFT CLR/HOME"

If there was something on the screen from before, it would be cleared after doing this.

----------------
There are some Commodore characters that can't be printed on a Windows Pc unless a Commodore emulator or something like it is used.
------------------

There are many Commodore characters that can be PRINTed using the PRINT keyword, but not on a Windows Pc, unless a special program like an emulator is used.

That makes it very hard or impossible to show a lot of Commodore programming, in a regular way or maybe in any way.

----------------------
To show how to print on standard columns try this:

10 PRINT "SHIFT CLR/HOME"
20 PRINT 5,6,7,8
30 PRINT 1,7,6,4
40 PRINT 4,3,1,20

I guess that I will now try that on the DOS interpreter, but only lines 20 to 40 as the Pc's keyboard and the interpreter can't handle line # 10.

This is what I got:

    **** COMMODORE 64 BASIC V2 ****

 64K RAM SYSTEM  38911 BASIC BYTES FREE

READY.
20 PRINT 5,6,7,8
30 PRINT 1,7,6,4
40 PRINT 4,3,1,20
RUN
 5            6            7            8
 1            7            6            4
 4            3            1            20

READY.
------------------
Very nice, it worked O.K.
I already showed you how to copy and paste to and also from on a DOS box, Do you remember how?
If you don't remember go back to the beginning of this new thread here on BASIC programming and reread 'till you find the info there, it is very easy to do and saves a lot of time.
---------------

A Commodore 64 can print up to 40 character on each line so the 40 characters are divided into the 4 standard PRINT columns.

Each column is 10 charcters long.

Column 1 starts at position 1
Column 2 Starts at position 11
Column 3 starts at position 21
Column 4 starts at position 31

As seen from before use PRINT and put a comma between the data that you want printed.

Try:
PRINT 1
-------
PRINT 1,2
----------
PRINT 1,2,3
-----------
PRINT 1,2,3,4
--------
You can use any kind of data I guess such as

PRINT "HOUSE"
------
PRINT "HOUSE","CAR"
--------
Etc.
------------
To PRINT values of Numeric Variable you might try this:

10 W=10:X=15:Y=20:Z=25
20 PRINT W,X,Y,Z
-----------
For String Variables:

10 A$="HAT":B$="COAT":c$="GLOVES"
20 PRINT A$,B$,C$
----------
Numeric and string variables can be mixed:

10 N=5:A$="GIRLS"
20 PRINT "THERE ARE",N,A$
-------
If you try to print more than 4 columns the rest will show-up on the next line, try to print more than 4 and you will see.
-----
Take your time and try to RUN all the examples given, it is easier to learn in that way.
---------------
The longest single number that you can print in a standard columns is 7 digits such as 1234567.
-------
The longest single string that can be printed on a column is 9 characters long such as ABCDEFGHI.
-----------
This is a long lesson the rest will be posted little by little in parts.
------------

Entry #335

Comments

This Blog entry currently has no comments.

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