There are actually 56 basic instructions provided in the Instruction Set of 68000 Microprocessor. With 14 addressing modes, 56 instructions, and 5 data types, the 68000 includes more than 1000 opcodes. The basic format of all the instructions is same. The opcode for every instruction is one word. Additional extension words are required to specify operand. So an instruction can be from 2 to 10 bytes in length.
Different Types of Instructions:
1.Data Movement Instructions : These are used to move information between memory and registers.
2.Arithmetic Instructions : The 68000 can add, subtract 8, 16 or 32 bit quantities. It can do 16 x 16 bit multiplication and 32/16 bit division.
3.Logical Instructions : The basic instructions in this group includes AND, OR and XOR which can operate on byte, word and long word.
4.Shift and Rotate Instructions : This can shift or rotate memory or register contents to the left or to the right.
5.Bit Manipulation : 68000 has four instructions that test the state of a specified bit in a memory location or register or in the zero flag and perform some operation based on the result.
6.BCD Instructions : 68000 provides three BCD arithmetic operations. These are add, subtract and negate. These instructions always use extend flag (X), so the X bit must be cleared before operating on the least significant BCD bytes.
7.Program Control Instructions : These contain branches, jumps and subroutine
8.System Control Instructions : 68000 operation can be controlled by system control instructions which include privileged instructions, trap instructions and instructions that use or modify the status register.
These instructions can execute only when Instruction Set of 68000 Microprocessor is in the Supervisor Mode.
Some Peculiar Instruction Set of 68000 Microprocessor:
1.DBCC (Decrement and Branch) : This is a very useful instruction for implementing looping conditions. It first tests the condition to see if the termination condition is met. If counter is not equal to – 1, it will execute the instruction indicated by the PC plus the sign extended 16-bit displacement.
6.PEA and LEA : Often it is desirable to pass a parameter from one procedure to another. This may be accomplished by simply pushing the parameters on the stack. Another technique involves pushing the address of the parameter on the stack. 68000 allows effective address calculation with PEA (Push Effective Address) and LEA (Load Effective Address) instructions. These perform the address calculations automatically and place it either on the stack or in an address register.
7.TAS : The Test and Set instructions, along with a hardware lock mechanism can initialize a semaphore (Binary Flag). The 68000 provides the TAS instruction to test and set a semaphore.
During execution of the TAS instruction, the 68000 activates AS signal on 68000 output pin, which can be used to lockout other processors from accessing the semaphore.
8.STOP : After execution of the STOP instruction, the 68000 will enter into a STOP State. STOP instruction can be executed only when 68000 is in the Supervisor mode. In the STOP state processor does nothing. When an exception condition is detected by the 68000, it leaves the Stop state and will process the exception condition.
The Instruction Set of 68000 Microprocessor can directly access up to .16 Mbytes of memory with its 24-bit Address Bus. The memory spaco may be expanded to 64 Mbytes by using the function code lines (FC0-FC3).
To interface 16 Mbytes of memory 68000 provides A1 to A23 (23) address lines along with UDS and LDS signals. The interface is shown in the Fig. 11.7. The byte oriented memory with even addresses is selected by UDS and that memory data lines are connected to the D8-D15. LDS references byte memory with odd addresses and memory data lines are connected to D0-D7. The AS line, is the address strobe which is pushed low by 68000 to indicate that a valid data address is being output on the address bus (A1-A23).