Subversion Repositories Kolibri OS

Rev

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

Rev 485 Rev 6342
Line 13... Line 13...
13
	    jnz next_byte_cleare
13
	    jnz next_byte_cleare
14
	    call print_line
14
	    call print_line
15
	    call print_cursor
15
	    call print_cursor
Line 16... Line 16...
16
 
16
 
17
      opros:
-
 
18
	    mov eax,10
17
      opros:
Line 19... Line 18...
19
	    mcall
18
	    mcall SF_WAIT_EVENT
-
 
19
 
-
 
20
	    cmp eax,1 ;redraw window
20
 
21
	    je exit_cycle
Line 21... Line 22...
21
	    cmp eax,1
22
	    cmp eax,3 ;press button
22
	    je exit_cycle
23
	    je exit_cycle
Line 23... Line -...
23
 
-
 
24
	    cmp eax,2
24
 
25
	    jne opros
25
	    cmp eax,2 ;press key
Line 26... Line 26...
26
 
26
	    jne opros
27
	    mov eax,2
27
 
28
	    mcall
28
	    mcall SF_GET_KEY
29
	    shr eax,8
29
	    shr eax,8
30
 
30
 
31
	    cmp eax,13
31
	    cmp al,13
32
	    je exit_cycle
32
	    je exit_cycle
33
	    cmp eax,8
33
	    cmp al,8
34
	    je backspace
34
	    je backspace
35
	    cmp eax,176
35
	    cmp al,176
Line 36... Line 36...
36
	    je left
36
	    je left
37
	    cmp eax,179
37
	    cmp al,179
38
	    je right
38
	    je right
Line 97... Line 97...
97
 
97
 
98
	     call print_line
98
	     call print_line
99
	    ret
99
	    ret
100
;---------------------------------------------------------------
100
;---------------------------------------------------------------
101
print_line:
-
 
102
	     mov eax,13
101
print_line:
103
	     mov ebx,[string_x]
102
	mov ebx,[string_x]
104
	     mov ecx,[string_y]
103
	mov ecx,[string_y]
105
	     mov edx,[MaxSizeString]
104
	mov edx,[MaxSizeString]
106
	     shl ebx,16
105
	shl ebx,16
107
	     shl ecx,16
106
	shl ecx,16
108
	     imul edx,6
107
	imul edx,6
109
	     add ebx,edx
108
	add ebx,edx
110
	     add ebx,2
109
	add ebx,2
111
	     add ecx,10
110
	add ecx,10
112
	     mov edx,0xffffff
-
 
113
	     mcall
111
	mov edx,0xffffff
114
	     mov eax,4
112
	mcall SF_DRAW_RECT
115
	     mov ebx,[string_x]
113
	mov ebx,[string_x]
116
	     shl ebx,16
114
	shl ebx,16
117
	     add ebx,[string_y]
-
 
118
	     mov ecx,0
115
	add ebx,[string_y]
119
	     mov edx,string_
116
	mov edx,string_
120
	     mov esi,[MaxSizeString]
117
	mov esi,[MaxSizeString]
121
	     mcall
118
	mcall SF_DRAW_TEXT,,0
Line 122... Line 119...
122
	     ret
119
	ret
123
 
-
 
124
print_cursor:
120
 
125
	     mov eax,13
121
print_cursor:
126
	     mov ebx,[position]
122
	mov ebx,[position]
127
	     mov ecx,[string_y]
123
	mov ecx,[string_y]
128
	     imul ebx,6
124
	imul ebx,6
129
	     add ebx,[string_x]
125
	add ebx,[string_x]
130
	     shl ebx,16
126
	shl ebx,16
131
	     shl ecx,16
127
	shl ecx,16
132
	     add ebx,2
128
	add ebx,2
133
	     add ecx,8
-
 
134
	     mov edx,0xff6c58
129
	add ecx,8
135
	     mcall
130
	mcall SF_DRAW_RECT,,,0xff6c58
136
	     ret
131
	ret
137
;----------------------------------------------------------
132
;----------------------------------------------------------
138
MinMaxCorrect:
133
MinMaxCorrect: