2007-02-01 12:31:34 +01: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 15:18:23 +01:00
|
|
|
|
;window_x=320
|
2007-02-01 12:31:34 +01:00
|
|
|
|
window_x=640
|
2006-11-02 15:18:23 +01:00
|
|
|
|
include 'macros.inc'
|
|
|
|
|
meos_header par
|
|
|
|
|
use_edit_box
|
|
|
|
|
use_txt_button
|
|
|
|
|
app_start
|
|
|
|
|
cmp [par],byte 0
|
|
|
|
|
jne read_par
|
|
|
|
|
set_events_mask evm_mouse+evm_button+evm_key+evm_redraw
|
|
|
|
|
red:
|
|
|
|
|
get_sys_colors sc
|
|
|
|
|
set_sys_colors_txt_button run_but,sc
|
|
|
|
|
push dword [sc.work_graph]
|
|
|
|
|
pop [input_fn.focus_border_color]
|
|
|
|
|
call draw_window
|
|
|
|
|
still:
|
|
|
|
|
wait_event red,key,button,mouse,,still
|
|
|
|
|
key:
|
|
|
|
|
get_key
|
|
|
|
|
cmp ah,13
|
|
|
|
|
je run
|
|
|
|
|
key_edit_box input_fn
|
|
|
|
|
jmp still
|
|
|
|
|
button:
|
|
|
|
|
get_pressed_button
|
|
|
|
|
dec ah
|
|
|
|
|
jz close
|
|
|
|
|
dec ah
|
|
|
|
|
jz run
|
|
|
|
|
jmp still
|
|
|
|
|
mouse:
|
|
|
|
|
mouse_edit_box input_fn
|
|
|
|
|
jmp still
|
|
|
|
|
|
|
|
|
|
read_par:
|
|
|
|
|
mov esi,par
|
|
|
|
|
mov edi,fn
|
|
|
|
|
mov ecx,256
|
|
|
|
|
rep movsb
|
|
|
|
|
run:
|
|
|
|
|
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
|
|
|
|
|
copy_fn:
|
|
|
|
|
cmp [esi],byte ' '
|
|
|
|
|
je .stop
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp copy_fn
|
|
|
|
|
.stop:
|
|
|
|
|
|
|
|
|
|
jmp copy_par
|
|
|
|
|
|
|
|
|
|
copy_fn_with_spaces:
|
|
|
|
|
inc esi
|
|
|
|
|
@@:
|
|
|
|
|
cmp [esi],byte '"'
|
|
|
|
|
je .stop
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp @b
|
|
|
|
|
.stop:
|
|
|
|
|
|
|
|
|
|
copy_par:
|
|
|
|
|
@@:
|
|
|
|
|
inc esi
|
|
|
|
|
cmp [esi],byte ' '
|
|
|
|
|
je @b
|
|
|
|
|
mov edi,run_par
|
|
|
|
|
@@:
|
|
|
|
|
cmp [esi],byte 0
|
|
|
|
|
je .stop
|
|
|
|
|
mov al,[esi]
|
|
|
|
|
mov [edi],al
|
|
|
|
|
inc esi
|
|
|
|
|
inc edi
|
|
|
|
|
jmp @b
|
|
|
|
|
.stop:
|
|
|
|
|
|
|
|
|
|
mov eax,70
|
|
|
|
|
mov ebx,file_info
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2007-02-01 12:31:34 +01:00
|
|
|
|
cmp eax,0
|
|
|
|
|
jl error
|
|
|
|
|
mov [status],run_ok
|
|
|
|
|
call draw_status
|
|
|
|
|
jmp still
|
2006-11-02 15:18:23 +01:00
|
|
|
|
close:
|
|
|
|
|
app_close
|
|
|
|
|
|
|
|
|
|
error:
|
|
|
|
|
|
|
|
|
|
macro cmp_err code,text_ptr
|
|
|
|
|
{
|
|
|
|
|
cmp al,code
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status],text_ptr
|
|
|
|
|
@@:
|
|
|
|
|
}
|
|
|
|
|
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
|
|
|
|
|
|
2007-02-01 12:31:34 +01:00
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
call draw_status
|
|
|
|
|
jmp still
|
2006-01-03 10:43:31 +01:00
|
|
|
|
|
|
|
|
|
draw_window:
|
2007-02-01 12:31:34 +01:00
|
|
|
|
push 48
|
|
|
|
|
pop eax
|
|
|
|
|
mov ebx,5
|
|
|
|
|
int 0x40
|
|
|
|
|
mov si,bx
|
2006-11-02 15:18:23 +01:00
|
|
|
|
start_draw_window
|
2007-02-01 12:31:34 +01:00
|
|
|
|
get_skin_height
|
|
|
|
|
mov dx,ax
|
2006-11-02 15:18:23 +01:00
|
|
|
|
get_screen_size
|
2007-02-01 12:31:34 +01:00
|
|
|
|
xor ecx,ecx
|
|
|
|
|
sub cx,window_y+2
|
|
|
|
|
sub cx,dx
|
|
|
|
|
add cx,si
|
2006-11-02 15:18:23 +01:00
|
|
|
|
shl ecx,16
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov cx,dx
|
|
|
|
|
add cx,window_y
|
2006-11-02 15:18:23 +01:00
|
|
|
|
shr eax,16
|
|
|
|
|
mov bx,ax
|
|
|
|
|
sub bx,window_x
|
|
|
|
|
shl ebx,15
|
|
|
|
|
mov bx,window_x
|
|
|
|
|
mov edx,[sc.work]
|
2007-02-01 12:31:34 +01:00
|
|
|
|
or edx,0x33000000
|
2006-11-02 15:18:23 +01:00
|
|
|
|
xor eax,eax
|
2007-02-01 12:31:34 +01:00
|
|
|
|
xor esi,esi
|
|
|
|
|
mov edi,grab_text
|
2006-11-02 15:18:23 +01:00
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
get_procinfo app
|
|
|
|
|
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov eax,[app.width]
|
|
|
|
|
sub eax,20
|
2007-02-01 08:18:09 +01:00
|
|
|
|
mov [input_fn.width],eax
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov [run_but.width],ax
|
|
|
|
|
|
2007-02-01 12:31:34 +01:00
|
|
|
|
xor bx,bx
|
|
|
|
|
shl ebx,16
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov bx,ax
|
2007-02-01 08:18:09 +01:00
|
|
|
|
add bx,10
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov cx,45
|
2006-11-02 15:18:23 +01:00
|
|
|
|
push cx
|
|
|
|
|
shl ecx,16
|
|
|
|
|
pop cx
|
|
|
|
|
mov edx,[sc.work_graph]
|
|
|
|
|
mov eax,38
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
draw_edit_box input_fn
|
|
|
|
|
draw_txt_button run_but
|
|
|
|
|
|
|
|
|
|
call draw_status_text
|
|
|
|
|
|
|
|
|
|
stop_draw_window
|
2006-01-03 10:43:31 +01:00
|
|
|
|
ret
|
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
draw_status:
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov ebx,[app.width]
|
|
|
|
|
sub bx,10
|
|
|
|
|
mov ecx,(50)*65536+12
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov edx,[sc.work]
|
|
|
|
|
mov eax,13
|
|
|
|
|
int 0x40
|
|
|
|
|
draw_status_text:
|
|
|
|
|
mov edx,[status]
|
|
|
|
|
xor esi,esi
|
|
|
|
|
@@:
|
|
|
|
|
cmp [edx+esi],byte 0
|
|
|
|
|
je @f
|
|
|
|
|
inc esi
|
|
|
|
|
jmp @b
|
|
|
|
|
@@:
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov ebx,5*65536+(50)
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov ecx,[sc.work_text]
|
2007-02-01 12:31:34 +01:00
|
|
|
|
mov eax,4
|
2006-11-02 15:18:23 +01:00
|
|
|
|
int 0x40
|
2006-01-03 10:43:31 +01:00
|
|
|
|
ret
|
|
|
|
|
|
2007-02-01 12:31:34 +01:00
|
|
|
|
run_but txt_button 0,5,15,25,2,0,0,run_but_text,
|
2006-11-02 15:18:23 +01:00
|
|
|
|
run_but_text db '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',0
|
2007-02-01 12:31:34 +01:00
|
|
|
|
input_fn edit_box 0,5,5,0xffffff,0,0xaaaaaa,0,511,fn,ed_focus+\
|
2006-11-02 15:18:23 +01:00
|
|
|
|
ed_always_focus
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
|
file_not_executable db '<27><><EFBFBD><EFBFBD> <20><> <><EFA2AB><EFBFBD><EFBFBD><EFBFBD> <20>ᯮ<EFBFBD><E1AFAE>塞<EFBFBD><EFA5AC>',0 ; 31
|
|
|
|
|
many_processes db '<27><><EFBFBD>誮<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ᮢ',0 ; 32
|
2007-02-01 12:31:34 +01: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
|
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
status dd hello
|
|
|
|
|
|
|
|
|
|
file_info:
|
|
|
|
|
.mode dd 7
|
|
|
|
|
.flags dd 0
|
|
|
|
|
.par dd run_par
|
|
|
|
|
dd 0,0
|
|
|
|
|
.name rb 512
|
|
|
|
|
|
|
|
|
|
flags dw ?
|
|
|
|
|
|
|
|
|
|
fn rb 512
|
|
|
|
|
|
|
|
|
|
sc sys_color_table
|
|
|
|
|
app procinfo
|
|
|
|
|
run_par rb 256
|
|
|
|
|
par rb 256
|
|
|
|
|
app_end
|