English
Language : 

NSB8 Datasheet, PDF (137/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
ITALIAN TECHNOLOGY
grifo®
for the user. The conversion of program line text into compacted form even extends to REM
statements. REMs which include instances of keywords will take up less memeory space than REMs
of equivalent length which contain no embedded keywords. For example
REM FOR THE NEXT ORIGIN, LET TRY 2000H
will be compacted into a much smaller internal form than
REM 2000H HEX IS THE NEW STARTING PLACE
because the former includes instances of FOR, NEXT, OR, and LET all keywords which will be
compacted to single byte form. The second REM includes no embedded keywords, so will be stored
in exactly the same form as it is written. Spaces are retained in the number and order typed in the
program line to preserve the author’s style and any indentation. Compaction does not occur within
quoted strings.
THE INTERNAL FORM OF A PROGRAM
In RAM and on disk, a program is represented as a series of program llines which have been converted
to the tokenized form mentioned above. Each line is arranged as follows:
a) byte 0:
contains the binary representation of the number of bytes in the program line
(called “N” here for purposes of discussion)
b) bytes 1÷2:
the program-line number expressed as a 16-bit binary integer (low byte/high
byte)
c) bytes up to N-2: the program line in its tokenized form
d) byte N-1:
a carriage return character (byte value 13 or 0DH)
There is a standard endmark (byte value 1) after the last line in the program.
USE OF RAM DURING PROGRAM EXECUTION
When a program is executing, BASIC maintaings two variable size data storage areas at opposite
ends of memory. These are the general data area and the BASIC control stack. The general data area
begins immediately above the last byte in the current BASIC program. This storage area contains
BASIC’s symbol table, and static storage space which has been allocated for numeric variables,
arrays, and strings.The general data area grows from low memory to high memory.
BASIC’s control stack begins at the highest byte available to the BASIC system, and grows
downward, into low memory. The stack contains highly transient information such as FOR NEXT,
GOSUB, and user function call linkages. Whenever program conditions lead to the case that one of
these areas is made to grow into the other, a MEMORY FULL ERROR occurs.
NSB8
Rel. 5.10
Page 125