2007-02-01 14:31:34 +03:00
|
|
|
|
; 01.02.07 - <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> editbox
|
|
|
|
|
; 31.01.07 - <20><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>४⭠<E0A5AA> <20><><EFBFBD><EFBFBD>ᮢ<EFBFBD><E1AEA2> <20><><EFBFBD> <20><><EFBFBD><EFBFBD>讬 <20><><EFBFBD>祭<EFBFBD><E7A5AD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᪨<><E1AAA8>
|
|
|
|
|
; <20><>ࠢ<EFBFBD><E0A0A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᭨<><E1ADA8> <20>⭮<EFBFBD><E2ADAE>⥫쭮 ࠡ<>祩 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>࠭<EFBFBD>
|
|
|
|
|
window_y=67
|
2006-11-02 17:18:23 +03:00
|
|
|
|
;window_x=320
|
2007-02-01 14:31:34 +03:00
|
|
|
|
window_x=640
|
2007-05-15 08:27:32 +04:00
|
|
|
|
;--- <20><>㣨<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ---
|
|
|
|
|
include '../../../develop/examples/editbox/trunk/editbox.inc'
|
|
|
|
|
;include 'editbox.inc'
|
|
|
|
|
include 'txtbut.inc'
|
|
|
|
|
include '../../../macros.inc'
|
|
|
|
|
;include 'macros.inc'
|
|
|
|
|
include 'run.mac'
|
2007-02-01 15:04:59 +03:00
|
|
|
|
include 'lang.inc'
|
2007-05-15 08:27:32 +04:00
|
|
|
|
meos_app_start
|
|
|
|
|
use_edit_box procinfo,22,5
|
|
|
|
|
use_txt_button
|
|
|
|
|
code
|
|
|
|
|
cmp [par],byte 0
|
|
|
|
|
jne read_par
|
|
|
|
|
mcall 40,EVM_MOUSE+EVM_BUTTON+EVM_KEY+EVM_REDRAW
|
2006-11-02 17:18:23 +03:00
|
|
|
|
red:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall 48,3,sc,40
|
|
|
|
|
set_sys_colors_txt_button run_but,sc
|
|
|
|
|
push dword [sc.work_graph]
|
|
|
|
|
pop [input_fn.focus_border_color]
|
|
|
|
|
call draw_window
|
2007-08-02 17:56:49 +04:00
|
|
|
|
still: ;<3B>᭮<EFBFBD><E1ADAE><EFBFBD><EFBFBD> <20><>ࠡ<EFBFBD><E0A0A1>稪
|
|
|
|
|
mcall 10 ;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ᮡ<><E1AEA1><EFBFBD><EFBFBD>
|
|
|
|
|
dec eax
|
|
|
|
|
jz red
|
|
|
|
|
dec eax
|
|
|
|
|
jz key
|
|
|
|
|
dec eax
|
|
|
|
|
jz button
|
|
|
|
|
mouse_edit_box input_fn
|
2007-05-15 08:27:32 +04:00
|
|
|
|
jmp still ;<3B> <20><>祣<EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><E1ABA5><EFBFBD><EFBFBD><EFBFBD> <20><> ᭮<><E1ADAE> <20> 横<>
|
2006-11-02 17:18:23 +03:00
|
|
|
|
key:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall 2
|
|
|
|
|
cmp ah,13
|
|
|
|
|
je run
|
|
|
|
|
key_edit_box input_fn
|
|
|
|
|
jmp still
|
2006-11-02 17:18:23 +03:00
|
|
|
|
button:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall 17
|
|
|
|
|
dec ah
|
|
|
|
|
jz close
|
|
|
|
|
dec ah
|
|
|
|
|
jz run
|
|
|
|
|
jmp still
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
|
|
|
|
read_par:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mov esi,par
|
|
|
|
|
mov edi,fn
|
|
|
|
|
mov ecx,256
|
|
|
|
|
rep movsb
|
2006-11-02 17:18:23 +03:00
|
|
|
|
run:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
xor eax,eax
|
|
|
|
|
mov edi,file_info.name
|
|
|
|
|
mov ecx,512
|
|
|
|
|
rep stosb
|
|
|
|
|
mov edi,run_par
|
|
|
|
|
mov ecx,256
|
|
|
|
|
rep stosb
|
|
|
|
|
|
|
|
|
|
mov esi,fn
|
|
|
|
|
mov edi,file_info.name
|
|
|
|
|
cmp [esi],byte '"'
|
|
|
|
|
je copy_fn_with_spaces
|
2006-11-02 17:18:23 +03:00
|
|
|
|
copy_fn:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
cmp [esi],byte ' '
|
|
|
|
|
je .stop
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp copy_fn
|
2006-11-02 17:18:23 +03:00
|
|
|
|
.stop:
|
|
|
|
|
|
2007-05-15 08:27:32 +04:00
|
|
|
|
jmp copy_par
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
|
|
|
|
copy_fn_with_spaces:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
inc esi
|
2006-11-02 17:18:23 +03:00
|
|
|
|
@@:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
cmp [esi],byte '"'
|
|
|
|
|
je .stop
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp @b
|
2006-11-02 17:18:23 +03:00
|
|
|
|
.stop:
|
|
|
|
|
|
|
|
|
|
copy_par:
|
|
|
|
|
@@:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
inc esi
|
|
|
|
|
cmp [esi],byte ' '
|
|
|
|
|
je @b
|
|
|
|
|
mov edi,run_par
|
2006-11-02 17:18:23 +03:00
|
|
|
|
@@:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp @b
|
2006-11-02 17:18:23 +03:00
|
|
|
|
.stop:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall 70,file_info
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
2007-05-15 08:27:32 +04:00
|
|
|
|
cmp eax,0
|
|
|
|
|
jl error
|
|
|
|
|
mov [status],run_ok
|
|
|
|
|
call draw_status
|
|
|
|
|
jmp still
|
2006-11-02 17:18:23 +03:00
|
|
|
|
close:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall -1
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
|
|
|
|
error:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
neg eax
|
|
|
|
|
cmp_err 3,bad_file_sys
|
|
|
|
|
cmp_err 5,file_not_find
|
|
|
|
|
cmp_err 9,bad_fat_table
|
|
|
|
|
cmp_err 10,acces_denyied
|
|
|
|
|
cmp_err 11,device_error
|
|
|
|
|
cmp_err 30,out_of_memory
|
|
|
|
|
cmp_err 31,file_not_executable
|
|
|
|
|
cmp_err 32,many_processes
|
|
|
|
|
|
|
|
|
|
call draw_status
|
|
|
|
|
jmp still
|
2006-01-03 12:43:31 +03:00
|
|
|
|
|
|
|
|
|
draw_window:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mcall 48,5
|
|
|
|
|
mov si,bx
|
|
|
|
|
|
|
|
|
|
mcall 12,1
|
|
|
|
|
mcall 48,4
|
|
|
|
|
mov dx,ax
|
|
|
|
|
mcall 14
|
|
|
|
|
xor ecx,ecx
|
|
|
|
|
sub cx,window_y+2
|
|
|
|
|
sub cx,dx
|
|
|
|
|
add cx,si
|
|
|
|
|
shl ecx,16
|
|
|
|
|
mov cx,dx
|
|
|
|
|
add cx,window_y
|
|
|
|
|
shr eax,16
|
|
|
|
|
mov bx,ax
|
|
|
|
|
sub bx,window_x
|
|
|
|
|
shl ebx,15
|
|
|
|
|
mov bx,window_x
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
or edx,0x33000000
|
|
|
|
|
xor esi,esi
|
|
|
|
|
mov edi,grab_text
|
|
|
|
|
mcall 0
|
|
|
|
|
|
|
|
|
|
mcall 9,procinfo,-1
|
|
|
|
|
|
|
|
|
|
mov eax,[procinfo.box.width]
|
|
|
|
|
sub eax,20
|
|
|
|
|
mov [input_fn.width],eax
|
|
|
|
|
mov [run_but.width],ax
|
|
|
|
|
|
|
|
|
|
xor bx,bx
|
|
|
|
|
shl ebx,16
|
|
|
|
|
mov bx,ax
|
|
|
|
|
add bx,10
|
|
|
|
|
mov cx,45
|
|
|
|
|
push cx
|
|
|
|
|
shl ecx,16
|
|
|
|
|
pop cx
|
|
|
|
|
mov edx,[sc.work_graph]
|
|
|
|
|
mcall 38
|
|
|
|
|
draw_edit_box input_fn
|
|
|
|
|
draw_txt_button run_but
|
|
|
|
|
|
|
|
|
|
call draw_status_text
|
|
|
|
|
|
|
|
|
|
mcall 12,2
|
2006-01-03 12:43:31 +03:00
|
|
|
|
ret
|
|
|
|
|
|
2006-11-02 17:18:23 +03:00
|
|
|
|
draw_status:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mov ebx,[procinfo.box.width]
|
|
|
|
|
sub bx,10
|
|
|
|
|
mov ecx,(50)*65536+12
|
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
mcall 13
|
2006-11-02 17:18:23 +03:00
|
|
|
|
draw_status_text:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mov edx,[status]
|
|
|
|
|
xor esi,esi
|
2006-11-02 17:18:23 +03:00
|
|
|
|
@@:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
cmp [edx+esi],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
inc esi
|
|
|
|
|
jmp @b
|
2006-11-02 17:18:23 +03:00
|
|
|
|
@@:
|
2007-05-15 08:27:32 +04:00
|
|
|
|
mov ecx,[sc.work_text]
|
|
|
|
|
mcall 4,5*65536+(50)
|
2006-01-03 12:43:31 +03:00
|
|
|
|
ret
|
|
|
|
|
|
2007-02-01 14:31:34 +03:00
|
|
|
|
run_but txt_button 0,5,15,25,2,0,0,run_but_text,
|
2007-05-15 08:27:32 +04:00
|
|
|
|
input_fn edit_box 0,5,5,0xffffff,0x6a9480,0,0xaaaaaa,0,511,fn,ed_focus+ed_always_focus
|
|
|
|
|
mouse_flag: dd 0x0
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
2007-02-01 15:04:59 +03:00
|
|
|
|
if lang eq ru
|
2006-11-02 17:18:23 +03:00
|
|
|
|
hello db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20> 䠩<><E4A0A9> <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Enter',0
|
|
|
|
|
bad_file_sys db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⭠<EFBFBD> 䠩<><E4A0A9><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>⥬<EFBFBD>',0 ; 3
|
2007-05-15 08:27:32 +04:00
|
|
|
|
file_not_find db '<27><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0 ; 5
|
|
|
|
|
bad_fat_table db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> FAT ࠧ<><E0A0A7>襭<EFBFBD>',0 ; 9
|
|
|
|
|
acces_denyied db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>饭',0 ; 10
|
|
|
|
|
device_error db '<27>訡<EFBFBD><E8A8A1> <20><><EFBFBD>ன<EFBFBD>⢠',0 ; 11
|
|
|
|
|
out_of_memory db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>筮 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0 ; 30
|
2006-11-02 17:18:23 +03:00
|
|
|
|
file_not_executable db '<27><><EFBFBD><EFBFBD> <20><> <><EFA2AB><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC>',0 ; 31
|
2007-05-15 08:27:32 +04:00
|
|
|
|
many_processes db '<27><><EFBFBD>誮<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ',0 ; 32
|
2007-02-01 14:31:34 +03:00
|
|
|
|
run_ok db '<27>ணࠬ<E0AEA3><E0A0AC> <20>ᯥ譮 <20><><EFBFBD><EFBFBD>饭<EFBFBD>',0
|
|
|
|
|
grab_text db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
2007-02-01 15:04:59 +03:00
|
|
|
|
run_but_text db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
|
|
|
|
else
|
|
|
|
|
hello db 'Enter full path to file and press <Enter>',0
|
|
|
|
|
bad_file_sys db 'Unknown file system',0 ; 3
|
|
|
|
|
file_not_find db 'File not found',0 ; 5
|
|
|
|
|
bad_fat_table db 'FAT table corrupted',0 ; 9
|
|
|
|
|
acces_denyied db 'Access denied',0 ; 10
|
|
|
|
|
device_error db 'Device error',0 ; 11
|
|
|
|
|
out_of_memory db 'Out of memory',0 ; 30
|
|
|
|
|
file_not_executable db 'File is not executable',0 ; 31
|
|
|
|
|
many_processes db 'Too many processes',0 ; 32
|
|
|
|
|
run_ok db 'The program was started successfully',0
|
|
|
|
|
grab_text db 'RUN',0
|
|
|
|
|
run_but_text db 'RUN',0
|
|
|
|
|
end if
|
2006-11-02 17:18:23 +03:00
|
|
|
|
status dd hello
|
|
|
|
|
|
|
|
|
|
file_info:
|
|
|
|
|
.mode dd 7
|
|
|
|
|
.flags dd 0
|
|
|
|
|
.par dd run_par
|
|
|
|
|
dd 0,0
|
|
|
|
|
.name rb 512
|
|
|
|
|
|
|
|
|
|
flags dw ?
|
|
|
|
|
|
2007-05-15 08:27:32 +04:00
|
|
|
|
sc system_colors
|
2007-04-05 05:51:58 +04:00
|
|
|
|
|
2007-05-15 08:27:32 +04:00
|
|
|
|
procinfo process_information
|
2006-11-02 17:18:23 +03:00
|
|
|
|
|
|
|
|
|
run_par rb 256
|
|
|
|
|
par rb 256
|
2007-05-15 08:27:32 +04:00
|
|
|
|
fn rb 512
|
|
|
|
|
meos_app_end
|
|
|
|
|
udata
|