arithmetic instructions cek

23
Arithmetic Instructions 8086

Upload: priyaganga

Post on 29-Sep-2015

234 views

Category:

Documents


0 download

DESCRIPTION

Arithmetic Instructions of 8086

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