MON

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 ) to program level 14. It differs from other internal interrupt sources in that the monitor call or is found in the T register on level 14. The 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 ) is used to call the correct system function through a look-up table.

Number of Monitor Calls
The 8 bit wide limits the possible ND-100 monitor calls to the range 0 to maximum 255, or 3778

The various monitor calls are documented in.