Tema 2. Características del Microprocesador 80X86. - UAM
Tema 2. Características del Microprocesador 80X86. - UAM
Tema 2. Características del Microprocesador 80X86. - UAM
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Instrucciones de Ajuste.<br />
AAM (ASCII adjust after<br />
multiplication)<br />
Datos segment<br />
ascVal db 05h,06h<br />
Datos ends<br />
Codigo segment<br />
⋮<br />
mov bl,ascVal ;primer operando<br />
mov al,ascVal ;segundo operando<br />
mul bl ;AX=001EH<br />
aam ;AX=0300H<br />
or ax,3030h ;AX=3330H=’30’<br />
AAD (ASCII adjust before<br />
division)<br />
Datos segment<br />
cociente db ?<br />
residuo db ?<br />
Datos ends<br />
Codigo segment<br />
⋮<br />
mov ax,0307H ;dividendo (BCD )<br />
aad ;AX=0025H (AH*10+AL)<br />
mov bl,05 ;divisor<br />
div bl ;AX=0207H<br />
mov cociente,al<br />
mov residuo,ah