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

Overview of intel pro-pentium, Overview of Intel Pro-Pentium : The 2 c...

Overview of Intel Pro-Pentium : The 2 chief players in the PC CPU market are Motorola and Intel.  Intel has enjoyed incredible success with its processors since the early 1980

#title.Statement of the Problem., Can you write for me an essay, topic is: ...

Can you write for me an essay, topic is: Statement of the Problem. Length: 270 words. I will send you the Formula for the Problem Statement on your Email attachment. Do you agree?

Name-offset-assemblers directive-microprocessor, NAME : Logical Name of...

NAME : Logical Name of a Module: The NAME directive which is used to assign a name to an assembly language program module. The modulecan now be mention to by its declared name.

Ddition, Write a program that performs the addition, subtraction, multiplic...

Write a program that performs the addition, subtraction, multiplications, division of the given operands. Perform BCD operation for addition and subtraction.

Third generation microprocessor, III rd Generation Microprocessor: T...

III rd Generation Microprocessor: The single 3rd generation microprocessor chip having 64-pins began with the introduction of 16-bit Intel 8086 in 1978. The other essential

Program on virtual learning environment, Task One Produce a menu such a...

Task One Produce a menu such as the one below (remember to keep to this specification). M E N U 1, Enter Number 1 2, Enter Number 2 3, Display num1 and num2 4, D

Assembly language, how to find out the given number is positive or negative...

how to find out the given number is positive or negative?

Develop a schematic circuit diagram of system, Develop a suitable schematic...

Develop a suitable schematic circuit diagram of your system showing the interface between the PIC16F84 and the existing mains light & switch, including 5V derivation from the 240V

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