masm division overflow
- by Help I'm in college
I'm trying divide two numbers in assembly. I'm working out of the Irvine assembly for intel computers book and I can't make division work for the life of me.
Here's my code
.code
main PROC
call division
exit
main ENDP
division PROC
mov eax, 4
mov ebx, 2
div ebx
call WriteDec
ret
divison ENDP
END main
Where WriteDec should write whatever number is in the eax register (should be set to the quotient after the division call). Instead everytime I run it visual studio crashes (the program does compile however).