Motorola 68000 Instruction Set:

There are actually 56 basic instructions provided in the Motorola 68000 Instruction Set. 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.

Privileged Instructions:

These instructions can execute only when Motorola 68000 Instruction Set is in the Supervisor Mode.

Motorola 68000 Instruction Set

Some Peculiar Motorola 68000 Instruction Set:

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.

2. SWAP : It swaps the lower half of data register with the upper half.
3. TRAP : It has 16 unique vector addresses that allow 16 kinds of exception processing.
4. CHK : It is a very useful instruction in array processing. This instruction performs the bound check which compares an array index against zero and the limit value addressed by the instruction. If the index is out of bounds, a trap will occur.
5. LINK, UNLK : On various occasions, the exact state of the stack prior to return from a subroutine might not be known to the programmer: Also execution of subroutine will not store temporary data on the stack. in an orderly manner. The LINK and UNLK instructions are used to take care of the above problem. The link instruction dynamically allocates upto 32768 bytes of storage on the stack and also assigns a pointer, to the top of the reserved area. Furthermore, the LINK instruction saves the current value of the pointer. The UNLK reverses the effects of the LINK instruction and therefore it restores the stack and address registers.

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.

Memory Interface:

The Motorola 68000 Instruction Set 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).

Motorola 68000 Instruction Set

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).

Scroll to Top