Subversion Repositories Kolibri OS

Rev

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

Rev 305 Rev 308
Line -... Line 1...
-
 
1
; 01.02.07 - ®¡­®¢«ñ­ editbox
-
 
2
; 31.01.07 - ¨á¯à ¢«¥­  ­¥ª®àà¥ªâ­ ï ®âà¨á®¢ª  ¯à¨ ¡®«ì讬 §­ ç¥­¨¨ ¢ëá®âë ᪨­ 
-
 
3
;            ¢ëà ¢­¨¢ ­¨¥ á­¨§ã ®â­®á¨â¥«ì­® à ¡®ç¥© ®¡« á⨠íªà ­ 
1
window_y=88
4
window_y=67
2
;window_x=320
5
;window_x=320
3
window_x=450
6
window_x=640
4
include 'macros.inc'
7
include 'macros.inc'
5
	meos_header par
8
	meos_header par
6
	use_edit_box
9
	use_edit_box
7
	use_txt_button
10
	use_txt_button
8
	app_start
11
	app_start
Line 98... Line 101...
98
 
101
 
99
	mov	eax,70
102
	mov	eax,70
100
	mov	ebx,file_info
103
	mov	ebx,file_info
Line 101... Line 104...
101
	int	0x40
104
	int	0x40
102
 
105
 
103
	;cmp     eax,0
106
	cmp	eax,0
104
	;jg      error
107
	jl	error
105
	bt	eax,31
108
	mov	[status],run_ok
106
	je	error
109
	call	draw_status
107
	jmp     still
110
	jmp	still
Line 108... Line 111...
108
close:
111
close:
Line 113... Line 116...
113
macro cmp_err code,text_ptr
116
macro cmp_err code,text_ptr
114
{
117
{
115
	cmp	al,code
118
	cmp	al,code
116
	jne	@f
119
	jne	@f
117
	mov	[status],text_ptr
120
	mov	[status],text_ptr
118
	;jmp     .draw_status
-
 
119
@@:
121
@@:
120
}
122
}
121
	neg	eax
123
	neg	eax
Line 122... Line -...
122
 
-
 
123
	;test    al,al
-
 
124
	;jz      close
-
 
125
 
124
 
Line 126... Line 125...
126
	cmp_err 3,bad_file_sys
125
	cmp_err 3,bad_file_sys
Line 127... Line 126...
127
 
126
 
Line 137... Line 136...
137
 
136
 
Line 138... Line 137...
138
	cmp_err 31,file_not_executable
137
	cmp_err 31,file_not_executable
Line 139... Line 138...
139
 
138
 
140
	cmp_err 32,many_processes
139
	cmp_err 32,many_processes
141
 
140
 
Line 142... Line 141...
142
.draw_status:
141
 
-
 
142
	call	draw_status
-
 
143
	jmp	still
-
 
144
 
-
 
145
draw_window:
-
 
146
	push	48
143
	call	draw_status
147
	pop	eax
-
 
148
	mov	ebx,5
-
 
149
	int	0x40
144
	jmp	still
150
	mov	si,bx
145
 
151
	start_draw_window
146
draw_window:
152
	get_skin_height
-
 
153
	mov	dx,ax
-
 
154
	get_screen_size
147
	start_draw_window
155
	xor	ecx,ecx
-
 
156
	sub	cx,window_y+2
148
	get_screen_size
157
	sub	cx,dx
149
	mov	cx,ax
158
	add	cx,si
150
	sub	cx,window_y+20
159
	shl	ecx,16
151
	shl	ecx,16
160
	mov	cx,dx
152
	mov	cx,window_y
161
	add	cx,window_y
153
	shr	eax,16
162
	shr	eax,16
154
	mov	bx,ax
163
	mov	bx,ax
155
	sub	bx,window_x
164
	sub	bx,window_x
156
	shl	ebx,15
165
	shl	ebx,15
157
	mov	bx,window_x
166
	mov	bx,window_x
158
	mov	edx,[sc.work]
167
	mov	edx,[sc.work]
159
	or	edx,0xb3000000
168
	or	edx,0x33000000
Line 160... Line 169...
160
	xor	eax,eax
169
	xor	eax,eax
Line 161... Line 170...
161
	mov	esi,[sc.grab_text]
170
	xor	esi,esi
162
	mov	edi,hed
171
	mov	edi,grab_text
163
	int	0x40
172
	int	0x40
164
 
173
 
Line -... Line 174...
-
 
174
	get_procinfo app
165
	get_procinfo app
175
 
166
 
176
	mov	eax,[app.width]
167
	mov	ax,[app.width]
177
	sub	eax,20
168
	sub	ax,20
178
	mov	[input_fn.width],eax
169
	mov	[input_fn.width],eax
179
	mov	[run_but.width],ax
170
	mov	[run_but.width],ax
180
 
171
 
181
	xor	bx,bx
172
	mov	ebx,10000
182
	shl	ebx,16
173
	mov	bx,ax
183
	mov	bx,ax
Line 187... Line 197...
187
 
