Free Electronic Circuits & 8085 projects

Electronic projects with circuit diagram and 8085 microprocessor projects.

Execution format of instructions

Published on Nov 16 2009 // Learners

Statement: Read the program given below and state the contents of all registers after the execution of each instruction in sequence.


Main program:

4000H     LXI SP, 27FFH

4003H     LXI H, 2000H

4006H     LXI B, 1020H

4009H     CALL SUB

400CH     HLT

Subroutine program:

4100H     SUB: PUSH B

4101H     PUSH H

4102H     LXI B, 4080H

4105H     LXI H, 4090H

4108H     SHLD 2200H

4109H     DAD B

410CH     POP H

410DH     POP B

410EH     RET

Note:

The table given gives the instruction sequence and the contents of all registers and stack after execution of each instruction.

TABLE

 12 - Execution format of instructions

 

 

Related Programs for Beginners: (Click down)

Store 8-bit data in memory

Subtract two 8-bit numbers

Finding Two’s complement of a number

Exchange the contents of memory locations

Pack-the-unpacked-BCD-numbers