MOTOROLA
MC68349 USER’S MANUAL
5- 37
5.6.2.8 ILLEGAL OR UNIMPLEMENTED INSTRUCTIONS. An instruction is illegal if it
contains a word bit pattern that does not correspond to the bit pattern of the first word of a
legal CPU32+ instruction, if it is a MOVEC instruction that contains an undefined register
specification field in the first extension word, or if it contains an indexed addressing mode
extension word with bits 5–4 = 00 or bits 3–0
≠ 0000.
If an illegal instruction is fetched during instruction execution, an illegal instruction
exception occurs. This facility allows the operating system to detect program errors or to
emulate instructions in software.
Word patterns with bits 15–12 = 1010 (referred to as A-line opcodes) are unimplemented
instructions. A separate exception vector (vector 10, offset $28) is given to unimplemented
instructions to permit efficient emulation.
Word patterns with bits 15–12 = 1111 (referred to as F-line opcodes) are used for M68000
family instruction set extensions. They can generate an unimplemented instruction
exception caused by the first extension word of the instruction or by the addressing mode
extension word. A separate F-line emulation vector (vector 11, offset $2C) is used for the
exception vector.
All unimplemented instructions are reserved for use by Motorola for enhancements and
extensions to the basic M68000 architecture. Opcode pattern $4AFC is defined to be
illegal on all M68000 family members. Those customers requiring the use of an
unimplemented opcode for synthesis of "custom instructions," operating system calls, etc.,
should use this opcode.
Exception processing for illegal and unimplemented instructions is similar to that for traps.
The instruction is fetched and decoding is attempted. When the processor determines that
execution of an illegal instruction is being attempted, exception processing begins. No
registers are altered.
Exception processing follows the regular sequence. The vector number is generated to
refer to the illegal instruction vector or in the case of an unimplemented instruction, to the
corresponding emulation vector. The illegal instruction vector number, current PC, and a
copy of the SR are saved on the supervisor stack, with the saved value of the PC being
the address of the illegal or unimplemented instruction.