User`s guide

Macros for Porting from VAX to Alpha or I64
$START_OF_PAGE
$START_OF_PAGE
Converts a virtual address to the address of the first byte within that page.
Format
$START_OF_PAGE source_va, dest_va, user_mask_addr, quad=YES
Parameters
source_va
Source virtual address.
dest_va
Destination of virtual address of first byte within page.
user_mask_addr
Location of application-provided byte-within-page mask. If this argument
is blank, the macro uses MMG$GL_BWP_MASK on an OpenVMS Alpha or
OpenVMS I64 system and MMG$C_VAX_PAGE_SIZE - 1 (defined in $pagedef) on
an OpenVMS VAX system.
quad=YES
If YES, the conversion supports 64-bit addressing. If NO, the conversion does not
support 64-bit addressing.
D.2 Saving and Restoring 64-Bit Registers
Frequently, VAX MACRO source code must save and restore register values,
because that is part of the defined interface or because the code requires work
registers.
On OpenVMS VAX, code can invoke any number of macros to do this. On
OpenVMS Alpha and OpenVMS I64, you cannot simply replace these macros with
64-bit pushes and pops to and from the stack, because there is no guarantee that
the macro caller has a quadword-aligned stack. Instead, you should replace such
macro invocations with $PUSH64 and $POP64 macros. These macros, located in
STARLET.MLB, preserve all 64 bits of a register but use longword references to
do so.
$POP64
Pops the 64-bit value on the top of the stack into a register.
Format
$POP64 reg
D–6 Macros for Porting from VAX to Alpha or I64