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:35 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
write a Mips program that read a string AND PRINT IT ON THE SCREEN

REP : Repeat Instruction Prefix :- This instruction is utilized as a prefix to other instructions. The instruction in which the REP prefix is provided, is executed repetitively

Hello, I just want to know how much would it cost for you to develop , debug and test a program in matlab to solve a system of equations with gauss elimination with partial pivotin

You will need to upload your main.c and factorial.s files and a .jpg photo of the output on your board using the Vista assignment upload features.  It must be submitted by the dead

can any one help me in my project by using assembly language

Write a program to mask bits D3D2D1D0 and to set bits D5D4 and to invert bits D7D6 of ax register


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

1. The microwave has a clock (hh:mm:ss am/pm) and the user should be able to change the clock at any time. 2. For cooking the user should first enter the time. The user can ente

how we can take permission