Aaa-arithmetic instruction-microprocessor, Assembly Language

Assignment Help:

AAA: ASCII Adjust after Addition operation the AAA instruction is executed after an ADD instruction that adds 2 ASCII coded operands to give a byte of outcome in the AL. The AAA instruction converts the resulting contents of AL to unpack the decimal digits. After the addition operation, the AAA instruction checked the lower 4 bits of AL to examine whether it have a valid BCD number in the range 0 to 9. If it is between range 0 to 9 and AF is set to zero, AAA sets the 4 high order bits of AL to 0. The AH might be cleared before addition operation. If the lower digit of the AL is between the range 0 to 9 and AF is set, 06 are added to the AL. The upper 4 bits of the AL are cleared and the AH is incremented by the value one. If the value in the lower nibble of the AL is greater than 9 then the AL is incremented by the value 06, AH is incremented by value I, the AF and the CF flags are set to I, and the higher 4 bits of the AL are cleared to the value 0. The remaining flags are not affected. The AH is modified as sum of earlier contents (typically 00) and the carry from the adjustment, as shown in given figure. This instruction does not give precise ASCII codes of the sum, but they may be obtained by adding 3030H to  the AX.

425_ascii add.jpg

               Figure: ASCII Adjust After Addition Instruction


Related Discussions:- Aaa-arithmetic instruction-microprocessor

Label-assemblers directive-microprocessor, LABEL :   The Label directive...

LABEL :   The Label directive which is used to assign a name to the current content of the location counter. At the beginning of the assembly process, the assembler start a loca

8086 assembly language, write and run a programme using 8086 assembly langu...

write and run a programme using 8086 assembly language that interchange the lower four bits of AL registered with upper four bits.

Program to find the largest number in an array, Write a MC68H12 assembly la...

Write a MC68H12 assembly language program to find the largest number in an array of ten 8-bit numbers. The array is stored in memory locations starting at address $1100. Use branch

Mmm development board, Write an account of your findings and produce a repo...

Write an account of your findings and produce a report containing all aspects of the above. Include a step-by-step 'simple User Guide' so that your program can be operated as inten

Physical memory mapped and port input output-microprocessor, Physical Memor...

Physical Memory Mapped I/O and Port I/O : CPU controlled I/O comes in 2 ways. Simply the difference is whether we utilize the normal memory addresses for I/O, this is mention

Mlil-arithmetic instruction-microprocessor, MLIL: Unsigned Multiplication ...

MLIL: Unsigned Multiplication Byte or Word: This instruction multiplies an unsigned byte or word by the contents of the AL. The unsigned byte or word can be in any one of the gene

Can you write this Program for me please? , $NOMOD51 $NOSYMBOLS ;**********...

$NOMOD51 $NOSYMBOLS ;***************************************************************************** ; Spring 2013 Project ; ; FILE NAME : Project.ASM ; DATE : 3/30/20

Signal descriptions of 8086-microprocessor, Signal descriptions of 8086 : ...

Signal descriptions of 8086 : described below are common for the maximum andminimum mode bothdata lines AD15 -AD0: These are the time multiplexed andmemory I/O address. Addre

Flowchart for the sequence of 8251-microprocessor, Flowchart for the sequen...

Flowchart for the sequence of 8251 Whether the control, mode or sync character register is selected depends on the accessing sequence.  A flowchart of the sequencing is given i

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd