Guardian Procedure Calls Reference Manual
No memory available12
Uncorrectable memory error13
Value of ‘S’ at the time of the trap; it is -1 if the trap occurs in a protected code area (see Considerations)'L'[-3]
Value of ‘P’ at the time of the trap; the ‘P’ value associated with the space ID in ‘L’[-5] completely identifies
the location of the trap
'L'[-2]
Value of the hardware ENV register at the time of the trap'L'[-1]
Value of ‘L’ at the time of the trap'L'[0]
The locations ‘L'[-5] through ‘L'[0] are referred to as trap variables: space ID, trap number, S, P,
ENV, and L, respectively.
The trap handler exits by a call to ARMTRAP with trapstack-addr = 0. The process' registers
at the time that it resumes are set to the values indicated by these ‘L' relative locations:
Reserved'L'[-6]
New value for space index, in bits <11:15>; bits <0:10> are ignored (see Considerations)'L'[-5]
Ignored'L'[-4]
New value for S register'L'[-3]
New value for P register'L'[-2]
New value for hardware ENV register'L'[-1]
New value for L register'L'[0]
New value for R0'L'[1]
New value for R1'L'[2]
New value for R2'L'[3]
New value for R3'L'[4]
New value for R4'L'[5]
New value for R5'L'[6]
New value for R6'L'[7]
New value for R7'L'[8]
Note that parts of ‘L'[-5] and ‘L'[-1] are combined into the new space ID.
Considerations
• Space required for a trap handler
Typically the trapstack-addr value activates the trap handler near the high end of the
process stack. At least 350 words must be available between the trap address value specified
to ARMTRAP and either the last word in the application's data area or ‘G'[32767], whichever
is less. Alternatively, stack space for the trap handler can be allocated among the process
global variables, below the stack.
• Saving the register stack and allocating local data
Upon entry to the application process' trap handler, the stack registers (R0-R7) contain the
values they had at the time of the trap. To save these values, the first statement of the trap
handler must be:
CODE ( PUSH %777 )
This saves the register stack contents. Local storage can then be allocated by adding the
appropriate value to ‘S' through a statement of the form:
CODE ( ADDS num-locals )
ARMTRAP Procedure (Superseded by SIGACTION_INIT_ Procedure) 71