Index | PAL Intro | Commands | Registers | Indices | Stack | Macros | Classes | Attributes | Errors


Manual Reference Pages  - reg_index (5)

NAME

reg/index - Lookup internal index number

CONTENTS

Synopsis
Description
See Also
Author

SYNOPSIS

reg/index write, &[.codeptr] <, write, &[.codeptr] ... >
reg/index write, &[~dataptr] <, write, &[~dataptr] ... >

DESCRIPTION

Returns in the write registers a raw index number identifying the position of the given code section codeptr or data segment dataptr within their respective data tables. These index numbers can then be used with reg/load indirect addressing to read code or data pointers. See reg_load_table(5).

Note that it is more efficient to supply the codeptr or dataptr arguments by name so that the index can be read directly from the instruction code, rather than supplying them through registers. If supplied by a register, the data tables have to be scanned for the address to convert it back into an index, which is less efficient.

The reg/index instruction takes multiple pairs of arguments.

SEE ALSO

pal_commands(5), pal_registers(5), pal_indices(5), reg_load_table(5),
PROSE Assembly Language at prose.sourceforge.net.

AUTHOR

Copyright (c) 2002-2008 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_index (5) 9 November 2008
Generated by manServer 1.07 from man5/reg_index.5 using man macros.