Showing changes from revision #0 to #1:
Added | Removed | Changed
Entry | |
---|---|
R0 | Flags word contains the action to take: |
Index meaning | |
0 = reboot when detected | |
1 = ignore when detected (ie: don’t pass on) | |
2 = replace the error block pointer with another | |
3 to 255 are reserved | |
Values greater than 255 are assumed to be an address of code to branch to | |
R1 | Error number to add |
R2 | Value to pass in R12 to code (if R0 > 255) or pointer to replacement error block (if R0 = 2 |
Exit | |
---|---|
R0 | Preserved |
R1 | Preserved |
R2 | Preserved |
-
This SWI is used to add an error number to a table of error numbers which TrapError will trap.
If TrapError is on and an error is generated with the code specified in R1, TrapError will do one of the following, depending on the value in R0:
R0 | Meaning |
---|---|
0 | Perform an OS_Reset |
1 | Stop the error message from being passed-on |
2 | Replace the error block pointer with another (in R2) |
3 to 255 | Reserved (do not use) |
>255 | Issue a CallBack to the address in R0 (bits 0 and 1 used for flags) |
All other codes for R0 are reserved and will return an error. If the error number in R1 is already in the list, the action specified in R0 will replace that already defined.
If R0 contains a value greater than 255, it is assumed to be the address of some routine to be called when an error of the specified type is detected. In this case, bits 0 and 1 of R0 contain flags as follows:
Bits 0,1 | Meaning |
---|---|
0 | CallBack to code and pass-on the error as normal |
1 | CallBack to code and don’t pass-on the error |
2 | Reserved (do not use) |
3 | Reserved (do not use) |
When the error R1 is detected, a CallBack to R0 is issued. The code at R0 will be entered when the OS is next idle and threaded out. The processor will be in SVC mode with interrupts disabled. R2 contains the value to be passed in R12 to your code (ie: a private workspace pointer). This register can contain any value and is not checked by TrapError.
Errors: