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
I want to do a program as a game by using the Microcontroller 8051 with the assembly language, by using 4*4 keypad and its matrix display. I have to use the keypad for playing the


Logical Instruction : This type of instructions is utilized for carrying out the bit by bit shift, basic logical operations or rotate. All of the condition code flags are affe

Program :  Write an assembly program to find out the largest number from a given unordered array of 8-bit numbers that stored in the locations starting from a known address. S

Ask question #MinimuWHAT ARE CONSTANTS AND WHAT DO THEY DO?m 100 words accepted#

The Alpha : The development of the Alpha chip start in the year 1988 The new chip used 64 bit technology, let users to pack  more  complexity  into  their  programs  than  exis

You have to write a subroutine (assembly language code using NASM) for the following equation.


8086 Minimum mode System and Timing In a minimum mode 8086 system, the microprocessor 8086 is operated in minimum mode by strapping its MN/MX pin to logic 1.All the control si

PTR : Pointer:- The pointer operator which is used to declare the type of a variable, label or memory operand. The operator PTR is prefixed by either WORD or BYTE. If the prefi