Hey everyone. I just finished my first program so I thought I would post it for you all. I'm really happy with it, even if it is unoptimized. All I could do when I started was...

mov ex, 1

...now I'm coding like a mad man! Heh, well, not quite yet, but I am definately better. Let me know what you guys think. It works almost exactly like the DirectX Utility Timer. There are also a couple of marcos I made with your help that go along with it. Here you go, enjoy...
Posted on 2001-11-09 03:39:32 by AlexEiffel

I havent tested it yet, but your macro

Add64 MACRO var1, var2, result

;// Save the registers
push eax
push edx

;// Move the high DWORDs into the registers
mov eax, dword ptr var1[4]
mov edx, dword ptr var2[4]
;// Add the high DWORDs
add eax, edx
;// Move the result into the high DWORD of result
mov dword ptr result[4], eax
;// Move the low DWORDs into the registers
mov eax, dword ptr var1
mov edx, dword ptr var2
;// Add the low DWORDs together and include the carry in case the
;// previous addition carried over
adc eax, edx
;// Store the result in the low DWORD of result
mov dword ptr result, eax

;// Restore the registers
pop edx
pop eax


isnt correct in my eyes. You should first add the low dwords and the add the high dwords with ADC.
Posted on 2001-11-09 04:06:46 by japheth
Hey japheth, thanks a lot for catching that. Strange, The timer seemed to work properly. I agree with you though, I think it is backwards.
Posted on 2001-11-09 04:18:26 by AlexEiffel
It will only effect the timer when there is really a carry in the lower part, or the upper part overflows.
Posted on 2001-11-09 09:46:09 by bitRAKE