Back
MASM : INTEGER : IDIV
IDIV:

Syntax:

Description:

Performs an integer division of content of Rs0 by content of Rs1, then moves quotient to Rd3 and remainder to Rd3' according to BS (bank select). Instruction is stack conditioned.

Microcode Pattern:

Takes 39 cycles to execute.
    Example: IDIV 21 3 20 3 0x1F 0x1E

	  
	MPC   BS3 C3 P3 P1 P0
	---------------------
	IDIV   0  0  00 1e 1f
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    0  0  00 00 00
	  -    3  0  21 00 00
	  -    3  0  20 00 00      

	  
Exceptions :

Configuration Register: 0x30 (CrFiluExc)

Exception No. Mask R/W Access Name
[6] 00000000 00000040 RW Division by zero (Low bank)
[7] 00000000 00000080 RW Division by zero (High bank)

Example :

IDIV 0x23 3 0x22 3 0x21 0x20 
  !! Divide content of register 0x21 by
  !! content of register 0x20, then put
  !! the quotient in register 0x23 and
  !! remainder in 0x22

APE Group Zeuthen. 2003
$Id: idiv_masm.php,v 1.2 2004/08/04 09:42:42 noe Exp $
$Id: syntax.php,v 1.8 2004/08/04 09:25:34 noe Exp $