IOT
IOT | |
---|---|
Description | Perform monitor call |
Format | IOT SKA <number> |
Code | 161 0008 |
Affected | Various registers, depending on <number> |
Type | User |
Architecture | NORD-1 |
IOT, or IOT SKA is an undocumented instruction used by very old applications like the NPL compiler. Old ND system applications tend to keep old code even when updated. This instruction is probably from NORD-1.
The BRF EDITOR command LIST-BRF is aware of 161.xxx instructions and lists them as IOT SKA. The BRF Linker LIST-BRF-CODE command will only list the octal value, and no mnemonic.
The instruction pre-dates SINTRAN-III and the NORD-10/N1xx CPUs, but applications using this instruction, within a certain range of <number> values, are still able to execute on the newer systems due to a trick explained below. This allows applications like NPL to work.
Implementation details
The instruction does not exist in the NORD-10/ND-1x0 CPUs, but it will trigger a Privileged Instruction exception in SINTRAN-III (bit 6 in the Internal Interrupt Code register [1]). The snippet of SINTRAN-III code which handles the exception looks as follows: [2]
The NPL code "IF 177600/\D=161000 THEN T:=177/\D; GO FAR MONCALL FI" translates to the following pseudocode:
The interrupt handler detects if the instruction is an 161000 instruction, and, if so, handles it as a MON instruction (1530008), i.e. a monitor call (within the allowed range for <number>), instead of aborting the program. The instruction is thus an old version of the MON instruction, and the old calls map one-to-one to the SINTRAN-III functions as long as they are below 128 decimal (i.e. up to and including 'MON 177').
'IOT SKA', as used by the BRF EDITOR, may possibly stand for 'IOT Systemkall' which translates to 'IOT System Call' from Norwegian.
References
- ↑ Norsk Data Document ND–06.014.02 ND-100 REFERENCE MANUAL page 2-17
- ↑ SIN-L STD A listing part two, March 1989
- Norsk Data Document ND–60.228.1 SINTRAN III Monitor Calls manual