Tuesday 17 October 2017

How to add two 16 bit numbers in 8085

How to ADD two 16 Bit Number

Suppose we have to add two HEX numbers viz:
4351 & 3211.
First take the LSB of two number and ADD them. Then take the MSB of thw numbers and add them with CARRY.


CODE:

MVI A,51H
MVI B,11H
ADD B
STA 5000H
MVI A,43H
MVI B,32H
ADC B
STA 5002H
HLT



When this program will be executed then LSB will be saved at location 5000H and MSB will be saved at 5002H location
 
;