pTAL Conversion Guide

pTAL Built-In Routines
pTAL Conversion Guide527302-002
18-34
$LOCKPAGE
sptbase output
EXTADDR:variable
is the address of the segment-page-table header associated with virtaddr.
$LOCATESPTHDR returns in sptbase the extended memory address of the
segment-page table for the address in virtaddr.
$LOCKPAGE
$LOCKPAGE locks one page of memory.
only-if-locked input
sINT:value
is an INT value. If only-if-locked is greater than or equal to zero, the page
will always be locked. If only-if-locked is less than zero, the page will be
locked (that is, lock-count will be incremented) only if it is already locked.
Figure 18-12. TAL Code Equivalent to $LOCATESPTHDR Routine
STACK headersize, virtaddr;
CODE(ASPT);
STORE sptbase;
Example 18-23. Call to $LOCATESPTHDR Routine
INT headersize;
EXTADDR addr;
EXTADDR seg_page_table_base;
$LOCATESPTHDR(headersize, addr, seg_page_table_base);
Note. The EpTAL compiler does not support this procedure.
pTAL privileged procedure Yes
Can be executed only by privileged procedures Yes
Sets condition code Yes
Sets $CARRY Yes
Sets $OVERFLOW No
,
) ;virtaddr
VST646.vsd
(
$LOCKPAGE
,
only-if-locked lock-count