Subversion Repositories Kolibri OS

Rev

Rev 6391 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6391 Rev 6393
Line 11... Line 11...
11
include 'txtbut.inc'
11
include 'txtbut.inc'
12
include 'dll.inc'
12
include 'dll.inc'
Line 13... Line 13...
13
	
13
	
14
public init_boxlib as '_init_boxlib_asm'
14
public init_boxlib as '_init_boxlib_asm'
15
public editbox_key as '_editbox_key@4'
-
 
-
 
15
public editbox_key as '_editbox_key@4'
16
	
16
public press_key as '_press_key'
Line 17... Line 17...
17
;;; Returns 0 on success. -1 on failure.
17
;;; Returns 0 on success. -1 on failure.
Line 18... Line 18...
18
 
18
 
Line 35... Line 35...
35
;; Wrapper to handle edit_box_key function for editboxes.
35
;; Wrapper to handle edit_box_key function for editboxes.
36
;; Call this baby from C (refer kolibri_editbox.h for details)
36
;; Call this baby from C (refer kolibri_editbox.h for details)
37
editbox_key:
37
editbox_key:
38
	mov [oldebp], ebp	;Save ebp because GCC is crazy for it otherwise.
38
	mov [oldebp], ebp	;Save ebp because GCC is crazy for it otherwise.
39
	pop ebp			;Save return address in ebp. Stack top is param now.
39
	pop ebp			;Save return address in ebp. Stack top is param now.
40
	mcall 2
40
	mov eax, dword [press_key]
41
	call [edit_box_key]	; The pointer we passed should be on the stack already.
41
	call [edit_box_key]	; The pointer we passed should be on the stack already.
42
	push ebp		;push the return address back to stack
42
	push ebp		;push the return address back to stack
43
	mov ebp, [oldebp]
43
	mov ebp, [oldebp]
44
	ret
44
	ret
Line 45... Line 45...
45
	
45
	
-
 
46
oldebp dd ?
Line 46... Line 47...
46
oldebp dd ?
47
press_key dd ?
47
 
48
 
Line 48... Line 49...
48
@IMPORT:
49
@IMPORT: