Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors
reg/load - Load registers
Synopsis
Description
Indirect Addressing
Error Handling
Examples
See Also
Author
reg/load write, read <, write, read ... >
Loads pointers (or indices) 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 taken from the next read argument. read Index to read the pointer from. This pointer will be stored in the register named in the previous write argument. Note that read arguments may only be other registers if they contain a NULL, an object reference, a code pointer, a data segment pointer, a text reference, a raw index, a class definition pointer or an attribute definition pointer. To move other data pointers from one register to another, use reg/move instead.
The reg/load instruction can also be used with indirect addressing for iterating nodes in the nexus and manipulating data tables and text strings. This functionality is discussed in the following manual pages:
reg_load_walker(5) For iterating through the nodes attached to a branch in the nexus. reg_load_segment(5) For iterating through the data available within a data segment. reg_load_table(5) For iterating through the data tables available within a PROSE binary. reg_load_text(5) For processing text or byte string sequences in 32-bit segments.
A runtime error is generated if an object referenced in a read argument does not exist, or if a read argument is a register containing a data type not supported by this operation.
reg/load P0, &[._init] Loads the address of the ._init section into the register P0. reg/load PUSH, P1, P1, [Swan Lake] Pushes current value of register P1 onto the program stack, then sets it to point to the text "Swan Lake".
pal_commands(5), pal_registers(5), pal_indices(5), reg_move(5), reg_type(5),
PROSE Assembly Language at prose.sourceforge.net.
Copyright (c) 2002-2010 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 | reg_load (5) | 13 April 2010 |