Skip to Content

Program Storage in Memory

The program is stored in memory in the format shown below. The first program line commences at PAGE.

L.lengthLSBMSBtoken:token&0D
Line NoReserved Word Tokens
Program LineCR
L.lengthLSBMSBtoken:token&0D
Line NoReserved Word Tokens
Program LineCR
L.lengthLSBMSBtoken:token&0D
Line NoReserved Word Tokens
Program LineCR

Line Length

The line length includes the line length byte. The address of the start of the next line is found by adding the line length to the address of the start of the current line. The end of the program is indicated by a line length of zero and a line number of &FFFF.

Line Number

The line number is stored in two bytes, LSB first. The end of the program is indicated by a line number of &FFFF and a line length of zero.

Statements

With the exception of the symbols ’*’, ’=’ and ’[’ and the optional reserved word LET, each statement in the line commences with the appropriate reserved word token. Reserved words are tokenised wherever they occur. A token is indicated by bit 7 of the byte being set. Statements within a line are separated by colons.

Line Terminator

Each program line (except the last) is terminated by a carriage-return (&0D).

Last updated on