Top Banner
Arithmetic Instructions 8086
23

Arithmetic Instructions CEK

Sep 29, 2015

Download

Documents

priya_ganga

Arithmetic Instructions of 8086
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

Arithmetic Instructions

Arithmetic Instructions 8086DAAThe DAA instruction functions like AAAHandles packed BCD (binary code decimal) DAA's main purpose is to add strings of BCD digits (with two digits per byte). The AlgorithmThe algorithm for daa is if ( (AL and 0Fh) > 9 or (AuxC = 1)) then al := al + 6 AuxC := 1 ;Set Auxilliary carry. endif if ( (al > 9Fh) or (Carry = 1)) then al := al + 60h Carry := 1; ;Set carry flag. endifProgram Example AL = 53 CL = 29ADD AL,CL;AL