8085 Programming : 8 BIT DECIMAL SUBSTRACTION
![8085 Programming 8085 Programming](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNJqxG7jvcj0CSjWEVB0Q_IspgxU3r3DpD4F71TFLC5f2g7FwS3F9Q9FmYfvMz1kPP_8gVWO_wc6FfIxtFm_1M4Iz1OmaAzJHb2z9z2SYemNRju98YC_kCXYtIUEJJgYbrklz5zDIIBUE/s1600/8085.jpg)
If 2nd no is greater than 1st no then the answer will in 2's complement
Manually strore 1st 8 bit no in the memory location C050
Manually store 2nd 8 bit no in the memory location C051
Result is stored in C052
LXI H,C051
MVI A,99
SUB M
INR A
DCX H
ADD M
DAA
STA C052
HLT
EXAMPLE-> 99-48=51
STORE-> C050=99,C051=48
OUTPUT:
C052=51
Comments
Post a Comment