Hello,
I'm new here and I don't know if it is the right place to post my problem.
How can I implement 64 bit by 64 bit division in Assembly 8086?
I have already enabled extendeed registers with .386 directive.
Thanks!
well - when you multiply a 32-bit value by another 32-bit value, you end up with as many as 64 bits
the opposite holds true when you divide - sort of :P
but - the easy answer is to use the FPU
80-bit reals (extended reals) have 64-bits of precision
Ray has a nice tutorial to get you started, as well as a lib and some examples...
http://www.ray.masmcode.com/ (http://www.ray.masmcode.com/)
deleted
Am I missing something here?
The topic says dosbox so I would assume 16bit assembly ???
James
James,
Quote from: jcfuller on June 22, 2013, 12:41:26 AM
Am I missing something here?
The topic says dosbox so I would assume 16bit assembly ???
the entire thing is a bit more tricky, because the thread is inside the 64 bit forum. Let's see what the thread starter has to say.
Gunther
you can use 32-bit instructions in 16-bit code :P
the real question is - what size is the divisor
larger dividends/quotients is easy enough
deleted
mov rax,qwDividend
xor rdx,rdx
div qwDivisor
:P
This seems like an unreasonably difficult assignment for anyone new to programming. The Microsoft RTL function that does this was apparently coded in inline assembly in a naked function, using ~70 32-bit instructions.
long division is a good assembler exercise :P