505B GetTrapReason¶
Stub MON 505B (325 decimal) · Mnemonic GERRCOD · Group: Monitor Calls for Error Handling (manual section 2.8)
Available from: All programs (manual compatibility box)
Emulation source: src/handlers/mon_505B_GetTrapReason.c
Description¶
Gets the error code from the swapper process. This is only relevant to programmed trap handlers. The swapper process starts the trap handler when it detects a fatal error, e.g. address outside segment. Use this monitor call to get the error code.
Notes¶
- The error code may be a file system error or a swapper error.
- You clear the error code when you read it.
Parameters¶
| Name | Type | Direction | Description |
|---|---|---|---|
ErrorCode |
INTEGER | Out | Error code from swapper process. |
Direction: In = the program supplies the value, Out = the call returns it, In/Out = both.
Compatibility¶
| Machines | Users | Programs |
|---|---|---|
| ND-500 | All users | All programs |
The manual's compatibility box for this call, word for word.
Yes/no fields from the YAML extraction (not in the manual's words):
| ND-100 | ND-500 | User programs | RT programs | System programs |
|---|---|---|---|---|
| No | Yes | No | No | No |
Examples¶
From the manual (OCR text, not corrected).
INTEGER : ErrorCode
...
Monitor_Call('GetTrapReason', ErrorCode)
INTEGER ErrorCode
...
Monitor_Call('GetTrapReason', ErrorCode)
ErrorCode : LONGINT;
...
GetTrapReason(ErrorCode);
01 ErrorCode COMP.
...
MONITOR-CALL "GetTrapReason" USING ErrorCode.
ErrorCode : W BLOCK 1
GetTrapReason : EQU 37B9 + 505B
...
CALLG GetTrapReason, 1, ErrorCode
ndmonlib implementation¶
Stub Registered MON_STATUS_NOT_IMPLEMENTED: the handler is a stub. mon_dispatch() in src/core/mon_dispatch.c reports the call as unimplemented without calling it.
| Handler | mon_505B_GetTrapReason |
| Code lines | 5 (non-blank, non-comment lines in the file) |
Source¶
SINTRAN III Monitor Calls (ND-860228.2 EN), page 295.