Aad-arithmetic instruction-microprocessor, Assembly Language

AAD: ASCII Adjust for Division though the names of these 2 instructions (AAM and AAD) seem to be same, there is many difference between their functions. The AAD instruction converts 2 unpacked BCD digits in AL and AH to the corresponding binary number in AL. This adjustment might be made before dividing the 2 unpacked BCD digits in the AX by an unpacked BCD byte. SF, PF, ZF are modified whereas CF, AF, OF are not defined, after the execution of the instruction AAD. The instance describes the execution of the instruction. This instruction seems before DIV instruction unlike the AAM seems after MUL in the instruction sequence. Assume AX has 0508 unpacked BCD for 58 decimal, and DH consist 02H.

Example :

1629_AAD.jpg

The conclusion of the AAD execution will give the hexadecimal number 3A in the AL and 00 in the AH. Notice that 3A is the hexadecimal correspondent of 58 (decimal). Now, the instruction DIV DH can be executed. So rather than ASCII adjust for division, it is ASCII adjust before division operation.  All the ASCII adjust instructions are also known as unpacked BCD arithmetic instructions.  Now, we will consider the two instructions related to the packed BCD arithmetic.

 

Posted Date: 10/12/2012 1:47:03 AM | Location : United States







Related Discussions:- Aad-arithmetic instruction-microprocessor, Assignment Help, Ask Question on Aad-arithmetic instruction-microprocessor, Get Answer, Expert's Help, Aad-arithmetic instruction-microprocessor Discussions

Write discussion on Aad-arithmetic instruction-microprocessor
Your posts are moderated
Related Questions
HELLO I AM TRYING TO ADD AND SUBTRACT BUT I SEEM CAN''T FIND THE CORRECT REGISTER TO PUT IN

I need a text conversion program written in assembly language

Interrupt System Based on Single 8259 A The 8259A is contained in a 28-pin dual-in-line package that need only a + 5-V supply voltage.  Its organization is shown in given figur

Cache components The cache sub-system may be divided into 3 functional blocks: Tag RAM, SRAM and theCache Controller. In real designs, these blocks can be implemented  by multi

This is a short program to practice assembly language loops and if/else statements. You will use various jump commands and the cmp instruction. The program will generate a random

ROR : Rotate Right without Carry: This instruction rotates the contents of destination operand to the bit-wise right either by one or by the count specified in register CL, exclud

Assembly Language Example Programs We studied the entire instruction set of 8086/88, pseudo-ops and assembler directives. We have explained the process of entering an assembly

#Write a function to calculate the following arithmetic operation and return the result. A = 2 + (3x)3 + y/2n (x, y and n are arguments of the function where x is an integer in the

#write a program 8086 to find the largest number

ADD:  Add :- This instruction adds an immediate contents of a memory location specified in the a register ( source ) or instruction to the contents of another register (destinat