Remote-processing CAMBASIC Manual de usuario Pagina 170

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 208
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 169
Commands - 137
VARPTR
Numeric Fun ction
SYNTAX: VARPTR(variable)
PURPOSE: To return the address in RAM of the variable. This command is similar to VARPTR found in other
BASICs. Unlike VARP TR, the address of a string variable is returned directly.
REMARK S: variable is any CAMBASIC variable.
This function may be used to pass data other than single bytes to external machine or assembly
language r outines. It can find uncommitted RAM for tem porar y data stora ge. Use it to transfer da ta
from arrays to Flash or extended memory.
This function returns an integer value that is the address in memory at which the value of a specified
numeric variable or numeric array resides. VAR PTR w ill not return the address of a string array.
This function may be used directly in the PEEK or POKE functions and in the CALL statement for
memory address references.
The form at of the stored CA MBASIC variable values is as follows:
Numbers are first normalized to a standard fractional binary form, with the binary point to the right
of the sign bit of the mantissa, and stored in four bytes.
The least significant byte appears at the lowest addr ess. The first three bytes are the m antissa, with
the sign in the most significant bit of the third byte. A sign bit of “1” designates a negative value.
The fourth byte contains the exponent, in “excess 128” notation (i.e., the value is always positive
and equals the actual binary exponent plus 128). As an exam ple, the hexadecimal string:
LSB Man tissa MSB Exponent
MMMMMMMM MMMMMMMM S.MMMMMMM 1EEEEEEE
Mem Mem+ 1 Mem+ 2 Mem+ 3
The normalized binary notation yields decimal equivalents which may not be obvious. The floating
point numbers ar e shown w ith the LSB on the left. F or more infor mation see “A n Introduction to
Microcomputers, ” V olume 1, by Osborne/M cGraw– Hill.
Scalar (simple) and numeric array variables reside above a program in RAM and are relocated
upward as new program lines are entered.
Strings ar e stored one char acter per byte, with the left– hand char acter fir st. T he addr ess retur ned is
the left– hand character.
Vista de pagina 169
1 2 ... 165 166 167 168 169 170 171 172 173 174 175 ... 207 208

Comentarios a estos manuales

Sin comentarios