Sunday, September 13, 2009

Subtraction of two BCD numbers (8085)

Statement: Subtract the BCD number stored in E register from the number stored in the D register

Source Program:
MVI A,99H
SUB E : Find the 99's complement of subtrahend
INR A : Find 100's complement of subtrahend
ADD D : Add minuend to 100's complement of subtrahend
DAA : Adjust for BCD
HLT : Terminate program execution

1 comment:

  1. This comment has been removed by the author.

    ReplyDelete