I am trying to divide two single byte numbers, and then trying to get the quotient and remainder afterwards (placing them in single byte variables).
Here's my code so far:
;divide 8-bit number by the number 10
mov ax, [numb2]
mov cl, 10
div cl
;get quotient and remainder
mov byte[quotient], al
mov byte[remainder], ah
The quotient is stored in the al, and the remainder is stored in the ah, right?
After running it, I get a "Floating point exception (core dumped)" from the console.
What's wrong with my code?
edit: the quotient, remainder, and numb2 variables are 8-bits
using Ubuntu x86 -- NASM