Hello guys. I declared a 64 bit number like so...

qwPCTicksPerSecond dd 2 dup(0)

I also made it public with...

PUBLIC qwPCTicksPerSecond

and reference it with...

EXTERN qwPCTicksPerSecond:DWORD

Is this correct? Now, I don't know how to divide a DWORD in another module by this number. Can I use fild qwPCTicksPerSecond and then fidiv SomeNumber ? Or do I have to do something special since qwPCTicksPerSecond is really 2 DWORDs? Thanks as always. Cheers.
Posted on 2001-11-03 04:03:08 by AlexEiffel
I don't know much about public and extern, but if you want a 64bit number just use QWORD and dq as the data types.
Posted on 2001-11-03 05:11:56 by Eóin
Nice! I didn't know I could use QWORD/dq. Thanks, that will help a lot I'm sure.

Well, I thought it would help a lot, but now I don't know how to move anything around since the QWORDs dont fit in the registers. Any advice on how to use them?:(
Posted on 2001-11-03 05:18:11 by AlexEiffel
Some MMX instructions are able to deal with
64 Bit.

TD
Posted on 2001-11-03 07:56:33 by Test Department
Yeah, I didn't want to have the overhead of switching from the FPU to MMX though since it is a very small function and it wouldn't justify it. I figured out that I could just use the FPU for the QWORD stuff. Does someone know how to load the high DWORD into a general purpose register and load the Low DWORD into another?
Posted on 2001-11-03 08:43:43 by AlexEiffel
EXTERNDEF qwPCTicksPerSecond:QWORD

...will do the PUBLIC, too.
Posted on 2001-11-03 11:05:17 by bitRAKE
for the low dword do :

mov eax, DWORD PTR qwPCTicksPerSecond

for the high dword do :

mov eax, DWORD PTR qwPCTicksPerSecond[4]
Posted on 2001-11-04 03:02:28 by dr.manhattan
Thanks again guys :alright:
Posted on 2001-11-04 04:38:20 by AlexEiffel