User`s guide

D
Macros for Porting from VAX to Alpha or I64
This appendix describes macros that facilitate the porting of VAX MACRO code to
an OpenVMS Alpha or OpenVMS I64 system. The macros are grouped according
to their function:
• Section D.1, Calculating Page-Size Values
• Section D.2, Saving and Restoring 64-Bit Registers
• Section D.3, Locking Pages into a Working Set
Note that you can use certain arguments to the macros described in this appendix
to indicate register sets. To express a register set, list the registers, separated by
commas, within angle brackets. For instance:
<R1,R2,R3>
If the set contains only one register, omit the angle brackets:
R1
D.1 Calculating Page-Size Values
The following macros provide a standard, architecture-independent means for
calculating page-size dependent values:
• $BYTES_TO_PAGES
• $NEXT_PAGE
• $PAGES_TO_BYTES
• $PREVIOUS_PAGE
• $ROUND_RETADR
• $START_OF_PAGE
These macros reside in the directory SYS$LIBRARY:STARLET.MLB and can be
used by both application code and system code. Because application code does
not have access to SYSTEM_DATA_CELLS, you must supply the relevant masks,
shift values, and so on.
The shift values are correlated with the page size of the processor. The rightshift
values are negative; the leftshift values are positive, as shown in Table D–1.
Macros for Porting from VAX to Alpha or I64 D–1