- Addressing modes:-
we have various methods to specify the address of the data that the instruction requires. this is called as addressing modes.
There are five addressing modes they are:-
- Direct Addressing:
- Register Addressing:
- Indirect Addressing:
- Immediate Addressing:
- Implicit Addressing:
Direct Addressing Mode: In direct Addressing mode the data is directly copied from the given address to the register. Instruction in this mode are of two to three bytes.
Examples:-LDA C200H, STA 2000H
Register Addressing Mode: In this mode the movement of data is from one register to another. The instruction specifies the register or a pair of register that contains the address where data is located in short it defines the register where the data is stored rather than the memory. Instruction in this mode are of one byte.
Examples:-MOV A,B ; XRA C ; CMP C
Indirect Addressing Mode: In this mode the data is transferred from the address pointed by the data in a register to another register. These instructions are of one byte.
Examples:- MOV B,M ; ADD M
Immediate Addressing Mode: In this addressing modes the instruction contains the 8 bit or 16 bit data in the instruction itself. These instructions are of two to three bytes.
Examples:- MVI A OFH; ADI BEH; ANI 55H; LXI H 2354H;
Implicit Addressing Mode: There are some instructions that operate only on one data and in such instructions the operand is in the accumulator so there is no need for specifying address. these instructions come in implicit addressing modes. These instructions are of one byte.
Examples:- RAL; CMA; STC;
- Instruction set's:-
An instruction is a command given to microprocessor to perform specific opeation on the given data. The collection of such instructions is called instruction set.
- Data transfer group
- Arithmetic group
- Logical group
- Branching Group
- Stack I/O and machine control group
Data transfer group:- Instructions, which are used to transfer data from one register to another register, from memory to register or register to memory, come under this group. Examples are: MOV, MVI, LXI, LDA, STA etc. (for more details watch the video)
0 comments:
Post a Comment