EX.
NO: 8-BIT ADDITION USING 8085
DATE:
AIM:
To write an assembly language program for adding two eight bit numbers using 8085
processor.
APPARATUS REQUIRED:
8085 Microprocessor kit,
Power supply
ALGORITHM:
Get data in Accumulator at specified memory location
Store the data in B register
Get next data in Accumulator register
Add the contents of A register with B register
Store the result
Terminate the program
FLOW CHART:
Start
Get first data
in B reg
Get second data
in A reg
Add the values
Store result
Stop
PROGRAM:
ADDRESS OPCODE LABEL MNEMONICS COMMENTS
4100 3A, 50,41 START: LDA 4150H :Load the contents of 4150 H to the
;accumulator
4103 47 MOV B, A : Transfer the data from accumulator to
B ;register
4104 3A, 51,41 LDA 4151H : Load the contents of 4151H to the
;accumulator
4107 80 ADD B :Add the contents of register R to the
contents ;of accumulator
4108 32,52,41 STA 4152H :Store the contents of accumulator in
4152H
410B 76 STOP: HLT :Terminate the program
MANUAL CALCULATION:
(A) : 70H = 0111 0000
(B) : 8BH = 1000 1011 (+)
(A) : FBH = 1111 1011
ADDRESS DATA
Input:
4150 H 70 H
4151H 8BH
Output:
4152H FBH
RESULT:
8-bit addition using 8085 is executed successfully and the output has been verified.