I can't figure out how to get around this problem. How can this cause an overflow? Dividing 1193180 by any number from 1 to 255 cause an overflow (I'm filtering out zero)?Code:mov eax, 1193180 ; a constant movzx ebx, BYTE PTR [si] div ebx ;divide overflow here :(
This is for a little 16 bit program that is supposed to play a tune on the PC Speaker. The number i'm dividing by is a frequency of the note I want to play (in hertz).
I'm using this site as my guidance on this topic...
http://fly.cc.fer.hr/GDM/articles/sndmus/speaker1.html
How can I get past this problem???




Reply With Quote