Recent Posts

Pages: [1] 2 3 ... 10
1
The Workshop / Re: Hi resolution Sleep
« Last post by TimoVJL on Today at 06:01:07 AM »
Silly small test project with PDB for debugging.
Code: [Select]
int main(void)
{
    CoInitialize( NULL );
    IReferenceClock* pRefClock;
    HRESULT hr = CoCreateInstance(&CLSID_SystemClock, NULL, CLSCTX_INPROC_SERVER, &IID_IReferenceClock, (void**)&pRefClock );
if (pRefClock) {
long long llTime1, llTime2;
DWORD dwCookie;
hr = pRefClock->lpVtbl->GetTime(pRefClock, &llTime1);
HANDLE hEvent = CreateEvent(NULL, TRUE, FALSE, TEXT("MyEvent"));
hr = pRefClock->lpVtbl->AdviseTime(pRefClock, llTime1, 10000000, hEvent, &dwCookie);
if (!hr) {
printf("wait...");
WaitForSingleObject(hEvent, INFINITE);
} else printf("error");
hr = pRefClock->lpVtbl->GetTime(pRefClock, &llTime2);
printf("time: %lld\n", llTime2 - llTime1);
    pRefClock->lpVtbl->Release(pRefClock);
}
    CoUninitialize();
    return 0;
}
2
Assembler/Compiler Technology / Re: My New ASM Code Editor
« Last post by i Z ! on Today at 03:45:57 AM »
, with plenty of screenshots added

oh.. Sorry, the screenshots are not yet visible on the MS Store listing. Let's give it a few more hours..
3
The Workshop / Re: Hi resolution Sleep
« Last post by Siekmanski on January 23, 2019, 11:46:35 PM »
Don't know exactly, worth investigating.  :biggrin:
I'll write something tonight so we can test it further.
4
The Workshop / Re: Hi resolution Sleep
« Last post by jj2007 on January 23, 2019, 11:28:04 PM »
It looks more like a timed stalling than a timed sleep....

Yes, it's more a joke.

Quote
IReferenceClock::GetTime
IReferenceClock::AdviseTime

https://docs.microsoft.com/en-us/windows/desktop/wmformat/ireferenceclock

It's an event driven 100-nanosecond units resolution timer.

Looks interesting, but I wouldn't be surprised to find NtDelayExecution under the hood. And that one is already used in
Code: [Select]
Delay until fTime$(s:1, "HH:mm:ss.123") ; use time$(current plus one second).
5
Assembler/Compiler Technology / Re: My New ASM Code Editor
« Last post by i Z ! on January 23, 2019, 09:04:33 PM »
A Asm editor for 39,99 €  , I do not buy the cat in the bag!  :biggrin:
Without test it like trial version.

There is a 30-day trial. You should be able to access it by clicking the dropdown arrow on the Buy button.

Edit: Thanks for looking into it and for pointing this out, so other users will know, 'cause it is indeed a bit hidden.
6
Assembler/Compiler Technology / Re: My New ASM Code Editor
« Last post by ragdog on January 23, 2019, 08:59:41 PM »
Hello

A Asm editor for 39,99 €  , I do not buy the cat in the bag!  :biggrin:
Without test it like trial version.
7
Assembler/Compiler Technology / Re: My New ASM Code Editor
« Last post by i Z ! on January 23, 2019, 08:25:44 PM »
As mentioned on ACE webpage, my opening release must have looked like a joke when installed. But luckily only one person from my country downloaded it and I hope his/her PC still works well.  :P (just kidding)

But now the app is all neat and clean, with plenty of screenshots added on MS Store.(Don't mind the colors, your system's colors Window, GrayText and WindowText are used by this app.)
I made so many great changes and updates to the app code, that I should probably call it v0.2.0.0 instead of v0.1.2.0...

Please do have a look, if you're looking for an automated code editor.

8
The Workshop / Re: Hi resolution Sleep
« Last post by Siekmanski on January 23, 2019, 07:28:00 PM »
532.052         1
532.053         2
532.052         84
532.052         85
ok?

It looks more like a timed stalling than a timed sleep....

Maybe this is an option:

IReferenceClock::GetTime
IReferenceClock::AdviseTime

https://docs.microsoft.com/en-us/windows/desktop/wmformat/ireferenceclock

It's an event driven 100-nanosecond units resolution timer.

I've used it succesful in creating a Timer-Interrupt routine to get the lowest possible latency in DirectSound without wasting system resources.
9
The Campus / Re: Question about calling conventions
« Last post by Abdel Hamid on January 23, 2019, 03:58:30 PM »
@TBRANSO1 i totally agree with you my friend   :biggrin:
Well explained Mr.Hutch  :t
10
The Campus / Re: Question about calling conventions
« Last post by hutch-- on January 23, 2019, 01:14:42 PM »
Win32 had both STDCALL and C calling conventions but almost all API functions are STDCALL. A few API calls are C calling convention but if you use any of the MSVCRT function they are also C calling convention. Which you use is determined by the prototype. STDCALL requires that the called procedure balances the stack, as a mnemonic it is like this "ret 16" where there are 16 bytes offset when the procedure is called.

With C calling convention you can pass a variable number of arguments so the caller must balance the stack after the function returns to the caller.
Pages: [1] 2 3 ... 10