IBM 709x The
IBM 704, 709, 704x and 709x store one instruction in each instruction word; IBM numbers the bit from the left as S, 1, ..., 35. Most instructions have one of two formats: ;Generic :S,1-11 :12-13 Flag, ignored in some instructions :14-17 unused :18-20 Tag :21-35 Y ;Index register control, other than TSX :S,1-2 Opcode :3-17 Decrement :18-20 Tag :21-35 Y For all but the
IBM 7094 and 7094 II, there are three index registers designated A, B and C; indexing with multiple 1 bits in the tag subtracts the
logical or of the selected index registers and loading with multiple 1 bits in the tag loads all of the selected index registers. The 7094 and 7094 II have seven index registers, but when they are powered on they are in
multiple tag mode, in which they use only the three of the index registers in a fashion compatible with earlier machines, and require a Leave Multiple Tag Mode (
LMTM) instruction in order to access the other four index registers. The effective address is normally Y-C(T), where C(T) is either 0 for a tag of 0, the logical or of the selected index registers in multiple tag mode or the selected index register if not in multiple tag mode. However, the effective address for index register control instructions is just Y. A flag with both bits 1 selects indirect addressing; the indirect address word has both a tag and a Y field. In addition to
transfer (branch) instructions, these machines have skip instruction that conditionally skip one or two words, e.g., Compare Accumulator with Storage (CAS) does a three way compare and conditionally skips to NSI, NSI+1 or NSI+2, depending on the result.
MIPS The
MIPS architecture provides a specific example for a machine code whose instructions are always 32 bits long. The general type of instruction is given by the
op (operation) field, the highest 6 bits. J-type (jump) and I-type (immediate) instructions are fully specified by
op. R-type (register) instructions include an additional
funct (function) field to determine the exact operation. The fields used in these types are: 6 5 5 5 5 6 bits [ op | rs | rt | rd |shamt| funct] R-type [ op | rs | rt | address/immediate] I-type [ op | target address ] J-type
rs,
rt, and
rd indicate register operands;
shamt gives a shift amount; and the
address or
immediate fields contain an operand directly. For example, adding the registers 1 and 2 and placing the result in register 6 is encoded: [ op | rs | rt | rd |shamt| funct] 0 1 2 6 0 32 decimal 000000 00001 00010 00110 00000 100000 binary Load a value into register 8, taken from the memory cell 68 cells after the location listed in register 3: [ op | rs | rt | address/immediate] 35 3 8 68 decimal 100011 00011 01000 00000 00001 000100 binary Jumping to the address 1024: [ op | target address ] 2 1024 decimal 000010 00000 00000 00000 10000 000000 binary ==Bytecode==