Rev 3534 | Rev 8869 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3534 | Rev 3598 | ||
---|---|---|---|
Line 3... | Line 3... | ||
3 | ;; Copyright (C) KolibriOS team 2012. All rights reserved. ;; |
3 | ;; Copyright (C) KolibriOS team 2012. All rights reserved. ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
4 | ;; Distributed under terms of the GNU General Public License ;; |
5 | ;; ;; |
5 | ;; ;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
6 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 7... | Line 7... | ||
7 | 7 | ||
Line 8... | Line 8... | ||
8 | $Revision: 3534 $ |
8 | $Revision: 3598 $ |
9 | 9 | ||
Line 10... | Line 10... | ||
10 | ; Simple implementation of timers. All timers are organized in a double-linked |
10 | ; Simple implementation of timers. All timers are organized in a double-linked |
Line 80... | Line 80... | ||
80 | ; for the caller. Later this value can be used for cancel_timer_hs. |
80 | ; for the caller. Later this value can be used for cancel_timer_hs. |
81 | proc timer_hs stdcall uses ebx, deltaStart:dword, interval:dword, \ |
81 | proc timer_hs stdcall uses ebx, deltaStart:dword, interval:dword, \ |
82 | timerFunc:dword, userData:dword |
82 | timerFunc:dword, userData:dword |
83 | ; 1. Allocate memory for the TIMER structure. |
83 | ; 1. Allocate memory for the TIMER structure. |
84 | ; 1a. Call the allocator. |
84 | ; 1a. Call the allocator. |
85 | push sizeof.TIMER |
85 | movi eax, sizeof.TIMER |
86 | pop eax |
- | |
87 | call malloc |
86 | call malloc |
88 | ; 1b. If allocation failed, return (go to 5) with eax = 0. |
87 | ; 1b. If allocation failed, return (go to 5) with eax = 0. |
89 | test eax, eax |
88 | test eax, eax |
90 | jz .nothing |
89 | jz .nothing |
91 | ; 2. Setup the TIMER structure. |
90 | ; 2. Setup the TIMER structure. |