The basic computer has 16-bit instruction register (IR) which can denote either memory reference or register reference or input-output instruction.
- Memory Reference – These instructions refer to memory address as an operand. The other operand is always accumulator. Specifies 12-bit address, 3-bit opcode (other than 111) and 1-bit addressing mode for direct and indirect addressing.
IR register contains = 0001XXXXXXXXXXXX, i.e. ADD after fetching and decoding of instruction we find out that it is a memory reference instruction for ADD operation.
Hence, DR ← M[AR] AC ← AC + DR, SC ← 0
- Register Reference – These instructions perform operations on registers rather than memory addresses. The IR(14 – 12) is 111 (differentiates it from memory reference) and IR(15) is 0 (differentiates it from input/output instructions). The rest 12 bits specify register operation.
IR register contains = 0111001000000000, i.e. CMA after fetch and decode cycle we find out that it is a register reference instruction for complement accumulator.
Hence, AC ← ~AC
- Input/Output – These instructions are for communication between computer and outside environment. The IR(14 – 12) is 111 (differentiates it from memory reference) and IR(15) is 1 (differentiates it from register reference instructions). The rest 12 bits specify I/O operation.
IR register contains = 1111100000000000, i.e. INP after fetch and decode cycle we find out that it is an input/output instruction for inputing character. Hence, INPUT character from peripheral device.
The set of instructions incorporated in16 bit IR register are:
- Arithmetic, logical and shift instructions (and, add, complement, circulate left, right, etc)
- To move information to and from memory (store the accumulator, load the accumulator)
- Program control instructions with status conditions (branch, skip)
- Input output instructions (input character, output character)
|AND||0xxx||8xxx||And memory word to AC|
|ADD||1xxx||9xxx||Add memory word to AC|
|LDA||2xxx||Axxx||Load memory word to AC|
|STA||3xxx||Bxxx||Store AC content in memory|
|BSA||5xxx||Dxxx||Branch and Save Return Address|
|ISZ||6xxx||Exxx||Increment and skip if 0|
|CLE||7400||Clear E(overflow bit)|
|CIR||7080||Circulate right AC and E|
|CIL||7040||Circulate left AC and E|
|SPA||7010||Skip next instruction if AC > 0|
|SNA||7008||Skip next instruction if AC < 0|
|SZA||7004||Skip next instruction if AC = 0|
|SZE||7002||Skip next instruction if E = 0|
|INP||F800||Input character to AC|
|OUT||F400||Output character from AC|
|SKI||F200||Skip on input flag|
|SKO||F100||Skip on output flag|
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
- Computer Organization | Performance of Computer
- Differences between Computer Architecture and Computer Organization
- Machine Instructions
- Arithmetic instructions in 8085 microprocessor
- Logical instructions in 8085 microprocessor
- Data transfer instructions in 8085 microprocessor
- Branching instructions in 8085 microprocessor
- Arithmetic instructions in 8086 microprocessor
- Logical instructions in 8086 microprocessor
- Data transfer instructions in 8086 microprocessor
- 8086 program to transfer a block of 4 bytes by using string instructions
- 8085 program to multiply two 8 bit numbers using logical instructions
- Process control instructions in 8086 microprocessor
- Difference between CALL and JUMP instructions
- String manipulation instructions in 8086 microprocessor
- Program execution transfer instructions in 8086 microprocessor
- Machine Control Instructions in Microprocessor
- Register content and Flag status after Instructions
- ROTATE Instructions in 8085
- COMPARE Instructions in 8085
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.