WRENT
Input Parameters: r16(a0) = VA system entry point
r17(a1) = system entry point selector
Output Parameters: None
Side Effects: Registers t0, t8..t11, a0 and a1 are unpredictable upon return
This PAL code call WRites a system ENTry address. If takes two arguments which are stored in r16 (a0) and r17 (a1). The first (a0) stores the address to be written and the second (a1) defines which address is written. The table of values for (a1) and their corresponding meanings are listed below:
|
|
Address Written |
|
|
Interrupt address |
|
|
Arithmetic trap |
|
|
Memory management fault |
|
|
Instruction fault |
|
|
Unaligned fault |
|
|
System call entry |
|
|
(Kernel debugger entry) |
For example the interrupt handler installation routine loads r16(a0) with the address of the interrupt handler and loads r17(a1) with the value "0" before calling the WRENT PAL code. The code that performs this is shown below. Please note that in order to use this code the file "osf.h" must be included. Also note that the PAL code is called using the name "PAL_WRENT_ENTRY".
lda a0,inthand /* load a0 with
address of interrupt routine */
lda a1,0(zero) /* load a1 with
0 to choose interrupt call */
call_pall PAL_WRENT_ENTRY /*
call PAL routine */
The interrupt routine is called "inthand". The a1 register is set to zero by loading it with address "0" rather than using a literal data value.