flat assembler
Message board for the users of flat assembler.

Index > Windows > Timer Procedures

Author
Thread Post new topic Reply to topic
Morag



Joined: 17 Oct 2005
Posts: 1
Location: Canada
Morag 17 Oct 2005, 18:06
Okay, I came from MASM, and I been struggling with TimerProcs in FASM...

Code:
;FASM Attempt 1

proc _TimerProc 
pushad
...
popad
endp
    


Code:
;FASM Attempt 2

proc _TimerProc, hWnd:DWORD, IdEvent:DWORD, uElapse:DWORD, dwTime:DWORD
pushad
...
popad
endp
    


The proc is a part of the SetTimer API.

Code:
invoke SetTimer, hWnd, 1, 500, _TimerProc
    


Thanks in advance.

_________________
Assembly the top of the ladder.
Flat Assembler the top of Assembly.
Post 17 Oct 2005, 18:06
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend 17 Oct 2005, 18:35
Hmm... You didn't specify what your problem is all about. But I'll try my best to guess Smile
Code:
; (...)
proc    _TimerProc hWnd, IdEvent, uElapse, dwTime
        push    esi edi ebx
;       you can now use all params
;       and all registers as the needed one are preserved
        mov     eax, [hWnd]
        mov     esi, [IdEvent]
        mov     edi, [uElapse]
        mov     edx, [dwTime]
        pop     ebx edi esi
        ret
endp
; (...)
        invoke  SetTimer, [hWnd], 1, 500, _TimerProc
; (...)
    
Post 17 Oct 2005, 18:35
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.