8085 Programming


  • 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:-
  1. Direct Addressing:
  2. Register Addressing:
  3. Indirect Addressing:
  4. Immediate Addressing:
  5. 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.

   
The instructions in 8085 are classified as follows:
  1. Data transfer group
  2. Arithmetic group
  3. Logical group
  4. Branching Group
  5. 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)



Arithmetic group:- Instructions of this group perform arithmetic operations like addition, subtraction, increment or decrement of the content of a register or memory. Examples are: ADD, SUB, DAD,INR,DCR etc. (for more details watch the above video)

Logical group:- The Instructions of this group perform logical operation such as AND, OR, XOR,compare, rotate etc. Examples are: ANA, XRA, ORA, CMP, and RAL etc.

Branching Group:- These instructions are used for changing the normal operation sequence of the program flow. This group contains the instructions for conditional and unconditional jump, subroutine call and return, and restart. Examples are: JMP, JC, JZ, CALL, CZ, RST etc.

Stack I/O and machine control group:- This group of  instructions perform  input/output ports, manipulates  stack and machine control. Examples are: IN, OUT, PUSH, POP, and HLT etc. ( for more see the above video and skip to the part where stack io is explained)



< previous page / home / next page >

0 comments:

Post a Comment