Div-idiv-arithmetic instruction-microprocessor, Assembly Language

DIV: Unsigned Division:- This instruction performs unsigned division operation. It divides an unsigned word or double word by a 16-bit or 8-bit operand. The dividend might be in the register AX for 16-bit operation and divisor might be specified  by using any one of the addressing modes accept immediate. The result will be in the register AL (quotient) while register AH will contain the remainder. If the result is too big to fit in register AL, type 0 (divide by zero) interrupt is produced. In case of a double word dividend (32-bit), the higher word should be in register DX and lower word should be in the register AX. The divisor might be specified as already explained. The remainder and quotient , in this type of case, will be in AX and DX respectively. This instruction does not make any affect on any flag.

IDIV:  Signed Division:- This instruction performs the similar  operation  as the DIV  instruction, but with signed operands. The results are stored similarly as in case of DIV instruction in both cases of word and double word divisions. The results will be also signed numbers. The operands are also specified in the similar way as DIV instruction. Divide by 0 interrupt is produced, if the result is too big to fit in register AX (16-bit dividend operation) or register AX and register DX (32-bit  dividend  operation). All the flags are undefined after IDIV instruction. 

 

Posted Date: 10/12/2012 2:11:19 AM | Location : United States







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

Write discussion on Div-idiv-arithmetic instruction-microprocessor
Your posts are moderated
Related Questions
take an integer and its base and the base in which you want to convert the number from user and perform conversion.

Typical link to modems for synchronous and asynchronous transmissions are shown in Figure. With regard to the synchronous connections it is consider that the timing is controlled

Write an assembly language program to perform a rot13 1 conversion on characters in a text file.  The program should read charatcers from the input file, perform the rot13 convers

The real time System (RTS) : Calling the clock real-time is somewhat of a misnomer because it only shows the time setting it has been given. The RTC is the other half of chip

Code for Reading Flow & Generating LED Output The code starts with the scanning of the PORT 3, for reading the flow status to check for various flow conditions and compare to

You are to write an assembly language program called subfaq.s that computes the generalized subfactorial function of nonnegative integer inputs i0 and n. The generalized subfactori

http://www.raritanval.edu/uploadedFiles/faculty/cs/full-time/Brower/CISY256/2013Spring/CISY256%20Assembly%20Project.pdf

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


Declare 1 constant. This can be done just below the prototype section. Put the following divider above the constant section. ;************************ Constants ****************