Basic
USR[number](argument)
Calls a user's assembly-language subroutine identified by
number
and passes
argument
to that subroutine.
The
number
you specify must be the same as the corresponding DEF
USR statement for that routine. Default
=
0.
VAL(string)
Calculates the numerical value of
string.
PRINT VAL("100") PRINT VAL("1234E5")
VARPTR (variable)
VARPTR ([#]buffer)
Returns the offset into BASIC's data segment of a variable or a disk
buffer.
When used with
variable,
VARPTR returns the address of the first
byte of data identified with
variable.
When used with
buffer,
VARPTR returns the address of the file's
control block. The number sign
(#)
is not required.
PRINTVARPTR(3) A=VARPTR(A$)
VARPTR$(variable)
Returns a 3-byte string representing a memory address of a variable:
Byte
0
=
type
Byte
1
=
low
byte of address
Byte
2
=
high
byte
of
address
Type
is
2
for integer variables,
3
for string variables,
4
for single
precision variables, and
8
for double precision variables.
A$
=
VARPTR$(A!)
Tandy
1000 69