This document will attempt to describe the Interdata line of 16 bit computers, at least up to the Model 4, in sufficient detail to allow a hobbyist to begin to program the device at a machine- code level.
  The document is not intended to be an in- depth analysis of the machine, nor is it intended to be a tutorial on programming the device. I've prepared it primarily as an aid to hobbyists who may have acquired one of these systems and who wish to use said system as an amusement or part of a working collection. I've tried to be as accurate as possible, but I'm sure there are errors and as my personal Interdata machine is currently non- operational I haven't been able to verify some of the quirks I've found in the official documentation, from which this is derived.
  This document is arranged in sections which cover:
  The Interdata 16 bit machines, of which several models were manufactured, share a common architecture and instruction- set at the user- program level. This is characterised by a 16- bit ALU width, an architectural maximum size of 65,536 bytes of mainstore, and 16 General Purpose Registers. Of the 16 GPRs, 15 may be used as index registers for address modification.
  The machine sports a 32- bit Processor Status Word (PSW) which consists of the 16 bit Program Counter (PC), the current Condition Codes (CC), and assorted machine status bits. This register will be described later.
  I/O in the Interdata machines is performed in 8-bit bytes whilst operating under program control. A 16-bit direct memory access channel is provided for special high- speed peripherals and those which require full 16 bit words.
  Interdata uses the IBM notion of "Halfword" to denote a sixteen bit quantity and "Fullword" to describe a 32 bit value. The term "Byte" is used for an eight bit quantity.
  Data alignment is important in the Interdata machines. While bytes may begin on any valid address, halfwords must begin only on even addresses, and fullwords must begin only on addresses which are a multiple of four. Hence, we may make the following table of valid starting addresses:
Low Address: 0 1 2 3 4 5 6 7 8 9 A B C D E F ---------------------------------------------------------------- Byte X X X X X X X X X X X X X X X X Halfword X X X X X X X X Fullword X X X X
The mainstore in the Interdata machines operates on a halfword- by- halfword basis, 16 bits at a time. This means that for byte- level accesses, a 16 bit quantity is taken from memory, and, in necessary, shifted/ masked to provide the eight bit byte. The reverse is true for writing bytes to memory.
  Numbering within the machine is done in hexidecimal (base 16) to ease the task of binary conversions. The assembler mnemonics bear a strong resemblance to IBM's Basic Assembler Language (BAL) from the 1960s. Note that while the bit- order seems to define the Interdata machines as "big- endian", they are, in fact, "little- endian" in that they order bytes from low to high in sequential addresses.
  The Interdata machines support three addressing modes, known as Register- to- Register (RR), Register- to- Indexed-Storage (RX), and Register- to- Storage (RS). Indirect addressing, interestingly enough, is not supported in the basic machine. The three modes are described below and will introduce some of the concepts used in later instruction- by- instruction descriptions. All instructions have a common eight bit "OP-Code" (OPeration Code); other fields vary according to instruction format.
|0 7|8 11|12 15| +---------------+-------+-------+ | OP-Code | R1 | R2 | +---------------+-------+-------+
  In this diagram, R1 is the Destination GPR and R2 is the Source GPR. All 16 GPRs may participate in either position in an RR- format instruction.
|0 7|8 11|12 15|16 31| +---------------+-------+-------+--------------------------------+ | OP-Code | R1 | X2 | A | +---------------+-------+-------+--------------------------------+
  As in the RR format instructions, the R1 field specifies the GPR that is to participate in the data transfer. The X2 register specified one of 15 GPRs which is to act as an index register, which along with the value "A" will form a memory address which will participate in the data transaction.
  The effective address is formed by algebraically adding the contents of the GPR specified by the X2 field to the unsigned value of "A". This effective address, "E", is used to access memory to perform the desired function.
  Only 15 of the 16 GPRs may be used as index registers. GPR 0 may not participate in indexing as the zero value means that no indxing is to take place.
|0 7|8 11|12 15|16 31| +---------------+-------+-------+--------------------------------+ | OP-Code | R1 | X2 | A | +---------------+-------+-------+--------------------------------+
  As in the RX format, only 15 of the GPRs may participate in the X2 field, as a zero value specifies no indexing is to take place.
  A special form of the RR and RX formats exists for the Branch instructions and takes the form:
|0 7|8 11|12 15| +---------------+-------+-------+ | OP-Code | M1 | X2 | +---------------+-------+-------+and
|0 7|8 11|12 15|16 31| +---------------+-------+-------+--------------------------------+ | OP-Code | M1 | X2 | A | +---------------+-------+-------+--------------------------------+
  Note that the R1 field is replaced by the M1 designator which is used to store a mask to be compared to the PSW for conditional jumps. This will be treated later.
  The thirty- two bit Processor Status Word (PSW) in the Interdata machines is used to store the current context of the machine. This encompasses the current location (Program Counter, or PC), the current Condition Codes (CC), and the current machine status. This status word may be manipulated by the program directly, or may change as a by- product of instruction execution or machine status changes (e.g. interrupts).
  The PSW appears thusly:
|0 11|12 15|16 31| +-----------------------+-------+--------------------------------+ | Machine Status | CC | Current Program Counter | +-----------------------+-------+--------------------------------+
  The Machine Status bits are as follows:
PSW Bit Function ---------- ------------ 0 Wait 1 Interrupt Enabled 2 Machine Malfunction Interrupt Enabled 3 Fixed-Point Divide Fault Interrupt Enabled 4 Reserved 5 Floating-point Divide Fault Interrupt Enabled 6 - 11 Unassigned
  The functions are, in turn:
  There are four condition code bits defined by the Interdata architecture - C, V, G, and L, and occupy, sequentially, bits 12 through 15 in the PSW. These function thusly: