English
Language : 

NSB8 Datasheet, PDF (78/158 Pages) List of Unclassifed Manufacturers – BASIC interpreter for Z80 family
grifo®
ITALIAN TECHNOLOGY
TAB (<numeric expression>)
This function can only be used in a PRINT statement. Use of the TAB function will cause the cursor
or print head of the output device specified in the PRINT statement to advance to the character
position specified as argument to TAB. BASIC accomplishes this by printing the appropriate
number of spaces. The first character position on a line is the 0th position, all others being numbered
sequentially from 0. If the cursor or print-head is past the specified position, when it will not move
at all.
CALL (<numeric expression>)
CALL (<numeric expression>, <numeric expression>)
CALL permits BASIC programs to use machine language subroutines. The value returned is an
integer from 0 to 65535, which represents the value in the HL register pair when the machine
language subroutine returns control to BASIC. The first argument to CALL is a numeric value from
0 to 65535 which represents the decimal value of the memory address where the machine language
subroutine begins. The optional second argument, also an integer value from 0 to 65535, will be
passed to the machine language routine in the DE register pair. For more information on CALL and
the use of machine language subroutines in general, see section MACHINE LANGUAGE
SUBROUTINES.
USER FUNCTIONS
Functions may be written in NSB8 as part of a BASIC program. They are accessible (just as built in
functions are) to any part of the program. These USER FUNCTIONS can return either string or
numeric values, and can accept as many string and/or numeric arguments as are necessary to compute
the function value.
FUNCTION NAMES
User functions take names of the following form: the two letters FN followed immediately by a
regular string or numeric variable name, as in FNX, FNQ7, FNA$, FNZ3$, etc. The type of the
variable name part of the function name determines the type of the value that the function
returns. FNX, therefore, is a numeric user function, while FNA$ returns a string value. Note that user
function names are separate and distinct from variable names. In particular, the values returned by
FNA$ (for example), will not affect the value stored in variable A$, nor will assignment to A$ change
the value that FNA$ returns.
SINGLE LINE FUNCTIONS
A user function can be defined by a single line, or may require many lines to define. For example,
the following is a one line user function:
10 DEF FNR(V,P)=INT((V*10^P)+.5) / (10^P)
FNR, as defined in the DEF statement above, will return as its value V rounded up to the Pth decimal
place. For example, FNR(3.1415,2) makes V stand for 3.1415, and P for 2. The value returned will
be 3.14.
Page 66
NSB8
Rel. 5.10