Format of a VAX Instruction, Fig. 8.1
VAX instructions
follow the following format:
+-----------------+
| op code | ---- one byte (low address)
+-----------------+
| operand | ---- one or more bytes \
| specifier 1 | |
+-----------------+ |
| operand | ---- one or more bytes |_ one operand specifier
| specifier 2 | | per operand
+-----------------+ |
| | |
| . . . . | /
An operand specifier usually looks like:
+-----------------+
| mode byte | ---- one byte encodes addressing mode
+-----------------+
| additional | ---- possibly several bytes of information
| information | depending on the mode
+-----------------+
Notes:
- instructions can begin on any byte boundary.
- there can be (depending on the opcode) up to 6 operand specifiers.
- most opcodes are 1 byte long (but there are exceptions.)
- most operand specifiers are: (mode byte, zero or more bytes of information)
- BRANCH mode is the exception. A branch instruction just
needs to contain the value by which the change the PC if
the branch is taken. That value can be encoded in one byte
(the mode byte is not needed.)
QUESTION 3:
An instruction may take up a dozen or more bytes.
Why did the designers of the VAX make the opcode of an instruction
the first byte of the instruction?
ANSWERS:
- Since the PC will be pointing there after
the previous instruction has executed.
- Just a convention, it could just as
easily be the last byte of the instruction.
- The opcode is in unsigned binary
so must be in the low order bits.
- So the opcode can be moved into the PC.