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 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

Description Write a MIPS program that reads a string from user input, reverse each word (defined as a sequence of English alphabetic letters or numeric digits without any punctu

Assembly Language Example Programs We studied the entire instruction set of 8086/88, pseudo-ops and assembler directives. We have explained the process of entering an assembly

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

The modes are determined by the contents of the control register, whose format is given in Figure These modes are: Mode 0: If a group is in mode 0, it is divided into 2 sets.

Intel 8259 interrupt controller :  The 8088 processor has only two interrupt control inputs, and interrupt request (INTR) and non mask able interrupt (NMI). NMI are interrupts t

DEC:  Decrement :- The decrement instruction subtracts 1 from the contents of the particular memory location or register. All the conditions code flags except carry flag are affec

ALP to preform of two 16-bit numbers in register addressing mode

Write an assembly language program that defines symbolic constants for all seven days of the week

#include"lcd.asm"       ; assembly file is included for displaying lcd characters Main: PORTA EQU 0xF80  ; PORTS PORTB EQU 0xF81 PORTC EQU 0xF82 PORTD EQU 0xF83 R