80-Bus News |
May–June 1983 · Volume 2 · Issue 3 |
| Page 34 of 59 |
|---|
The workings of Nascom ROM BASIC Ver 4.7 | PAGE 14 | ||
|---|---|---|---|
DIM routine. Flag “create” variable and join common. | |||
Look for specified variable. Use FORFLG to:– | |||
FRE(X) routine. If X is a numeric expression then return the amount of memory between ARREND and the stack. If X is a string expression then do a “Garbage collection” and return the number of unused bytes in the string area. | |||
POS(X) routine. Return the current cursor position (CURPOS). | |||
DEF FN routine. Define a user defined function. | |||
Call an FN function. Save any previous argument name and value on the stack, Evaluate the function an then restore the previous argument name and value. | |||
If in direct mode then output “?ID Error” else return. | |||
Make sure “FN” follows and flag find FN function definition. | |||
STR$ routine. Convert current numeric value to ASCII and create a temporary string for it. | |||
Save current string in string area. | |||
Make a temporary string. | |||
Print number string at HL. | |||
Print string at HL. | |||
Test if enough string space. If insufficient then GRBAGE collect and test again. If still insufficient space then output “?0S Error”. | |||
Do a “Garbage collection” on string area. | |||
Concatenate two strings (Eg A$+B$). | |||
Get a string routine. | |||
LEN(X$) routine. | |||
ASC(X$) routine. | |||
CHR$(X) routine. | |||
The workings of Nascom ROM BASIC Ver 4.7 | PAGE 15 | ||
|---|---|---|---|
LEFT$(X$,X) routine. | |||
RIGHT$ (X$,X) routine. | |||
MID$(X$,P[,L]) routine. | |||
VAL(X$) routine. | |||
INP(X) routine. Set up port number in work space and call INPSUB skeleton. Return value from port. | |||
OUT P,N routine. Set up port number in work space and call OUTSUB skeleton to output value to the port. | |||
WAIT P,A,X routine. Set up port number in work space. Call INPSUB to get byte, XOR value with X if X is supplied and then AND the value with A. If this value is zero then go back to WAITLP until value is non-zero. | |||
Get next number from code string. | |||
CSAVE routine. If CSAVE* jump to array save routine ARRSV1. Evaluate string expression for name and save program. | |||
CLOAD routine. If CLOAD* jump to array load routine ARRLD1. See if CLOAD? and save status. Evaluate string expression for file name (None given – any file will do) and search for that file. When found load it into memory. | |||
PEEK(X) routine. | |||
POKE A,V routine. | |||
Round number up by adding 0.5 to it. | |||
Add floating point number at HL to the current value in FPREG. | |||
Subtract the current value from the value at HL and leave the result in FPREG. | |||
Subtract FPREG from the value on the stack and leave the result in FPREG. | |||
Subtract FPREG from the value in BCDE and leave the result in FPREG. | |||
Add the value in BCDE to the value in FPREG. | |||
Subtract value in FPREG from value in BCDE. | |||
Normalise value in BCDE. | |||
Add value in FPREG to value in BCDE. | |||
Complement value in BCDE. | |||
NASCOM ROM BASIC dis-assembled is available in ASM and LST file format.
| Page 34 of 59 |
|---|