2

I have these expressions:

cltd
idivl   (%ecx)

when dividing by an int, and:

movl    $0, %edx
divl    (%ecx)

when dividing an unsigned long

cltd

Mysticial
  • 464,885
  • 45
  • 335
  • 332
Vinícius
  • 15,498
  • 3
  • 29
  • 53

1 Answers1

4

idiv performs signed division, div performs unsigned division.

DCoder
  • 12,962
  • 4
  • 40
  • 62