Instruction Set
4-9
AAS
AAS
Examples
This example subtracts one unpacked decimal number (the subtrahend) from another
unpacked decimal number (the minuend).
Tips
To convert an unpacked decimal digit to its ASCII equivalent, use OR after AAS to add 30h
(ASCII 0) to the digit.
ADC, ADD, SBB, and SUB set AF when the result needs to be converted for decimal
arithmetic. AAA, AAS, DAA, and DAS use AF to determine whether an adjustment is
needed. This is the only use for AF.
Related Instructions
If you want to
See
Convert an 8-bit unsigned binary difference to its packed decimal equivalent
DAS
Subtract a number and the value of CF from another number
SBB
Subtract a number from another number
SUB
UMINUEND
DW
0103h
; 13 unpacked BCD
USUBTRAHEND
DB
05h
; 5 unpacked BCD
; subtract unpacked decimal numbers
MOV
AX,UMINUEND
; AX = 0103h = 13 unpacked BCD
SUB
AL,USUBTRAHEND
; AX = 01FEh
AAS
; AL = 08h = 8 unpacked BCD
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...