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

Architecture of file transfer, Explain the architecture of the file transfe...

Explain the architecture of the file transfer protocol ftp in terms of clients, servers, sockets

Project, Any small project which can implement on any software. No need any...

Any small project which can implement on any software. No need any external hardware approach.

Program to move string from offset-assembly program, Program : A program t...

Program : A program to move a string of the data words from offset 2000H to offset 3000H the length of the string is OFH. Solution : For writing this program, we will use

#title:Shifitng of memory, Ask 2. Exchange higher byte of AX and higher byt...

Ask 2. Exchange higher byte of AX and higher byte of BX registers by using memory location 0160 in between the transfer. Then stores AX and BX registers onto memory location 0174 o

Risc characteristics-microprocessor, RISC Characteristics : The  concep...

RISC Characteristics : The  concept  of  RISC  architecture  include  an  attempt  to  reduce  execution  time  by make  simple  the instruction set of the computer. The main c

Shl/sal-logical instruction-microprocessor, SHL/SAL : Shift logical/Arithm...

SHL/SAL : Shift logical/Arithmetic Left: These instructions shift the operand byte or word bit by bit to the left and insert 0 in the newly introduced least significant bits. In c

L.A, How is bob different from johnny in the outsiders

How is bob different from johnny in the outsiders

Arithmrtic operation exercise assempley HELP!, Open notepad and enter the c...

Open notepad and enter the code for a program that calculates the following arithmetic expression: x = a + b + c - d - e + f The operands a, b, c, d, e, f, and x should be declared

Program, assembly language program to find larges number in an array

assembly language program to find larges number in an array

Power pc-microprocessor, Power Pc : A Power PC is a microprocessor des...

Power Pc : A Power PC is a microprocessor designed to meet a standard, which was combining designed by Motorola, Apple and IBM. The PowerPC standard specifies a common instruc

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