197
 
188
	stop_draw_window
198
	stop_draw_window
Line 189... Line 199...
189
ret
199
ret
190
 
200
 
-
 
201
draw_status:
191
draw_status:
202
	mov	ebx,[app.width]
192
	mov	ebx,5*65536+(window_x-5-10)
203
	sub	bx,10
193
	mov	ecx,(window_y-39)*65536+12
204
	mov	ecx,(50)*65536+12
194
	mov	edx,[sc.work]
205
	mov	edx,[sc.work]
195
	mov	eax,13
206
	mov	eax,13
196
	int	0x40
207
	int	0x40
Line 201... Line 212...
201
	cmp	[edx+esi],byte 0
212
	cmp	[edx+esi],byte 0
202
	je	@f
213
	je	@f
203
	inc	esi
214
	inc	esi
204
	jmp	@b
215
	jmp	@b
205
@@:
216
@@:
206
	mov	eax,4
-
 
207
	mov	ebx,6*65536+(window_y-37)
217
	mov	ebx,5*65536+(50)
208
	mov	ecx,[sc.work_text]
218
	mov	ecx,[sc.work_text]
-
 
219
	mov	eax,4
209
	int	0x40
220
	int	0x40
210
ret
221
ret
Line 211... Line 222...
211
 
222
 
212
run_but txt_button 0,5,15,30,2,0,0,run_but_text,
-
 
213
if lang eq ru
223
run_but txt_button 0,5,15,25,2,0,0,run_but_text,
214
run_but_text db '‡€“‘’ˆ’œ',0
-
 
215
else
-
 
216
run_but_text db 'RUN',0
-
 
217
end if
224
run_but_text db '‡€“‘’ˆ’œ',0
218
input_fn edit_box 0,5,10,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
225
input_fn edit_box 0,5,5,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
Line 219... Line -...
219
ed_always_focus
-
 
220
 
226
ed_always_focus
221
if lang eq ru
227
 
222
hello db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã ¨ ­ ¦¬¨â¥ Enter',0
228
hello db '‚¢¥¤¨â¥ ¯®«­ë© ¯ãâì ª ä ©«ã ¨ ­ ¦¬¨â¥ Enter',0
223
bad_file_sys db '¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
229
bad_file_sys db '¥¨§¢¥áâ­ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
224
file_not_find db '” ©« ­¥ ­ ©¤¥­',0		 ; 5
230
file_not_find db '” ©« ­¥ ­ ©¤¥­',0		 ; 5
225
bad_fat_table db '’ ¡«¨æ  FAT à §àã襭 ',0	 ; 9
231
bad_fat_table db '’ ¡«¨æ  FAT à §àã襭 ',0	 ; 9
226
acces_denyied db '„®áâ㯠§ ¯à¥é¥­',0		 ; 10
232
acces_denyied db '„®áâ㯠§ ¯à¥é¥­',0		 ; 10
227
device_error db 'Žè¨¡ª  ãáâனá⢠',0		 ; 11
233
device_error db 'Žè¨¡ª  ãáâனá⢠',0		 ; 11
228
out_of_memory db '¥¤®áâ â®ç­® ¯ ¬ïâ¨',0	 ; 30
234
out_of_memory db '¥¤®áâ â®ç­® ¯ ¬ïâ¨',0	 ; 30
229
file_not_executable db '” ©« ­¥ ï¥âáï ¨á¯®«­ï¥¬ë¬',0 ; 31
-
 
230
many_processes db '‘«¨èª®¬ ¬­®£® ¯à®æ¥áᮢ',0	 ; 32
235
file_not_executable db '” ©« ­¥ ï¥âáï ¨á¯®«­ï¥¬ë¬',0 ; 31
231
else
-
 
232
hello db 'Enter full path to file and press ',0
-
 
233
bad_file_sys db 'Unknown file system',0                ; 3
-
 
234
file_not_find db 'File not found',0                    ; 5
-
 
235
bad_fat_table db 'FAT table corrupted',0               ; 9
-
 
236
acces_denyied db 'Access denied',0                     ; 10
-
 
237
device_error db 'Device error',0                       ; 11
236
many_processes db '‘«¨èª®¬ ¬­®£® ¯à®æ¥áᮢ',0	 ; 32
238
out_of_memory db 'Out of memory',0                     ; 30
-
 
239
file_not_executable db 'File is not executable',0      ; 31
-
 
240
many_processes db 'Too many processes',0               ; 32
237
run_ok db 'à®£à ¬¬  ãᯥ譮 § ¯ã饭 ',0
241
end if
-
 
242
 
-
 
243
if lang eq ru
-
 
244
hed db 'RUN ®â ¯¥à¢®£® ”¥¢à «ï 2007 £®¤ ',0
-
 
245
else
-
 
246
hed db 'RUN of the first of FEBRUARY 2007 year',0
238
grab_text db '‡€“‘Š Žƒ€ŒŒ›',0
Line 247... Line 239...
247
end if
239
 
248
status dd hello
240
status dd hello
249
 
241