Showing changes from revision #5 to #6:
Added | Removed | Changed
Entry | |
---|---|
R0 | Workspace pointer |
The buffer contains the following:
+0 | PC at which the error occurred |
+4 | Error number |
+8 | Error message text |
Called by the default claimant of ErrorV when an error occurs. It should restore all handlers to their original values and then call OS_GenerateError to pass the error to the previous handler.
This handler is entered in USER mode with the workspace pointer in R0, as opposed to the conventional R12.
The block should allow for up to 260 bytes, 4 for the erroring program counter plus 256 for a standard RISC OS error block. Note that the printed PRM is vague in specifying a “256 byte error buffer”, currently the kernel truncates any error message text to 252 bytes, totalling 4 + 4 + 252 in the worst case.
R13 may be undefined, either avoid the use of R13 in the handler or provide your own stack space.