IBM System / 360 - continue the conversation

In the last article, I described the IBM System / 360 line as a whole, without going into too much detail about the implementation. This time we will continue the discussion about this computer and consider its internal architecture.
Of course, the System / 360 could not have made any revolution if the new computer family did not have a carefully thought out and designed architecture (later borrowed by Soviet developers). The two main manuals were called the "IBM System / 360 Principles of Operation" and the "IBM System / 360 I / O Interface Channel to Control Unit Original Equipment Manufacturers' Information manuals."

What was offered to developers in System / 360? Sixteen 32-bit general purpose registers, named from R0 to R15. Four 64-bit registers for floating point numbers, they were named FP0, FP2, FP4 and FP6. One 64-bit status register (Program Status Word or PSW), which also contains a 24-bit instruction address.
In addition to the address of the current executable instruction, the PSW saved bits allowing / disabling interrupts, program status, a security key for comparison with device keys, and other important parameters. The privileged LPSW command allowed to load the entire value of this register and was mainly used to return from the interrupt handler, restoring the state that was before the handler was called. Also, a number of commands allowed to manipulate individual flags of this register without causing transitions to other parts of the code.
Interrupts were divided into 5 “classes” depending on priority. Each class was associated with two double-word memory locations: the old PSW and the new PSW. When an interrupt occurred, the current value of the PSW along with the interrupt code was saved in the place of the old PSW, and the value from the new PSW was loaded into the register itself, causing a transition to the handler. The interrupt classes were as follows (in order of increasing priority).
I / O interruptions: signaled a variety of I / O events, including those time-consuming, such as completion of film rewinding.
Software interrupts. Signaled the occurrence of one of 15 exceptions during program execution. Some of these interrupts could be suppressed by resetting the corresponding flags in the PSW.
Interrupt call supervisor. It happened as a result of following the instructions addressed to the supervisor.
External interrupts. Occurred as a result of external events, such as a timer or pressing the interrupt button.
Interruption of machine verification occurred in cases of hardware failures, for example, when a parity error occurred while checking the contents of registers.
As already understood, 24 bits were used for memory addressing, which made it possible to address 16 megabytes of memory, but starting with model 67, 32-bit addressing appeared, which expanded the amount of addressable (theoretically) memory to 4 gigabytes. The big-endian order was used, that is, from the oldest to the youngest. Various instructions made it possible to work with bytes, half-words (2 bytes), full words (4 bytes), double and quadruple words (8 and 16 bytes, respectively).
The following data types were regularly supported:
Half-integer or whole-word integers
Two kinds of decimal numbers packed in a binary format
Fractional floating-point numbers (implementation nuances depended on the version)
Symbols were stored in one byte each
Addressing was most often used "truncated": the instructions did not contain the full address, but only the offset relative to the base address contained in one of the general registers.
The instructions could be 2, 4 or 6 bytes long, while the operation code was stored in zero byte, and the rest was occupied with the description of the operands. Instructions were aligned at the half-word boundaries, so the least significant bit in the address of the current instruction was always zero.
Interestingly, System / 360 implemented I / O. I / O operations were performed by conceptually separate processors called “Channels”. The channels had their own sets of instructions, and they worked with the memory regardless of the program executed by the central processor. In low-cost models, the “processor” of the microcode of the central processor was used to support the channels; in more expensive models, the channels were located in their own cabinets.

Very unusual at IBM, they approached the management of their computers. They defined a specific set of functions, without specifying with what physical means they should be implemented. This made it possible to make the control universal, independent of the specific hardware, any command could be used to issue commands and display the results: buttons, type disks, keyboards, text and graphics on monitors, etc. Any reference to a “button” or “switch” could mean any of the possible inputs, starting with a light pen and ending with a choice of an option on the screen using keyboard input.
Various System / 360 models used various additional features that extended the basic ones.
Write protection. If the system supported this option, then a key was assigned to each external storage unit of 2 KB in size, which was checked when writing to this storage channel. That is, each channel could write only in “its” blocks. Typically, the channel with the zero address was used by the operating system itself, and for it the key was not checked. This approach made it possible to protect system files from being erased by user programs. In very rare models, there was also the opportunity to set up and protection against reading.
Multisystem support. An expansion of the set of commands that allowed several processors to work simultaneously.
Direct control. This option provided support for 6 external signal lines that could be used for the user's needs.
Interval timer. With this option, the processor periodically decremented the word located in memory at address 0x50, when this value reached zero, an interruption occurred. The younger models reduced the number with a frequency that coincided with the frequency of the electric network (50 or 60 Hz), the older models were equipped with timers with much higher resolution.
In general, you can talk a lot about System / 360, so if there is interest, I will continue the topic in the next article.