Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
var/addr - Address a variable object
Synopsis
Description
Error Handling
Examples
See Also
Author
var/addr write, [name] <, write, [name] ... >
Loads addresses of variable objects into the named registers. The arguments are grouped in pairs of write and read.
write Register to store the next pointer in. The pointer will be determined from the next name argument. name Name of variable to lookup, supplied as a text string. This pointer will be stored in the register named in the previous write argument. Variable objects are located by searching the following locations in order:
local Variables anchored underneath the instance container. These are variables that are local to the current function and which will be unique for each instance of that function. static Variables anchored underneath the current executing object. These are variables that are local to the current function but for which each function instance shares the same value. global Variables anchored underneath the module root. These are variables that have global scope and may be referenced by any function within the module.
A runtime error is generated if the named variable cannot be located.
var/addr P0, [myvar] Loads the address of the myvar variable into the register P0. var/addr PUSH, P0, PUSH, P1 Pushes the addresses of the variables identified in registers P0 and P1 to the program stack.
pal_commands(5), pal_registers(5), pal_indices(5), pal_stack(5), var_def(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2009 Mark R. Bannister <cambridge@users.sourceforge.net>.
This is free software and can be downloaded from prose.sourceforge.net; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
PAL 1.0 | var_addr (5) | 7 October 2009 |