Rev 8179 | Rev 8236 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
8140 | IgorA | 1 | ;const int |
2 | KOLIBRI_BORDER_SIZE = 4; |
||
3 | ;const int |
||
4 | KOLIBRI_HEADER_SIZE = 20; |
||
5 | |||
6 | ;const int |
||
7 | KOLIBRI_THREAD_DATA_USER = 0; // Thread data begin from the user dword |
||
8 | ;const int |
||
9 | KOLIBRI_THREAD_DATA_ST_BEGIN = 1; // Stack beginning follows after the user dword |
||
10 | ;const int |
||
11 | KOLIBRI_THREAD_DATA_NEXT = 2; |
||
12 | ;const int |
||
13 | KOLIBRI_THREAD_DATA_PID = 3; |
||
14 | ;const int |
||
15 | KOLIBRI_THREAD_DATA_FLAG = 4; |
||
16 | ;const int |
||
17 | KOLIBRI_THREAD_DATA_X = 5; |
||
18 | ;const int |
||
19 | KOLIBRI_THREAD_DATA_Y = 6; |
||
20 | ;const int |
||
21 | KOLIBRI_THREAD_DATA_C_WINDOW = 7; |
||
22 | ;const int |
||
23 | KOLIBRI_THREAD_DATA_C_HEADER = 8; |
||
24 | ;const int |
||
25 | KOLIBRI_THREAD_DATA_C_BORDER = 9; |
||
26 | ;const int |
||
27 | KOLIBRI_THREAD_DATA_C_TITLE = 10; |
||
28 | ;const int |
||
29 | KOLIBRI_THREAD_DATA_TITLE = 11; |
||
30 | ;const int |
||
31 | KOLIBRI_THREAD_DATA_PICTURE = 12; |
||
32 | ;const int |
||
33 | KOLIBRI_THREAD_DATA_SZ_PICT = 13; |
||
34 | ;const int |
||
35 | KOLIBRI_THREAD_DATA_LAST_SX = 14; |
||
36 | ;const int |
||
37 | KOLIBRI_THREAD_DATA_LAST_SY = 15; |
||
38 | ;const int |
||
39 | KOLIBRI_THREAD_DATA_LEN = 16; |
||
40 | |||
41 | ;const int |
||
42 | KOLIBRI_MUTEX_MAX_TIME_WAIT = 20; |
||
43 | |||
44 | ;/*** |
||
45 | |||
46 | macro segment name |
||
47 | { |
||
48 | segment name |
||
49 | if name eq _init_ | name eq _INIT_ |
||
50 | Kolibri_SegmentInit: |
||
51 | else if name eq _exit_ | name eq _EXIT_ |
||
52 | Kolibri_SegmentExit: |
||
53 | end if |
||
54 | } |
||
55 | |||
56 | macro endseg name |
||
57 | { |
||
58 | if name eq _init_ | name eq _INIT_ |
||
59 | Kolibri_SegmentInitEnd: |
||
60 | else if name eq _exit_ | name eq _EXIT_ |
||
61 | Kolibri_SegmentExitEnd: |
||
62 | end if |
||
63 | endseg name |
||
64 | } |
||
65 | |||
66 | macro Kolibri_Put_MovEaxVal_Ret address,val |
||
67 | { |
||
68 | mov byte [address],0xB8 |
||
69 | mov dword [address+4],0xC089C300 |
||
70 | mov dword [address+1],val |
||
71 | } |
||
72 | |||
73 | proc @Kolibri@Main$qv |
||
74 | and esp,not 3 |
||
75 | sub esp,1024 |
||
8165 | IgorA | 76 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 77 | mov ebx,esp |
78 | mov ecx,-1 |
||
79 | int 0x40 |
||
80 | mov ebx,[esp+26] |
||
81 | mov edx,[esp+30] |
||
82 | lea eax,[ebx-0x20] |
||
83 | add esp,1024 |
||
84 | cmp esp,eax |
||
85 | cmova esp,eax |
||
86 | and esp,not 3 |
||
87 | if defined @Kolibri@CommandLine |
||
88 | mov byte [@Kolibri@CommandLine+256], 0 |
||
89 | end if |
||
90 | xor eax,eax |
||
91 | cld |
||
92 | mov edi,@Kolibri@_ThreadTable |
||
93 | mov ecx,256 |
||
8165 | IgorA | 94 | rep stosd |
8140 | IgorA | 95 | mov esi,@Kolibri@GetPid$qv |
96 | mov edi,@Kolibri@_ThreadSavedBegProc |
||
8165 | IgorA | 97 | movsd |
98 | movsd |
||
8140 | IgorA | 99 | mov esi,@Kolibri@GetThreadData$qv |
8165 | IgorA | 100 | movsd |
101 | movsd |
||
8140 | IgorA | 102 | Kolibri_Put_MovEaxVal_Ret @Kolibri@GetPid$qv,edx |
103 | if defined KolibriHeapInit |
||
8196 | IgorA | 104 | call KolibriHeapInit ; Initialize a dynamic heap |
105 | end if |
||
8140 | IgorA | 106 | xor eax,eax |
107 | push eax |
||
108 | push eax |
||
109 | call @Kolibri@ThreadMain$qpvt1 |
||
110 | .ThreadFinish: |
||
111 | add esp,8 |
||
112 | if defined KolibriHeapFreeAndThreadFinish |
||
113 | test eax,eax |
||
114 | jz .ThreadFinish_end |
||
115 | push dword @Kolibri@_ExitProcessNow |
||
116 | push eax |
||
117 | call KolibriHeapFreeAndThreadFinish ; Free the given memory and finish the thread, |
||
118 | end if ; should exit process if second argument points to not zero. |
||
119 | .ThreadFinish_end: |
||
120 | or eax,-1 |
||
121 | int 0x40 |
||
122 | endp |
||
123 | |||
124 | proc @Kolibri@ThreadMain$qpvt1 |
||
125 | xchg ebx,[esp+4] |
||
126 | xchg ebp,[esp+8] |
||
127 | push esi edi |
||
128 | sub esp,KOLIBRI_THREAD_DATA_LEN*4 |
||
129 | mov [esp],ebx |
||
130 | mov [esp+4],ebp |
||
8165 | IgorA | 131 | mov eax,SF_SET_EVENTS_MASK |
8140 | IgorA | 132 | mov ebx,0x27 |
133 | int 0x40 |
||
134 | mov ebx,esp |
||
135 | cmp byte [@Kolibri@_ThreadSavedBegProc],0x90 |
||
136 | jz .main_else_first_check |
||
137 | Kolibri_Put_MovEaxVal_Ret @Kolibri@GetThreadData$qv,esp |
||
138 | if defined Kolibri_SegmentInit & defined Kolibri_SegmentInitEnd |
||
139 | push Kolibri_SegmentInitEnd |
||
140 | push Kolibri_SegmentInit |
||
141 | jmp .main_after_first_check |
||
142 | end if |
||
143 | .main_else_first_check: |
||
144 | xor eax,eax |
||
145 | push eax eax |
||
146 | .main_after_first_check: |
||
147 | push ebx |
||
148 | call @@Kolibri@_CallStart$qppvpvt2 |
||
149 | add esp,12 |
||
150 | test al,al |
||
151 | jnz .main_test_close_first |
||
152 | jmp .main_end |
||
153 | .main_close_first: |
||
154 | btr dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],31 |
||
8165 | IgorA | 155 | if defined @@KolibriOnClose$qppv |
8140 | IgorA | 156 | push esp |
157 | call @@KolibriOnClose$qppv |
||
158 | pop ecx |
||
159 | test al,al |
||
160 | jnz .main_end |
||
8165 | IgorA | 161 | end if |
8140 | IgorA | 162 | .main_test_close_first: |
163 | cmp dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],0 |
||
164 | jl .main_close_first |
||
165 | ; push esp |
||
166 | ; push dword 1 |
||
167 | ; call @Kolibri@Redraw$qippv |
||
168 | ; add esp,8 |
||
169 | .main_paint_msg: |
||
170 | or dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],3 |
||
171 | sub esp,1024 |
||
8165 | IgorA | 172 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 173 | mov ebx,esp |
174 | mov ecx,-1 |
||
175 | int 0x40 |
||
176 | mov eax,[esp+34] |
||
177 | mov ebx,[esp+38] |
||
178 | mov ecx,[esp+42] |
||
179 | mov edx,[esp+46] |
||
180 | add esp,1024 |
||
181 | cmp ecx,[esp+KOLIBRI_THREAD_DATA_LAST_SX*4] |
||
182 | jnz .main_size |
||
183 | cmp edx,[esp+KOLIBRI_THREAD_DATA_LAST_SY*4] |
||
184 | jz .main_paint |
||
185 | .main_size: |
||
186 | mov [esp+KOLIBRI_THREAD_DATA_LAST_SX*4],ecx |
||
187 | mov [esp+KOLIBRI_THREAD_DATA_LAST_SY*4],edx |
||
8165 | IgorA | 188 | if defined @@KolibriOnSize$qpippv |
8140 | IgorA | 189 | push edx |
190 | push ecx |
||
191 | push ebx |
||
192 | push eax |
||
193 | lea ecx,[esp+16] |
||
194 | mov edx,esp |
||
195 | push ecx |
||
196 | push edx |
||
197 | call @@KolibriOnSize$qpippv |
||
198 | add esp,24 |
||
8165 | IgorA | 199 | end if |
8140 | IgorA | 200 | test dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],3 |
201 | jz .main_cycle |
||
202 | .main_paint: |
||
203 | cmp dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],0 |
||
204 | jl .main_close |
||
205 | push esp |
||
206 | push dword 0 |
||
207 | call @Kolibri@Redraw$qippv |
||
208 | add esp,8 |
||
209 | .main_cycle: |
||
8165 | IgorA | 210 | mov eax,SF_CHECK_EVENT |
8140 | IgorA | 211 | .main_message: |
212 | cmp dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],0 |
||
213 | jl .main_close |
||
214 | int 0x40 |
||
215 | test eax,eax |
||
216 | jnz .main_on_message |
||
217 | cmp dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],0 |
||
218 | jne .main_paint |
||
8165 | IgorA | 219 | if defined @@KolibriOnIdle$qppv |
8140 | IgorA | 220 | push esp |
221 | call @@KolibriOnIdle$qppv |
||
222 | pop ecx |
||
8165 | IgorA | 223 | else |
224 | or eax,-1 |
||
225 | end if |
||
8140 | IgorA | 226 | test eax,eax |
227 | jz .main_cycle |
||
228 | jl .main_wait_message |
||
229 | mov ebx,eax |
||
8165 | IgorA | 230 | mov eax,SF_WAIT_EVENT_TIMEOUT |
8140 | IgorA | 231 | jmp .main_message |
232 | .main_wait_message: |
||
8165 | IgorA | 233 | mov eax,SF_WAIT_EVENT |
8140 | IgorA | 234 | jmp .main_message |
8165 | IgorA | 235 | if defined @@KolibriOnKeyPress$qppv |
8140 | IgorA | 236 | .main_key_press: |
237 | push esp |
||
238 | call @@KolibriOnKeyPress$qppv |
||
239 | pop ecx |
||
240 | jmp .main_cycle |
||
8165 | IgorA | 241 | end if |
242 | if defined @@KolibriOnMouse$qppv |
||
8140 | IgorA | 243 | .main_mouse: |
244 | push esp |
||
245 | call @@KolibriOnMouse$qppv |
||
246 | pop ecx |
||
247 | jmp .main_cycle |
||
8165 | IgorA | 248 | end if |
249 | |||
250 | align 4 |
||
8140 | IgorA | 251 | .main_on_message: |
252 | dec eax |
||
253 | jz .main_paint_msg |
||
254 | dec eax |
||
8165 | IgorA | 255 | if defined @@KolibriOnKeyPress$qppv |
8140 | IgorA | 256 | jz .main_key_press |
8165 | IgorA | 257 | else |
258 | jz .main_cycle |
||
259 | end if |
||
8140 | IgorA | 260 | cmp eax,4 |
8165 | IgorA | 261 | if defined @@KolibriOnMouse$qppv |
8140 | IgorA | 262 | jz .main_mouse |
8165 | IgorA | 263 | else |
264 | jz .main_cycle |
||
265 | end if |
||
8140 | IgorA | 266 | dec eax |
267 | jnz .main_cycle |
||
8165 | IgorA | 268 | |
269 | align 4 |
||
8140 | IgorA | 270 | .main_button: |
8165 | IgorA | 271 | mov eax,SF_GET_BUTTON |
8140 | IgorA | 272 | int 0x40 |
8165 | IgorA | 273 | shr eax,8 |
274 | cmp eax,1 |
||
275 | je .main_close |
||
276 | if defined @@KolibriOnButton$qlppv |
||
277 | push esp |
||
278 | push eax |
||
279 | call @@KolibriOnButton$qlppv |
||
280 | add esp,8 |
||
281 | end if |
||
282 | jmp .main_cycle |
||
8140 | IgorA | 283 | .main_close: |
284 | btr dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],31 |
||
8165 | IgorA | 285 | if defined @@KolibriOnClose$qppv |
8140 | IgorA | 286 | push esp |
287 | call @@KolibriOnClose$qppv |
||
288 | pop ecx |
||
289 | test al,al |
||
290 | jz .main_button |
||
8165 | IgorA | 291 | end if |
8140 | IgorA | 292 | .main_end: |
293 | mov ebx,esp |
||
294 | lock dec dword [@Kolibri@_ThreadNumber] |
||
295 | if defined Kolibri_SegmentExit & defined Kolibri_SegmentExitEnd |
||
296 | jnz .main_else_last_check |
||
297 | push Kolibri_SegmentExitEnd |
||
298 | push Kolibri_SegmentExit |
||
299 | jmp .main_after_last_check |
||
300 | end if |
||
301 | .main_else_last_check: |
||
302 | xor eax,eax |
||
303 | push eax |
||
304 | push eax |
||
305 | .main_after_last_check: |
||
306 | push ebx |
||
307 | call @@Kolibri@_RemoveThreadData$qppvpvt2 |
||
308 | add esp,12 |
||
309 | lock inc dword [@Kolibri@_ThreadScanCount+4] |
||
310 | mov ebx,1 |
||
311 | jmp .main_end_wait |
||
312 | .main_end_wait_loop: |
||
8165 | IgorA | 313 | mov eax,SF_SLEEP |
8140 | IgorA | 314 | int 0x40 |
315 | shl ebx,1 |
||
316 | cmp ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
317 | jna .main_end_wait |
||
318 | mov ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
319 | .main_end_wait: |
||
320 | cmp dword [@Kolibri@_ExitProcessNow],0 |
||
321 | jnz @Kolibri@ExitProcess$qv |
||
322 | cmp dword [@Kolibri@_ThreadScanCount],0 |
||
323 | jnz .main_end_wait_loop |
||
324 | lock dec dword [@Kolibri@_ThreadScanCount+4] |
||
325 | mov ebp,[esp+4] |
||
326 | mov ebx,[esp] |
||
327 | add esp,KOLIBRI_THREAD_DATA_LEN*4 |
||
328 | mov eax,ebp |
||
329 | pop edi esi |
||
330 | xchg ebp,[esp+8] |
||
331 | xchg ebx,[esp+4] |
||
332 | ret |
||
333 | endp |
||
334 | |||
335 | macro call func |
||
336 | { |
||
337 | if func eq __chkstk |
||
338 | sub esp,eax |
||
339 | else |
||
340 | call func |
||
341 | end if |
||
342 | } |
||
343 | |||
344 | proc @Kolibri@Redraw$qippv |
||
345 | push ebp |
||
346 | mov ebp,[esp+12] |
||
347 | mov edx,[ebp+KOLIBRI_THREAD_DATA_FLAG*4] |
||
348 | cmp dword [esp+8],0 |
||
349 | jl .redraw_only_inv |
||
350 | jz .redraw_no_frame |
||
351 | or dl,2 |
||
352 | .redraw_no_frame: |
||
353 | bt edx,30 |
||
354 | jnc .redraw_begin |
||
355 | or dl,1 |
||
356 | mov [ebp+KOLIBRI_THREAD_DATA_FLAG*4],edx |
||
357 | jmp .redraw_end |
||
358 | .redraw_only_inv: |
||
359 | test dl,3 |
||
360 | jnz .redraw_no_frame |
||
361 | .redraw_end: |
||
362 | pop ebp |
||
363 | ret |
||
364 | .redraw_begin: |
||
365 | push ebx esi edi |
||
366 | and dword [ebp+KOLIBRI_THREAD_DATA_FLAG*4],0xFFFFFFFC |
||
8165 | IgorA | 367 | mov eax,SF_REDRAW |
368 | mov ebx,SSF_BEGIN_DRAW |
||
8140 | IgorA | 369 | int 0x40 |
370 | test dl,2 |
||
371 | jz .redraw_picture |
||
8165 | IgorA | 372 | mov eax,SF_STYLE_SETTINGS |
373 | mov ebx,SSF_GET_SKIN_HEIGHT |
||
8140 | IgorA | 374 | int 0x40 |
375 | mov ebx,[ebp+KOLIBRI_THREAD_DATA_X*4] |
||
376 | add ebx,2*5-1 |
||
377 | mov ecx,[ebp+KOLIBRI_THREAD_DATA_Y*4] |
||
378 | add cx,ax |
||
379 | add ecx,5-1 |
||
380 | mov edx,[ebp+KOLIBRI_THREAD_DATA_C_WINDOW*4] |
||
381 | mov edi,[ebp+KOLIBRI_THREAD_DATA_TITLE*4] |
||
382 | xor eax,eax |
||
383 | int 0x40 |
||
384 | .redraw_picture: |
||
385 | call @@KolibriOnPaint$qv |
||
386 | .redraw_end_draw: |
||
8165 | IgorA | 387 | mov eax,SF_REDRAW |
388 | mov ebx,SSF_END_DRAW |
||
8140 | IgorA | 389 | int 0x40 |
390 | pop edi esi ebx ebp |
||
391 | ret |
||
392 | endp |
||
393 | |||
394 | proc @Kolibri@MoveWindow$qxpxi uses ebx esi |
||
395 | mov eax,[esp+12] |
||
396 | mov ebx,[eax] |
||
397 | mov ecx,[eax+4] |
||
398 | mov edx,[eax+8] |
||
399 | mov esi,[eax+12] |
||
8165 | IgorA | 400 | mov eax,SF_CHANGE_WINDOW |
8140 | IgorA | 401 | int 0x40 |
402 | ret |
||
403 | endp |
||
404 | |||
8165 | IgorA | 405 | proc @Kolibri@ExitDebug$qv |
406 | push dword [@Kolibri@DebugPrefix] |
||
407 | call @Kolibri@DebugPutString$qpxc |
||
408 | mov dword [esp],Kolibri_debug_string |
||
409 | call @Kolibri@DebugPutString$qpxc |
||
410 | pop ecx |
||
411 | jmp @Kolibri@ExitProcess$qv |
||
412 | endp |
||
413 | |||
8140 | IgorA | 414 | proc @Kolibri@ExitProcess$qv |
415 | lock bts dword [@Kolibri@_ExitProcessNow],0 |
||
416 | jc .exit_process_wait |
||
417 | sub esp,1024 |
||
8165 | IgorA | 418 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 419 | mov ebx,esp |
420 | mov ecx,-1 |
||
421 | int 0x40 |
||
422 | mov esi,eax |
||
423 | mov edi,[esp+30] |
||
424 | .exit_process_loop: |
||
8165 | IgorA | 425 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 426 | mov ebx,esp |
427 | mov ecx,esi |
||
428 | int 0x40 |
||
429 | mov eax,[esp+30] |
||
430 | cmp eax,edi |
||
431 | jz .exit_process_continue |
||
432 | mov ebx,eax |
||
433 | or bl,15 |
||
434 | inc ebx |
||
435 | jz .exit_process_continue |
||
436 | mov ebx,eax |
||
437 | call Kolibri_HashInt |
||
438 | movzx eax,al |
||
439 | mov eax,dword [@Kolibri@_ThreadTable+eax*4] |
||
440 | jmp .exit_process_test |
||
441 | .exit_process_next: |
||
442 | mov eax,dword [eax+KOLIBRI_THREAD_DATA_NEXT*4] |
||
443 | .exit_process_test: |
||
444 | test eax,eax |
||
445 | jz .exit_process_continue |
||
446 | cmp ebx,[eax+KOLIBRI_THREAD_DATA_PID*4] |
||
447 | jnz .exit_process_next |
||
8165 | IgorA | 448 | mov eax,SF_SYSTEM |
449 | mov ebx,SSF_TERMINATE_THREAD |
||
8140 | IgorA | 450 | mov ecx,esi |
451 | int 0x40 |
||
452 | .exit_process_continue: |
||
453 | dec esi |
||
454 | jnl .exit_process_loop |
||
455 | add esp,1024 |
||
456 | mov dword [@Kolibri@_ExitProcessNow],-1 |
||
457 | if defined EMULATOR |
||
458 | int3 |
||
459 | call 0x76543210 |
||
460 | end if |
||
461 | .exit_process_end: |
||
462 | mov dword [@Kolibri@_ThreadMutex],0 |
||
463 | or eax,-1 |
||
464 | int 0x40 |
||
465 | .exit_process_wait: |
||
8165 | IgorA | 466 | mov eax,SF_SLEEP |
8140 | IgorA | 467 | mov ebx,1 |
468 | .exit_process_wait_loop: |
||
469 | cmp dword [@Kolibri@_ExitProcessNow],0 |
||
470 | jl .exit_process_end |
||
471 | int 0x40 |
||
472 | shl ebx,1 |
||
473 | cmp ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
474 | jna .exit_process_wait_loop |
||
475 | mov ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
476 | jmp .exit_process_wait_loop |
||
477 | endp |
||
478 | |||
479 | proc @Kolibri@ExitThread$qppv,@Kolibri@ThreadMain$qpvt1 |
||
480 | mov esp,[esp+4] |
||
481 | jmp Kolibri_main_end |
||
482 | endp |
||
483 | |||
484 | proc @Kolibri@ReturnMessageLoop$qppv,@Kolibri@ThreadMain$qpvt1 |
||
485 | mov esp,[esp+4] |
||
486 | bt dword [esp+KOLIBRI_THREAD_DATA_FLAG*4],30 |
||
487 | jc Kolibri_main_end |
||
488 | jmp Kolibri_main_cycle |
||
489 | endp |
||
490 | |||
491 | proc @Kolibri@Delay$qui uses ebx |
||
8165 | IgorA | 492 | mov eax,SF_SLEEP |
8140 | IgorA | 493 | mov ebx,[esp+8] |
494 | int 0x40 |
||
495 | ret |
||
496 | endp |
||
497 | |||
498 | proc @Kolibri@Clock$qv uses ebx |
||
8165 | IgorA | 499 | mov eax,SF_SYSTEM_GET |
500 | mov ebx,SSF_TIME_COUNT |
||
8140 | IgorA | 501 | int 0x40 |
502 | ret |
||
503 | endp |
||
504 | |||
8153 | maxcodehac | 505 | proc @Kolibri@DrawButton$qllllll uses ebx esi |
8165 | IgorA | 506 | mov eax,SF_DEFINE_BUTTON |
507 | mov ebx,[esp+12-2+8] |
||
8153 | maxcodehac | 508 | mov bx,[esp+20+8] |
8165 | IgorA | 509 | mov ecx,[esp+16-2+8] |
8153 | maxcodehac | 510 | mov cx,[esp+24+8] |
511 | mov edx,[esp+4+8] |
||
512 | mov esi,[esp+8+8] |
||
513 | int 0x40 |
||
514 | ret |
||
515 | endp |
||
516 | |||
8165 | IgorA | 517 | proc @Kolibri@GetPackedTime$qv |
518 | mov eax,SF_GET_SYS_TIME |
||
519 | int 0x40 |
||
520 | ret |
||
521 | endp |
||
522 | |||
8140 | IgorA | 523 | proc @Kolibri@GetTime$qpi |
8165 | IgorA | 524 | mov eax,SF_GET_SYS_TIME |
8140 | IgorA | 525 | int 0x40 |
526 | mov edx,[esp+4] |
||
527 | movzx ecx,al |
||
528 | shr ecx,4 |
||
529 | and al,0x0F |
||
530 | imul ecx,10 |
||
531 | add cl,al |
||
532 | mov dword [edx+8],ecx |
||
533 | mov cl,ah |
||
534 | shr ecx,4 |
||
535 | and ah,0x0F |
||
536 | imul ecx,10 |
||
537 | add cl,ah |
||
538 | mov dword [edx+4],ecx |
||
539 | bswap eax |
||
540 | mov cl,ah |
||
541 | shr ecx,4 |
||
542 | and ah,0x0F |
||
543 | imul ecx,10 |
||
544 | add cl,ah |
||
545 | mov dword [edx],ecx |
||
546 | ret |
||
547 | endp |
||
548 | |||
549 | proc @Kolibri@GetPackedDate$qv |
||
8165 | IgorA | 550 | mov eax,SF_GET_SYS_DATE |
8140 | IgorA | 551 | int 0x40 |
552 | ret |
||
553 | endp |
||
554 | |||
555 | proc @Kolibri@GetDate$qpi |
||
8165 | IgorA | 556 | mov eax,SF_GET_SYS_DATE |
8140 | IgorA | 557 | int 0x40 |
558 | mov edx,[esp+4] |
||
559 | movzx ecx,al |
||
560 | shr ecx,4 |
||
561 | and al,0x0F |
||
562 | imul ecx,10 |
||
563 | add cl,al |
||
564 | mov dword [edx+4],ecx |
||
565 | mov cl,ah |
||
566 | shr ecx,4 |
||
567 | and ah,0x0F |
||
568 | imul ecx,10 |
||
569 | add cl,ah |
||
570 | mov dword [edx],ecx |
||
571 | bswap eax |
||
572 | mov cl,ah |
||
573 | shr ecx,4 |
||
574 | and ah,0x0F |
||
575 | imul ecx,10 |
||
576 | add cl,ah |
||
577 | mov dword [edx+8],ecx |
||
578 | ret |
||
579 | endp |
||
580 | |||
581 | proc @Kolibri@ReadCommonColors$qpui uses ebx |
||
8165 | IgorA | 582 | mov eax,SF_STYLE_SETTINGS |
583 | mov ebx,SSF_GET_COLORS |
||
8140 | IgorA | 584 | mov ecx,[esp+8] |
585 | mov edx,40 |
||
586 | int 0x40 |
||
587 | ret |
||
588 | endp |
||
589 | |||
590 | proc @Kolibri@DrawText$qssipxc uses ebx |
||
8165 | IgorA | 591 | mov eax,SF_DRAW_TEXT |
8140 | IgorA | 592 | mov ebx,[esp+8-2] |
593 | mov bx,[esp+12] |
||
594 | mov ecx,[esp+16] |
||
595 | or ecx,0x80000000 |
||
596 | mov edx,[esp+20] |
||
597 | int 0x40 |
||
598 | ret |
||
599 | endp |
||
600 | |||
8165 | IgorA | 601 | proc @Kolibri@SetWindowCaption$qpxc uses ebx |
602 | mov eax,SF_SET_CAPTION |
||
603 | mov ebx,2 |
||
604 | mov ecx,[esp+8] |
||
605 | int 0x40 |
||
606 | ret |
||
607 | endp |
||
608 | |||
8140 | IgorA | 609 | proc @Kolibri@GetProcessInfo$qpuipct1t1piui uses ebx esi edi |
610 | sub esp,1024 |
||
8165 | IgorA | 611 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 612 | mov ebx,esp |
613 | mov ecx,[1024+12+24+esp] |
||
614 | int 0x40 |
||
615 | xor edi,edi |
||
616 | or edi,[1024+12+4+esp] |
||
617 | jz .get_proc_info_no_usecpu |
||
618 | mov ecx,[esp] |
||
619 | mov [edi],ecx |
||
620 | xor edi,edi |
||
621 | .get_proc_info_no_usecpu: |
||
622 | or edi,[1024+12+8+esp] |
||
623 | jz .get_proc_info_no_name |
||
624 | lea esi,[esp+10] |
||
625 | cld |
||
8165 | IgorA | 626 | movsd |
627 | movsd |
||
628 | movsd |
||
8140 | IgorA | 629 | mov byte [edi],0 |
630 | xor edi,edi |
||
631 | .get_proc_info_no_name: |
||
632 | or edi,[1024+12+12+esp] |
||
633 | jz .get_proc_info_no_mem |
||
634 | mov ecx,[esp+26] |
||
635 | mov [edi],ecx |
||
636 | xor edi,edi |
||
637 | .get_proc_info_no_mem: |
||
638 | or edi,[1024+12+16+esp] |
||
639 | jz .get_proc_info_no_pid |
||
640 | mov ecx,[esp+30] |
||
641 | mov [edi],ecx |
||
642 | xor edi,edi |
||
643 | .get_proc_info_no_pid: |
||
644 | or edi,[1024+12+20+esp] |
||
645 | jz .get_proc_info_no_rect |
||
646 | lea esi,[esp+34] |
||
647 | cld |
||
8165 | IgorA | 648 | movsd |
649 | movsd |
||
650 | movsd |
||
651 | movsd |
||
8140 | IgorA | 652 | xor edi,edi |
653 | .get_proc_info_no_rect: |
||
654 | add esp,1024 |
||
655 | ret |
||
656 | endp |
||
657 | |||
658 | proc @Kolibri@GetPid$qv uses ebx |
||
659 | sub esp,1024 |
||
8165 | IgorA | 660 | mov eax,SF_THREAD_INFO |
8140 | IgorA | 661 | mov ebx,esp |
662 | mov ecx,-1 |
||
663 | int 0x40 |
||
664 | mov eax,[esp+30] |
||
665 | add esp,1024 |
||
666 | ret |
||
667 | endp |
||
668 | |||
669 | proc @Kolibri@GetPid$qppv |
||
670 | mov ecx,[esp+4] |
||
671 | mov eax,[ecx+KOLIBRI_THREAD_DATA_PID*4] |
||
672 | ret |
||
673 | endp |
||
674 | |||
675 | proc @Kolibri@_HashByte$qui |
||
676 | @Kolibri@_HashWord$qui: |
||
677 | @Kolibri@_HashDword$qui: |
||
678 | mov eax,[esp+4] |
||
679 | Kolibri_HashInt: |
||
680 | mul dword [Kolibri_hash_int_val0] |
||
681 | xor eax,edx |
||
682 | bswap eax |
||
683 | mul dword [Kolibri_hash_int_val1] |
||
684 | shrd eax,edx,14 |
||
685 | bswap eax |
||
686 | lea eax,[eax+4*eax] |
||
687 | ror eax,9 |
||
688 | ret |
||
689 | endp |
||
690 | |||
8165 | IgorA | 691 | if defined @Kolibri@_HashByte$qui | defined @Kolibri@_HashWord$qui | defined @Kolibri@_HashDword$qui |
8140 | IgorA | 692 | Kolibri_hash_int_val0: |
693 | dd 0xA82F94C5 |
||
694 | Kolibri_hash_int_val1: |
||
695 | dd 0x9193780B |
||
8165 | IgorA | 696 | end if |
8140 | IgorA | 697 | |
698 | proc @Kolibri@GetThreadData$qv |
||
699 | call @Kolibri@GetPid$qv |
||
700 | push eax |
||
701 | call @Kolibri@GetThreadData$qui |
||
702 | pop ecx |
||
703 | ret |
||
704 | endp |
||
705 | |||
706 | proc @Kolibri@GetThreadData$qui |
||
707 | mov eax,[esp+4] |
||
708 | call Kolibri_HashInt |
||
709 | movzx eax,al |
||
710 | cmp dword [@Kolibri@_ThreadScanCount+4],0 |
||
711 | jnz .get_thread_data_wait |
||
712 | .get_thread_data_nowait: |
||
713 | lock inc dword [@Kolibri@_ThreadScanCount] |
||
714 | mov eax,dword [@Kolibri@_ThreadTable+eax*4] |
||
715 | mov ecx,[esp+4] |
||
716 | jmp .get_thread_data_test |
||
717 | .get_thread_data_loop: |
||
718 | mov eax,dword [eax+KOLIBRI_THREAD_DATA_NEXT*4] |
||
719 | .get_thread_data_test: |
||
720 | test eax,eax |
||
721 | jz .get_thread_data_end |
||
722 | cmp ecx,[eax+KOLIBRI_THREAD_DATA_PID*4] |
||
723 | jnz .get_thread_data_loop |
||
724 | .get_thread_data_end: |
||
725 | lock dec dword [@Kolibri@_ThreadScanCount] |
||
726 | ret |
||
727 | .get_thread_data_wait: |
||
728 | push eax ebx |
||
8165 | IgorA | 729 | mov eax,SF_SLEEP |
8140 | IgorA | 730 | mov ebx,1 |
731 | .get_thread_data_wait_loop: |
||
732 | int 0x40 |
||
733 | cmp dword [@Kolibri@_ThreadScanCount+4],0 |
||
734 | jz .get_thread_data_wait_end |
||
735 | shl ebx,1 |
||
736 | cmp ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
737 | jna .get_thread_data_wait_loop |
||
738 | mov ebx,KOLIBRI_MUTEX_MAX_TIME_WAIT |
||
739 | jmp .get_thread_data_wait_loop |
||
740 | .get_thread_data_wait_end: |
||
741 | pop ebx eax |
||
742 | jmp .get_thread_data_nowait |
||
743 | endp |
||
744 | |||
745 | proc @Kolibri@_GetSkinHeader$qv uses ebx |
||
8165 | IgorA | 746 | mov eax,SF_STYLE_SETTINGS |
747 | mov ebx,SSF_GET_SKIN_HEIGHT |
||
8140 | IgorA | 748 | int 0x40 |
749 | ret |
||
750 | endp |
||
751 | |||
752 | proc @Kolibri@GetScreenSize$qrust1 |
||
8165 | IgorA | 753 | mov eax,SF_GET_SCREEN_SIZE |
8140 | IgorA | 754 | int 0x40 |
755 | mov ecx,[esp+8] |
||
756 | mov word [ecx],ax |
||
757 | mov ecx,[esp+4] |
||
758 | shr eax,16 |
||
759 | mov word [ecx],ax |
||
760 | ret |
||
761 | endp |
||
762 | |||
763 | proc Kolibri_MutexLockNoWait |
||
764 | pop eax |
||
765 | xor al,al |
||
766 | ret |
||
767 | endp |
||
768 | |||
769 | proc Kolibri_MutexLockWait uses ebx |
||
8165 | IgorA | 770 | mov eax,SF_SLEEP |
8140 | IgorA | 771 | xor ebx,ebx |
772 | .lock_wait_cycle: |
||
773 | int 0x40 |
||
774 | shl byte [ecx],1 |
||
775 | jz .lock_wait_cycle |
||
776 | mov al,1 |
||
777 | ret |
||
778 | endp |
||
779 | |||
780 | proc Kolibri_MutexLockWaitTime |
||
781 | cmp dword [esp+12],0 |
||
782 | jng .MutexLockWait |
||
783 | push ebx edx |
||
784 | mov edx,[esp+20] |
||
8165 | IgorA | 785 | mov eax,SF_SYSTEM_GET |
786 | mov ebx,SSF_TIME_COUNT |
||
8140 | IgorA | 787 | int 0x40 |
788 | add edx,eax |
||
789 | .lock_wait_time_cycle: |
||
8165 | IgorA | 790 | mov eax,SF_SLEEP |
8140 | IgorA | 791 | xor ebx,ebx |
792 | int 0x40 |
||
793 | shl byte [ecx],1 |
||
794 | jnz .lock_wait_time_ret_true |
||
8165 | IgorA | 795 | mov eax,SF_SYSTEM_GET |
796 | mov ebx,SSF_TIME_COUNT |
||
8140 | IgorA | 797 | int 0x40 |
798 | cmp eax,edx |
||
799 | js .lock_wait_time_cycle |
||
800 | pop edx ebx eax |
||
801 | xor al,al |
||
802 | ret |
||
803 | .lock_wait_time_ret_true: |
||
804 | pop edx ebx |
||
805 | mov al,1 |
||
806 | ret |
||
807 | endp |
||
808 | |||
809 | proc Kolibri_MutexLock |
||
810 | shl byte [ecx],1 |
||
811 | jnz .lock_first |
||
812 | call eax |
||
813 | .lock_first: |
||
814 | mov al,1 |
||
815 | ret |
||
816 | endp |
||
817 | |||
818 | proc @Kolibri@TryLock$qp14Kolibri@TMutex |
||
819 | mov eax,Kolibri_MutexLockNoWait |
||
820 | mov ecx,[esp+4] |
||
821 | jmp Kolibri_MutexLock |
||
822 | endp |
||
823 | |||
824 | proc @Kolibri@Lock$qp14Kolibri@TMutex |
||
825 | mov eax,Kolibri_MutexLockWait |
||
826 | mov ecx,[esp+4] |
||
827 | jmp Kolibri_MutexLock |
||
828 | endp |
||
829 | |||
830 | proc @Kolibri@LockTime$qp14Kolibri@TMutexi |
||
831 | mov eax,Kolibri_MutexLockWaitTime |
||
832 | mov ecx,[esp+4] |
||
833 | jmp Kolibri_MutexLock |
||
834 | endp |
||
835 | |||
836 | proc @Kolibri@UnLock$qp14Kolibri@TMutex |
||
837 | mov ecx,[esp+4] |
||
838 | shr byte [ecx],1 |
||
839 | jz .unlock_pause |
||
840 | ret |
||
841 | .unlock_pause: |
||
842 | mov byte [ecx],0x40 |
||
843 | push ebx |
||
8165 | IgorA | 844 | mov eax,SF_SLEEP |
8140 | IgorA | 845 | xor ebx,ebx |
846 | int 0x40 |
||
847 | pop ebx |
||
848 | ret |
||
849 | endp |
||
850 | |||
851 | proc Kolibri_MutexLockRec |
||
852 | shl byte [ecx],1 |
||
853 | jng .lock_first |
||
854 | cmp dword [ecx+4],edx |
||
855 | jz .lock_rec_self |
||
856 | call eax |
||
857 | .lock_rec_first: |
||
858 | mov al,1 |
||
859 | mov dword [ecx+4],edx |
||
860 | ret |
||
861 | .lock_rec_self: |
||
862 | mov al,1 |
||
863 | add dword [ecx],0x100 |
||
864 | jc .lock_rec_overflow |
||
865 | ret |
||
866 | .lock_rec_overflow: |
||
867 | push dword [@Kolibri@DebugPrefix] |
||
868 | call @Kolibri@DebugPutString$qpxc |
||
869 | mov dword [esp],Kolibri_try_lock_rec_overflow_string |
||
870 | call @Kolibri@DebugPutString$qpxc |
||
871 | pop ecx |
||
8165 | IgorA | 872 | jmp @Kolibri@ExitDebug$qv |
8140 | IgorA | 873 | endp |
874 | |||
875 | proc @Kolibri@TryLock$qp16Kolibri@TRecMutexui |
||
876 | mov eax,Kolibri_MutexLockNoWait |
||
877 | mov ecx,[esp+4] |
||
878 | mov edx,[esp+8] |
||
879 | jmp Kolibri_MutexLockRec |
||
880 | endp |
||
881 | |||
882 | proc @Kolibri@Lock$qp16Kolibri@TRecMutexui |
||
883 | mov eax,Kolibri_MutexLockWait |
||
884 | mov ecx,[esp+4] |
||
885 | mov edx,[esp+8] |
||
886 | jmp Kolibri_MutexLockRec |
||
887 | endp |
||
888 | |||
889 | proc @Kolibri@LockTime$qp16Kolibri@TRecMutexiui |
||
890 | mov eax,Kolibri_MutexLockWaitTime |
||
891 | mov ecx,[esp+4] |
||
892 | mov edx,[esp+12] |
||
893 | jmp Kolibri_MutexLockRec |
||
894 | endp |
||
895 | |||
896 | proc @Kolibri@UnLock$qp16Kolibri@TRecMutexui |
||
897 | mov ecx,[esp+4] |
||
898 | mov edx,[esp+8] |
||
899 | cmp dword [ecx+4],edx |
||
900 | jnz .unlock_rec_notlocked |
||
901 | sub dword [ecx],0x100 |
||
902 | jnc .unlock_rec_end |
||
903 | add dword [ecx],0x100 |
||
904 | shl byte [ecx],1 |
||
905 | shr byte [ecx],2 |
||
906 | jng .unlock_rec_pause |
||
907 | .unlock_rec_end: |
||
908 | ret |
||
909 | .unlock_rec_pause: |
||
910 | mov byte [ecx],0x20 |
||
911 | push ebx |
||
8165 | IgorA | 912 | mov eax,SF_SLEEP |
8140 | IgorA | 913 | xor ebx,ebx |
914 | int 0x40 |
||
915 | pop ebx |
||
916 | ret |
||
917 | .unlock_rec_notlocked: |
||
918 | push dword [@Kolibri@DebugPrefix] |
||
919 | call @Kolibri@DebugPutString$qpxc |
||
920 | mov dword [esp],Kolibri_unlock_rec_notlocked_string |
||
921 | call @Kolibri@DebugPutString$qpxc |
||
922 | pop ecx |
||
8165 | IgorA | 923 | jmp @Kolibri@ExitDebug$qv |
8140 | IgorA | 924 | endp |
925 | |||
926 | proc @Kolibri@DebugPutChar$qc |
||
927 | mov cl,byte [esp+4] |
||
928 | cmp cl,13 |
||
929 | jz .debug_put_char_ret |
||
930 | push ebx |
||
931 | cmp cl,10 |
||
932 | jz .debug_put_char_enter |
||
933 | .debug_put_char_after_cmp: |
||
8165 | IgorA | 934 | mov eax,SF_BOARD |
935 | mov ebx,SSF_DEBUG_WRITE |
||
8140 | IgorA | 936 | int 0x40 |
937 | pop ebx |
||
938 | .debug_put_char_ret: |
||
939 | ret |
||
940 | .debug_put_char_enter: |
||
941 | mov cl,13 |
||
8165 | IgorA | 942 | mov eax,SF_BOARD |
943 | mov ebx,SSF_DEBUG_WRITE |
||
8140 | IgorA | 944 | int 0x40 |
945 | mov cl,10 |
||
946 | jmp .debug_put_char_after_cmp |
||
947 | endp |
||
948 | |||
8165 | IgorA | 949 | proc @Kolibri@DebugPutString$qpxc uses esi |
8140 | IgorA | 950 | push dword 0 |
951 | mov esi,dword [esp+12] |
||
952 | jmp .debug_put_string_test |
||
953 | .debug_put_string_loop: |
||
954 | mov dword [esp],eax |
||
955 | call @Kolibri@DebugPutChar$qc |
||
956 | inc esi |
||
957 | .debug_put_string_test: |
||
958 | xor eax,eax |
||
959 | or al,[esi] |
||
960 | test al,al |
||
961 | jnz .debug_put_string_loop |
||
8165 | IgorA | 962 | pop ecx |
8140 | IgorA | 963 | ret |
964 | endp |
||
965 | |||
966 | proc @Kolibri@GetKey$qv |
||
8165 | IgorA | 967 | mov eax,SF_GET_KEY |
8140 | IgorA | 968 | int 0x40 |
969 | test al,al |
||
970 | jnz .get_key_eof |
||
971 | movzx eax,ah |
||
972 | ret |
||
973 | .get_key_eof: |
||
8165 | IgorA | 974 | mov eax,SF_TERMINATE_PROCESS |
8140 | IgorA | 975 | ret |
976 | endp |
||
977 | |||
978 | proc @Kolibri@GetMouseButton$qv uses ebx |
||
8165 | IgorA | 979 | mov eax,SF_MOUSE_GET |
980 | mov ebx,SSF_BUTTON |
||
8140 | IgorA | 981 | int 0x40 |
982 | ret |
||
983 | endp |
||
984 | |||
985 | proc @Kolibri@GetMousePosition$qrst1o uses ebx |
||
8165 | IgorA | 986 | mov eax,SF_MOUSE_GET |
987 | xor ebx,ebx ;SSF_SCREEN_POSITION |
||
8140 | IgorA | 988 | cmp byte [esp+16],0 |
989 | jnz .get_mouse_pos_absolute |
||
990 | inc ebx |
||
991 | .get_mouse_pos_absolute: |
||
992 | int 0x40 |
||
993 | mov ecx,[esp+12] |
||
994 | mov word [ecx],ax |
||
995 | mov ecx,[esp+8] |
||
996 | shr eax,16 |
||
997 | mov word [ecx],ax |
||
998 | ret |
||
999 | endp |
||
1000 | |||
1001 | proc @Kolibri@WasThreadCreated$qv |
||
1002 | cmp byte [@Kolibri@_ThreadSavedBegProc],0x90 |
||
1003 | setz al |
||
1004 | ret |
||
1005 | endp |
||
1006 | |||
1007 | proc @Kolibri@CreateThread$qpvuit1 |
||
1008 | push ebx |
||
1009 | mov edx,[esp+16] |
||
1010 | mov ebx,[esp+12] |
||
1011 | test edx,edx |
||
1012 | jnz .create_thread_after_new |
||
1013 | if defined KolibriHeapAlloc |
||
1014 | cmp ebx,4096 |
||
1015 | jnb .create_thread_alloc |
||
1016 | mov ebx,STACKSIZE |
||
1017 | .create_thread_alloc: |
||
1018 | push ebx |
||
1019 | call KolibriHeapAlloc ; Create new dynamic memory of the given size |
||
1020 | pop ecx |
||
1021 | test eax,eax |
||
1022 | jnz .create_thread_mem_created |
||
1023 | end if |
||
1024 | or eax,-1 |
||
1025 | jmp .create_thread_end |
||
1026 | .create_thread_mem_created: |
||
1027 | lea edx,[eax+ebx] |
||
1028 | .create_thread_after_new: |
||
1029 | neg ebx |
||
1030 | jz .create_thread_test_first |
||
1031 | add ebx,edx |
||
1032 | .create_thread_test_first: |
||
1033 | cmp byte [@Kolibri@_ThreadSavedBegProc],0x90 |
||
1034 | jnz .create_thread_init |
||
1035 | .create_thread_fill_stack: |
||
1036 | lock inc dword [@Kolibri@_ThreadNumber] |
||
1037 | and edx,not 3 |
||
1038 | sub edx,12 |
||
1039 | mov ecx,[esp+8] |
||
1040 | mov dword [edx+8],ebx |
||
1041 | mov dword [edx+4],ecx |
||
1042 | mov dword [edx],Kolibri_ThreadFinish |
||
8165 | IgorA | 1043 | mov eax,SF_CREATE_THREAD |
8140 | IgorA | 1044 | mov ebx,1 |
1045 | mov ecx,@Kolibri@ThreadMain$qpvt1 |
||
1046 | int 0x40 |
||
1047 | mov ebx,eax |
||
1048 | or bl,15 |
||
1049 | inc ebx |
||
1050 | jnz .create_thread_end |
||
1051 | lock dec dword [@Kolibri@_ThreadNumber] |
||
1052 | if defined KolibriHeapFree |
||
1053 | or ebx,[edx+8] |
||
1054 | jz .create_thread_end |
||
1055 | push ebx |
||
1056 | call KolibriHeapFree ; Delete the given dynamic memory |
||
1057 | pop ecx |
||
1058 | end if |
||
1059 | .create_thread_end: |
||
1060 | pop ebx |
||
1061 | ret |
||
1062 | .create_thread_init: |
||
1063 | push esi edi |
||
1064 | cld |
||
1065 | mov esi,@Kolibri@_ThreadSavedBegProc |
||
1066 | mov edi,@Kolibri@GetPid$qv |
||
8165 | IgorA | 1067 | movsd |
1068 | movsd |
||
8140 | IgorA | 1069 | mov edi,@Kolibri@GetThreadData$qv |
8165 | IgorA | 1070 | movsd |
1071 | movsd |
||
8140 | IgorA | 1072 | mov eax,0x90909090 |
1073 | mov edi,@Kolibri@_ThreadSavedBegProc |
||
8165 | IgorA | 1074 | stosd |
1075 | stosd |
||
1076 | stosd |
||
1077 | stosd |
||
8140 | IgorA | 1078 | pop edi esi |
1079 | jmp .create_thread_fill_stack |
||
1080 | endp |
||
1081 | |||
8179 | IgorA | 1082 | proc @Kolibri@_FileAccess$qp21Kolibri@FileInfoBlock uses ebx |
8165 | IgorA | 1083 | mov eax,SF_FILE |
8140 | IgorA | 1084 | mov ebx,[esp+8] |
1085 | int 0x40 |
||
1086 | mov ecx,[esp+8] |
||
1087 | mov [ecx],ebx |
||
1088 | ret |
||
1089 | endp |
||
1090 | |||
8165 | IgorA | 1091 | if defined Kolibri_debug_string |
1092 | Kolibri_debug_string: |
||
8140 | IgorA | 1093 | db 'Abnormal program termination.',10,0 |
8165 | IgorA | 1094 | end if |
1095 | |||
1096 | if defined Kolibri_MutexLockRec |
||
8140 | IgorA | 1097 | Kolibri_try_lock_rec_overflow_string: |
1098 | db 'Recursive mutex lock count overflow.',10,0 |
||
8165 | IgorA | 1099 | end if |
1100 | |||
1101 | if defined @Kolibri@UnLock$qp16Kolibri@TRecMutexui |
||
8140 | IgorA | 1102 | Kolibri_unlock_rec_notlocked_string: |
1103 | db 'Recursive mutex unlock error.',10,0 |
||
8165 | IgorA | 1104 | end if |
8140 | IgorA | 1105 | |
1106 | include "kos_lib.inc" |
||
1107 | |||
1108 | ;/**/ |
||
1109 |