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
Convert 751 to hex and show what it would look like stored at TheNumber WORD ? (hint: answer in hex pairs)

i have trying to do the homework but there is a mistake. (Counting positive and negative numbers and computing the average of numbers) write a program that reads an unspecified nu

DMA controller :     Steps include in transferring a block of data from I/O devices (for example a disk) to memory: 1. CPU sends a signal to initiate disk transfe

Format of Control Register The format for the control register is given in Figure. Bit 0 of this register might be one before data may be output  and  bit  two  might be  one

Execution Unit (EU) and Bus Interface Unit (BIU) : 8086 consist of two processors called EU and BIU. Two Processors can work parallel. This improves speed of execution. BIU fi

Write a MC68HC12 assembly language program to average ten 16-bit values that are stored starting at address $1100. Place the two-byte result at $1110. Use indexed addressing. Us

Introduction to Microprocessor: Microprocessor works like a CPU in a microcomputer. It's present as a single IC chip in a microcomputer. Microprocessor is the soul of the machi

write a programme the addition two 3*3 matrix and stored in from list

You have to write a subroutine (assembly language code using NASM) for the following equation.

You have been hired by the Elbonian government to write an Assembly program to help its workforce determine how much their tax will be. The tax laws in Elbonian are very simple. Th