80-Bus News

  

May–June 1983, Volume 2, Issue 3

Page 29 of 59

The workings of NAS­COM ROM BASIC Ver 4.7

PAGE 4

TMSTPT

10B1

Temporary string pointer.
This contains a pointer into the temporary string pool.

TMSTPL

10B3

Temporary string pool.
This is a store of 4 temporary strings that were created by such things as “LEFTS”,“CHRS” and string concatenation.

TMPSTR

10BF

Temporary string.
This string block for the current string being constructed. All string blocks are four bytes long. The first byte gives the length of the string. The second byte is not used and the third and fourth bytes form the address in memory where the string itself can be found.

STRBOT

10C3

Bottom of string space.
This contains a pointer to the bottom of the string area that is currently being used. Each time a new string is defined it is moved into the string area below this pointer and the pointer is adjusted to point to the new bottom of string area. If there is not enough room for the new string then a “garbage collection” is performed to remove all unused strings. If there still is not enough room then an “?OS Error” occurs.

CUROPR

10C5

Current operator address.
This contains the address of the current operator in EVAL so that the registers may hold other values without using the stack which is being used to hold sub-expressions.

LOOPST

10C7

Loop start address.
This contains the address of first statement in the FOR loop which is being constructed. This address is later moved into the FOR block on the stack.

DATLIN

10C9

DATA statement line number.
This contains the line number of the current position of the DATA statement pointer. It is used by DATSNR to tell the user in which line the bad DATA occurred.

FORFLG

10CB

FOR / FN / array flag.
This contains a flag as to what GETVAR must find.
A value of 00H means find a variable or array element.
A value or 01H means find an array name.
A value of 64H means find a variable only.
A value of 80H means find an FN function.

LSTBIN

10CC

This flag is set when ever any input is made into BUFFER.
RETURN first tests to see if the GOSUB was a direct statement and if so checks this flag, if this flag is set then an INPUT statement has occurred within the subroutine and so as far as RETURN is concerned, BUFFER now contains garbage so it jumps back to command mode.

READFG

10CD

READ / INPUT flag.
This contains a flag to tell the READ/​INPUT routine if it is processing a DATA statement or data for an INPUT statement. If this value is zero then INPUT is active else READ is.

The workings of NAS­COM ROM BASIC Ver 4.7

PAGE 5

BRKLIN

10CB

Break line point.
This contains the address in the line where break occurred. It’s value is saved so that CONT knows where to continue.

NETOPR

10D0

Next operator address.
This contains a pointer into the expression being evaluated by EVAL. It is used to keep track of where it is in the string.

ERRLIN

10D2

Line number of break.
This contains the line number of the line where the break occurred. It is saved so that CONT knows what line it is in.

CONTAD

10D4

Continue address.
This contains the address of the statement where CONT will continue.

******** Values from here on are saved during CSAVE ********

PROGND

10D6

End of program.
This contains the address of the byte after the end of the BASIC program text.

VAREND

10D8

End of variables.
This contains the address of the byte after the last variable.

ARREND

10DA

End of arrays.
This contains the address of the byte after the last array.

NXTDAT

10DC

Next DATA item.
This contains the address of the next item of DATA to be READ.

FNRGNM

10DE

FN argument name.
This contains the name of the argument for the current FN function. If an FN function calls another FN function then this name is saved on the stack.

FNARG

10E0

FN function argument.
This is the floating point value of the the current FN function’s argument. If an FN function calls another FN function then this value is saved on the stack together with the name of the FN argument.

NASCOM ROM BASIC source code is available in ASM and LST file format.

Page 29 of 59