title: divison x86 assembly floating exception (core dump)
body: <p>I cannot use <strong>div</strong> operator in <strong>x86</strong> again after using it the first time. When I input number 106, 106 divided by 25. First, i move 25 into <strong>%ebx</strong> then use <strong>div</strong> and it worked fine. But when I move 5 into <strong>%ebx</strong> again then take the remainder 6 divided by 5, it says floating exception. Even though, I already move the remainder to <strong>%eax</strong>, i can't use div anymore</p>
  
  <pre><code>.data
     message:
             .ascii"Enter the number of cents: \0"
     quarter:
             .ascii" Quarter(s)\n\0"
     dime:
             .ascii" Dime(s)\n\0"
     nickel:
             .ascii" Nickel(s)\n\0"
     penny:
            .ascii" Penny(s)\n\0"
  
  .text
  .global _start
  _start:
  
    mov $message, %eax         
    call PrintStringC
    call ScanInt
  
  
  
    mov $25, %ebx
    div %ebx               
  
    # print out change in Quarter
    call PrintInt
    mov $quarter, %eax
    call PrintStringC
  
    mov %edx, %eax          # move remainder to eax
  
  
  
     mov $5, %ebx          # move 5 to ebx
     div %ebx              # Cannot use div again.
  
     call PrintInt
     mov $dime, %eax
     call PrintStringC
  </code></pre>