This site is developed to help engineering students. The site is new. Right now, we have only microprocessor programs in here. We will keep including more topics on more subjects in the future.
Microprocessor 8085 Programs

Monday, June 24, 2013

Add Two Numbers Stored In Registers

Program: Add two numbers stored in registers and save the sum and carry in memory.

Note: Progran starts from memeory location 8000H.
          Assuming data source registers = B & D;
          Storing sum at 9000H, carry at 9001H.

Label
Memory Location
Mnemonics
Opcode
Operand


8000
MVI C, 00H
OE



8001


OO


8002
MVI B, 05H
3A



8003


O5


8004
MVI D, 06H
16



8005


6


8006
MOV A, D
7A



8007
ADD B
80



8008
JNC SKIP
D2



8009


OC


800A


80


800B
INR C
0C


SKIP:
800C
STA 9000H
32



800D


0O


800E


90


800F
MOV A, C
79



8010
STA 9001H
32



8011


O1


8012


90


8013
HLT
76




No comments:

Post a Comment