وبلاگ دیکت

دیکشنری آنلاین انگلیسی به فارسی

وبلاگ دیکت

دیکشنری آنلاین انگلیسی به فارسی

AAA

AAA (ASCII Adjust After Addition) should be used after a one-byte ADD instruction whose destination was the AL register: by means of examining the value in the low nibble of AL and also the auxiliary carry flag AF, it determines whether the addition has overflowed, and adjusts it (and sets the carry flag) if so. You can add long BCD strings together by doing ADD/AAA on the low digits, then doing ADC/AAA on each subsequent digit.


Example  (RosAsm ) :

main:


xor   eax    eax                           ; eax = 0
mov    al   ,   00011_0011
add    al   ,  7
aaa                                ;  eax = 4

ret