Rev 6601 | Rev 6615 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6601 | Rev 6612 | ||
---|---|---|---|
Line 10... | Line 10... | ||
10 | include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac' |
10 | include '../../../programs/develop/libraries/box_lib/trunk/box_lib.mac' |
11 | include '../../../programs/system/run/trunk/txtbut.inc' |
11 | include '../../../programs/system/run/trunk/txtbut.inc' |
12 | include '../../../programs/dll.inc' |
12 | include '../../../programs/dll.inc' |
Line 13... | Line 13... | ||
13 | 13 | ||
14 | public init_boxlib as '_kolibri_boxlib_init' |
- | |
15 | public editbox_key_thunk as '_editbox_key@4' ; renamed due to ambiguity |
- | |
16 | public press_key as '_press_key' |
- | |
Line -... | Line 14... | ||
- | 14 | public init_boxlib as '_kolibri_boxlib_init' |
|
17 | ;;; Returns 0 on success. -1 on failure. |
15 | |
18 | 16 | ;;; Returns 0 on success. -1 on failure. |
|
19 | proc init_boxlib |
17 | proc init_boxlib |
20 | pusha |
18 | pusha |
21 | mcall 68,11 |
19 | mcall 68,11 |
22 | stdcall dll.Load, @IMPORT |
20 | stdcall dll.Load, @IMPORT |
23 | popa |
21 | popa |
Line 24... | Line 22... | ||
24 | ret |
22 | ret |
25 | endp |
23 | endp |
- | 24 | ||
- | 25 | ;; Wrapper to handle edit_box_key function for editboxes. |
|
- | 26 | ;; Call this baby from C (refer kolibri_editbox.h for details) |
|
26 | 27 | ;public editbox_key_thunk as '_editbox_key@4' ; renamed due to ambiguity |
|
27 | ;; Wrapper to handle edit_box_key function for editboxes. |
28 | ;public press_key as '_press_key' |
28 | ;; Call this baby from C (refer kolibri_editbox.h for details) |
29 | ;; replaced by siemargl as inline ASM in C wrapper |
29 | editbox_key_thunk: |
30 | ;editbox_key_thunk: |
30 | mov [oldebp], ebp ;Save ebp because GCC is crazy for it otherwise. |
31 | ; mov [oldebp], ebp ;Save ebp because GCC is crazy for it otherwise. |
31 | pop ebp ;Save return address in ebp. Stack top is param now. |
32 | ; pop ebp ;Save return address in ebp. Stack top is param now. |
32 | mov eax, dword [press_key] |
33 | ; mov eax, dword [press_key] |
33 | call [edit_box_key] ; The pointer we passed should be on the stack already. |
34 | ; call [edit_box_key] ; The pointer we passed should be on the stack already. |
- | 35 | ; push ebp ;push the return address back to stack |
|
- | 36 | ; mov ebp, [oldebp] |
|
- | 37 | ; ret |
|
Line 34... | Line -... | ||
34 | push ebp ;push the return address back to stack |
- | |
35 | mov ebp, [oldebp] |
- | |
Line 36... | Line 38... | ||
36 | ret |
38 | ;oldebp dd ? |
37 | 39 | ;press_key dd ? |
|
Line 38... | Line 40... | ||
38 | oldebp dd ? |
40 |