74/317
4 - Architecture of the ST7 core
4.3.4 Coding of the instructions and the address
The instructions are coded using bytes stored in program memory. One instruction takes one
to four bytes according to its type and the addressing mode. These bytes are, in order:
The prefix byte (optional); the operation code (opcode), and one or two bytes of address (op-
tional).
4.3.4.1 Prefix byte
Theprefixbyteisusedtoextendtherangeofinstructions.Theopcodebeingasinglebyte,no
more than 256 combinations of an operation and an addressing mode may be coded. The
original industry-standard instruction set only uses one byte for the opcode. The ST7 in-
creased the choice of addressing modes so that it was no longer possible to code them all
using a single byte. A prefix byte has been created. When this prefix is put before an opcode,
it changes the addressing mode of the opcode. There are three prefixes:
PDY (90h) means that the next instruction must use the Y index instead of the X index.
PIX (92h) means that the next instruction must change its addressing mode (whichever it is)
to the corresponding indirect addressing mode.
PIY (91h) is a combination of the above: the addressing mode is indirect, and the index
register used is
Y.