MON: Difference between revisions
(MON instruction) |
m (Typo: 256->255) |
||
(One intermediate revision by the same user not shown) | |||
Line 16: | Line 16: | ||
Other monitor calls, for example those with no error state like 153 113<sub><small>8</small></sub> (''MON CLOCK''), have no skip return. | Other monitor calls, for example those with no error state like 153 113<sub><small>8</small></sub> (''MON CLOCK''), have no skip return. | ||
The instruction causes an internal interrupt to program level 14 | ==== MON handling in SINTRAN-III ==== | ||
The instruction causes an internal ''Monitor Call'' interrupt (bit 1 in the [[IIC register|Internal Interrupt Code register]] <ref>{{ND-doc|06.014.02}} page 2-17</ref> <ref>{{ND-doc|06.015.02}} page 2-39</ref>) to program level 14. It differs from other internal interrupt sources in that the monitor call or <number> is found in the [[T register]] on level 14. The <number> value is the lower 8 bits of the instruction. The value in the T register is sign-extended. | |||
The 8 bit wide <number> limits the possible ND-100 monitor calls to the range 0 to maximum | In SINTRAN-III version L at least, the interrupt number is not used for detecting that the interrupt was caused by a monitor call, instead the sign-extension of the T register is used a method to detect that the T register was set, which would only happen if the interrupt was caused by a MON instruction. The lower 8 bits of the T register (the original <number>) is used to call the correct system function through a look-up table.<ref>SIN-L STD A listing part two, March 1989</ref> | ||
==== Number of Monitor Calls ==== | |||
The 8 bit wide <number> limits the possible ND-100 monitor calls to the range 0 to maximum 255, or 377<sub><small>8</small></sub> | |||
The various monitor calls are documented in {{ND-doc|60.228.1}}. | The various monitor calls are documented in {{ND-doc|60.228.1}}. |
Latest revision as of 13:31, 7 August 2010
MON | |
---|---|
Description | Monitor Call |
Format | MON <number> |
Code | 153 0008 |
Affected | Various |
Type | User |
Architecture | ND-100, ND-110 |
MON is an assembly instruction.
The instruction is used for monitor calls. A "monitor call" is equivalent to a syscall in Unix. Depending on the specific monitor call, various registers may be loaded with call-specific values before the MON instruction is called, and return values may be retrieved from registers after the call. Parameters and data may also be stored and retrieved from memory addresses.
Some monitor calls will cause the program counter to be incremented by two instead of one (a "skip return") if the monitor call succeded, and by one in case of error. For such monitor calls the instruction immediately following MON will typically be a jump instruction to an error handler, while the next one after that is the instruction to execute in case of success.
Other monitor calls, for example those with no error state like 153 1138 (MON CLOCK), have no skip return.
MON handling in SINTRAN-III
The instruction causes an internal Monitor Call interrupt (bit 1 in the Internal Interrupt Code register [1] [2]) to program level 14. It differs from other internal interrupt sources in that the monitor call or <number> is found in the T register on level 14. The <number> value is the lower 8 bits of the instruction. The value in the T register is sign-extended.
In SINTRAN-III version L at least, the interrupt number is not used for detecting that the interrupt was caused by a monitor call, instead the sign-extension of the T register is used a method to detect that the T register was set, which would only happen if the interrupt was caused by a MON instruction. The lower 8 bits of the T register (the original <number>) is used to call the correct system function through a look-up table.[3]
Number of Monitor Calls
The 8 bit wide <number> limits the possible ND-100 monitor calls to the range 0 to maximum 255, or 3778
The various monitor calls are documented in Norsk Data Document ND–60.228.1 SINTRAN III Monitor Calls manual .
References
- ↑ Norsk Data Document ND–06.014.02 ND-100 REFERENCE MANUAL page 2-17
- ↑ Norsk Data Document ND–06.015.02 ND-100 FUNCTIONAL DESCRIPTION page 2-39
- ↑ SIN-L STD A listing part two, March 1989
- Norsk Data Document ND–06.014.02 ND-100 REFERENCE MANUAL Page 3-56
- Norsk Data Document ND–06.029.01 ND-110 Instruction Set Page 81
- Norsk Data Document ND–60.228.1 SINTRAN III Monitor Calls manual