SKYSPIN
Example
STA 2400H: It stores the content of the accumulator in the memory location 2400H.
32, 00, 24: The above instruction in the code form.
In this instruction, 2400H is the memory address where data is to be stored. It is given in the instruction itself. The 2nd and 3rd bytes of the instruction specify the address of the memory location. Here, it is understood that the source of the data is accumulator.
Example:
MOV A, B: Move the content of B register to register A.
78: The instruction in the code form.
In the above example, MOV A, B is 78H. Besides the operation to be performed the opcode also specifies source and destination registers.
The opcode 78H can be written in binary form as 01111000. The first two bits, i.e. 0 1 are for MOV operation, the next three bits 1 1 1 are the binary code for register A, and the last three bits 000 are the binary code for register B.
Example
Example
LXI H, 2500 is an example of immediate addressing. 2500 is 16-bit data which is given in the instruction itself. It is to be loaded into H-L pair.
Example
CMA, RAL, RAR, etc.
Instruction Set of 8085
Instruction and Data Formats
The various techniques to specify data for instructions are:- 8-bit or 16-bit data may be directly given in the instruction itself.
- The address of the memory location, I/O port or I/O device, where data resides, may be given in the instruction itself.
- In some instructions, only one register is specified. The content of the specified register is one of the operands.
- Some instructions specify two registers. The contents of the registers are the required data.
- In some instructions, data is implied. The most instructions of this type operate on the content of the accumulator.
Addressing Modes
Each instruction requires some data on which it has to operate. There are different techniques to specify data for instructions. These techniques are called addressing modes. Intel 8085 uses the following addressing modes:- Direct Addressing
Example
STA 2400H: It stores the content of the accumulator in the memory location 2400H.
32, 00, 24: The above instruction in the code form.
In this instruction, 2400H is the memory address where data is to be stored. It is given in the instruction itself. The 2nd and 3rd bytes of the instruction specify the address of the memory location. Here, it is understood that the source of the data is accumulator.
- Register Addressing
Example:
MOV A, B: Move the content of B register to register A.
78: The instruction in the code form.
In the above example, MOV A, B is 78H. Besides the operation to be performed the opcode also specifies source and destination registers.
The opcode 78H can be written in binary form as 01111000. The first two bits, i.e. 0 1 are for MOV operation, the next three bits 1 1 1 are the binary code for register A, and the last three bits 000 are the binary code for register B.
- Register Indirect Addressing
Example
- LXI H, 2500 H - Load H-L pair with 2500H.
- MOV A, M - Move the content of the memory location, whose address is in H-L pair (i.e. 2500 H) to the accumulator.
- HLT - Halt.
- Immediate Addressing
Example
LXI H, 2500 is an example of immediate addressing. 2500 is 16-bit data which is given in the instruction itself. It is to be loaded into H-L pair.
- Implicit Addressing
Example
CMA, RAL, RAR, etc.
0 Comments