forked from KolibriOS/kolibrios
italian version
git-svn-id: svn://kolibrios.org@3634 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
8ea1855c0e
commit
e7b74632f9
@ -10,7 +10,7 @@ REDRAW_EVENT equ 1
|
|||||||
KEY_EVENT equ 2
|
KEY_EVENT equ 2
|
||||||
BUTTON_EVENT equ 3
|
BUTTON_EVENT equ 3
|
||||||
MOUSE_EVENT equ 6
|
MOUSE_EVENT equ 6
|
||||||
|
|
||||||
BUTTON_RUN equ 10
|
BUTTON_RUN equ 10
|
||||||
BUTTON_BROWSE equ 20
|
BUTTON_BROWSE equ 20
|
||||||
|
|
||||||
@ -23,7 +23,9 @@ program.stack dd end_ + STACK_SIZE
|
|||||||
program.params dd 0
|
program.params dd 0
|
||||||
program.path dd 0
|
program.path dd 0
|
||||||
|
|
||||||
; ======================================================================= ;
|
include 'lang.inc'
|
||||||
|
|
||||||
|
; ======================================================================= ;
|
||||||
start_:
|
start_:
|
||||||
; set.event
|
; set.event
|
||||||
mov eax, 40
|
mov eax, 40
|
||||||
@ -68,7 +70,7 @@ start_:
|
|||||||
call getprocaddress
|
call getprocaddress
|
||||||
mov [opendialog_start], eax
|
mov [opendialog_start], eax
|
||||||
|
|
||||||
|
|
||||||
; memory.allocate:
|
; memory.allocate:
|
||||||
mov eax, 68
|
mov eax, 68
|
||||||
mov ebx, 12
|
mov ebx, 12
|
||||||
@ -76,13 +78,13 @@ start_:
|
|||||||
int 64
|
int 64
|
||||||
|
|
||||||
mov [od.procinfo], eax
|
mov [od.procinfo], eax
|
||||||
|
|
||||||
add eax, 1024
|
add eax, 1024
|
||||||
mov [od.filename_area], eax
|
mov [od.filename_area], eax
|
||||||
|
|
||||||
add eax, 4096 - 1024
|
add eax, 4096 - 1024
|
||||||
mov [od.opendir_path], eax
|
mov [od.opendir_path], eax
|
||||||
|
|
||||||
add eax, 4096
|
add eax, 4096
|
||||||
mov [od.openfile_path], eax
|
mov [od.openfile_path], eax
|
||||||
|
|
||||||
@ -105,7 +107,7 @@ start_:
|
|||||||
; skin.height
|
; skin.height
|
||||||
mov eax, 48
|
mov eax, 48
|
||||||
mov ebx, 4
|
mov ebx, 4
|
||||||
int 64
|
int 64
|
||||||
|
|
||||||
add eax, 64
|
add eax, 64
|
||||||
mov [window.height], eax
|
mov [window.height], eax
|
||||||
@ -126,10 +128,10 @@ start_:
|
|||||||
|
|
||||||
mov eax, [od.openfile_path]
|
mov eax, [od.openfile_path]
|
||||||
mov [edit1.text], eax
|
mov [edit1.text], eax
|
||||||
|
|
||||||
|
|
||||||
call on_redraw
|
call on_redraw
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.loop:
|
.loop:
|
||||||
; wait.event
|
; wait.event
|
||||||
mov eax, 10
|
mov eax, 10
|
||||||
@ -138,7 +140,7 @@ start_:
|
|||||||
jne .check_key
|
jne .check_key
|
||||||
call on_redraw
|
call on_redraw
|
||||||
jmp .loop
|
jmp .loop
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_key:
|
.check_key:
|
||||||
cmp eax, KEY_EVENT
|
cmp eax, KEY_EVENT
|
||||||
jne .check_button
|
jne .check_button
|
||||||
@ -148,12 +150,12 @@ start_:
|
|||||||
jne .no_key_enter
|
jne .no_key_enter
|
||||||
call on_button_run
|
call on_button_run
|
||||||
jmp .loop
|
jmp .loop
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.no_key_enter:
|
.no_key_enter:
|
||||||
push edit1
|
push edit1
|
||||||
call [edit_box_key]
|
call [edit_box_key]
|
||||||
jmp .loop
|
jmp .loop
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_button:
|
.check_button:
|
||||||
cmp eax, BUTTON_EVENT
|
cmp eax, BUTTON_EVENT
|
||||||
jne .check_mouse
|
jne .check_mouse
|
||||||
@ -165,19 +167,19 @@ start_:
|
|||||||
; program.terminate
|
; program.terminate
|
||||||
or eax, -1
|
or eax, -1
|
||||||
int 64
|
int 64
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_button_run:
|
.check_button_run:
|
||||||
cmp ah, BUTTON_RUN
|
cmp ah, BUTTON_RUN
|
||||||
jne .check_button_browse
|
jne .check_button_browse
|
||||||
call on_button_run
|
call on_button_run
|
||||||
jmp .loop
|
jmp .loop
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_button_browse:
|
.check_button_browse:
|
||||||
cmp ah, BUTTON_BROWSE
|
cmp ah, BUTTON_BROWSE
|
||||||
jne .loop
|
jne .loop
|
||||||
call on_button_browse
|
call on_button_browse
|
||||||
jmp .loop
|
jmp .loop
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_mouse:
|
.check_mouse:
|
||||||
cmp eax, MOUSE_EVENT
|
cmp eax, MOUSE_EVENT
|
||||||
jne .loop
|
jne .loop
|
||||||
@ -186,7 +188,7 @@ start_:
|
|||||||
jmp .loop
|
jmp .loop
|
||||||
|
|
||||||
|
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
on_button_run:
|
on_button_run:
|
||||||
push dword[edit1.text]
|
push dword[edit1.text]
|
||||||
call extractrunpathandparams
|
call extractrunpathandparams
|
||||||
@ -195,67 +197,67 @@ on_button_run:
|
|||||||
mov eax, 70
|
mov eax, 70
|
||||||
mov ebx, file_info
|
mov ebx, file_info
|
||||||
int 64
|
int 64
|
||||||
|
|
||||||
mov dl, byte[lastendpath]
|
mov dl, byte[lastendpath]
|
||||||
mov ecx, [ptrlastendpath]
|
mov ecx, [ptrlastendpath]
|
||||||
mov [ecx], dl
|
mov [ecx], dl
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jnge .error
|
jnge .error
|
||||||
mov [runresult], dword sz_Program_run_successfully
|
mov [runresult], dword sz_Program_run_successfully
|
||||||
jmp .exit
|
jmp .exit
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.5:
|
.5:
|
||||||
cmp al, -5
|
cmp al, -5
|
||||||
jne .31
|
jne .31
|
||||||
mov [runresult], dword sz_File_not_found
|
mov [runresult], dword sz_File_not_found
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.31:
|
.31:
|
||||||
cmp al, -31
|
cmp al, -31
|
||||||
jne .32
|
jne .32
|
||||||
mov [runresult], dword sz_File_is_not_executable
|
mov [runresult], dword sz_File_is_not_executable
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.32:
|
.32:
|
||||||
cmp al, -32
|
cmp al, -32
|
||||||
jne .10
|
jne .10
|
||||||
mov [runresult], dword sz_Too_many_processes
|
mov [runresult], dword sz_Too_many_processes
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.10:
|
.10:
|
||||||
cmp al, -10
|
cmp al, -10
|
||||||
jne .30
|
jne .30
|
||||||
mov [runresult], dword sz_Access_denied
|
mov [runresult], dword sz_Access_denied
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.30:
|
.30:
|
||||||
cmp al, -30
|
cmp al, -30
|
||||||
jne .unknown
|
jne .unknown
|
||||||
mov [runresult], dword sz_Out_of_memory
|
mov [runresult], dword sz_Out_of_memory
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.unknown:
|
.unknown:
|
||||||
mov [runresult], dword sz_Unknown_error
|
mov [runresult], dword sz_Unknown_error
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.exit:
|
.exit:
|
||||||
call on_redraw
|
call on_redraw
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
on_button_browse:
|
on_button_browse:
|
||||||
push od
|
push od
|
||||||
call [opendialog_start]
|
call [opendialog_start]
|
||||||
|
|
||||||
mov eax, [od.status]
|
mov eax, [od.status]
|
||||||
test eax, eax
|
test eax, eax
|
||||||
je .exit
|
je .exit
|
||||||
|
|
||||||
;======== if space exist in filepath, then quote filepath
|
;======== if space exist in filepath, then quote filepath
|
||||||
mov eax, [od.openfile_path]
|
mov eax, [od.openfile_path]
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.check_space:
|
.check_space:
|
||||||
cmp [eax], byte 0
|
cmp [eax], byte 0
|
||||||
je .no_space
|
je .no_space
|
||||||
@ -264,14 +266,14 @@ on_button_browse:
|
|||||||
inc eax
|
inc eax
|
||||||
jmp .check_space
|
jmp .check_space
|
||||||
.space:
|
.space:
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.find_end_zero:
|
.find_end_zero:
|
||||||
inc eax
|
inc eax
|
||||||
cmp [eax], byte 0
|
cmp [eax], byte 0
|
||||||
jne .find_end_zero
|
jne .find_end_zero
|
||||||
mov [eax + 2], byte 0
|
mov [eax + 2], byte 0
|
||||||
mov [eax + 1], byte 34 ; quote
|
mov [eax + 1], byte 34 ; quote
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.shift_path:
|
.shift_path:
|
||||||
dec eax
|
dec eax
|
||||||
|
|
||||||
@ -288,12 +290,12 @@ on_button_browse:
|
|||||||
push dword[od.openfile_path]
|
push dword[od.openfile_path]
|
||||||
push edit1
|
push edit1
|
||||||
call [edit_box_set_text]
|
call [edit_box_set_text]
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.exit:
|
.exit:
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
on_redraw:
|
on_redraw:
|
||||||
; redraw.start
|
; redraw.start
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
@ -304,19 +306,19 @@ on_redraw:
|
|||||||
mov ebx, 3
|
mov ebx, 3
|
||||||
mov ecx, sc
|
mov ecx, sc
|
||||||
mov edx, 40
|
mov edx, 40
|
||||||
int 64
|
int 64
|
||||||
|
|
||||||
mov eax, [sc.work_graph]
|
mov eax, [sc.work_graph]
|
||||||
mov [edit1.shift_color], eax
|
mov [edit1.shift_color], eax
|
||||||
|
|
||||||
mov eax, [sc.work_graph]
|
mov eax, [sc.work_graph]
|
||||||
mov [edit1.focus_border_color], eax
|
mov [edit1.focus_border_color], eax
|
||||||
|
|
||||||
mov eax, [sc.frames]
|
mov eax, [sc.frames]
|
||||||
mov [edit1.blur_border_color], eax
|
mov [edit1.blur_border_color], eax
|
||||||
|
|
||||||
mov eax, [sc.work_text]
|
mov eax, [sc.work_text]
|
||||||
mov [edit1.text_color], eax
|
mov [edit1.text_color], eax
|
||||||
|
|
||||||
; draw.window
|
; draw.window
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
@ -330,7 +332,7 @@ on_redraw:
|
|||||||
or edx, 34000000h
|
or edx, 34000000h
|
||||||
mov edi, sz_run
|
mov edi, sz_run
|
||||||
int 64
|
int 64
|
||||||
|
|
||||||
mov eax, [window.width]
|
mov eax, [window.width]
|
||||||
sub eax, 318
|
sub eax, 318
|
||||||
shr eax, 1
|
shr eax, 1
|
||||||
@ -340,8 +342,8 @@ on_redraw:
|
|||||||
push sz_Type_name_of_program
|
push sz_Type_name_of_program
|
||||||
push dword [sc.work_text]
|
push dword [sc.work_text]
|
||||||
call draw.text
|
call draw.text
|
||||||
|
|
||||||
; ====================| browse button |====================
|
; ====================| browse button |====================
|
||||||
push 20
|
push 20
|
||||||
push 5
|
push 5
|
||||||
push 38
|
push 38
|
||||||
@ -355,7 +357,7 @@ on_redraw:
|
|||||||
push dword [sc.work_button_text]
|
push dword [sc.work_button_text]
|
||||||
call draw.text
|
call draw.text
|
||||||
|
|
||||||
; ====================| run button |====================
|
; ====================| run button |====================
|
||||||
push 10
|
push 10
|
||||||
mov eax, [window.width]
|
mov eax, [window.width]
|
||||||
sub eax, 57
|
sub eax, 57
|
||||||
@ -372,8 +374,8 @@ on_redraw:
|
|||||||
push sz_run
|
push sz_run
|
||||||
push dword [sc.work_button_text]
|
push dword [sc.work_button_text]
|
||||||
call draw.text
|
call draw.text
|
||||||
; =====================================================
|
; =====================================================
|
||||||
|
|
||||||
mov eax, 57
|
mov eax, 57
|
||||||
push eax
|
push eax
|
||||||
mov eax, [window.height]
|
mov eax, [window.height]
|
||||||
@ -385,7 +387,7 @@ on_redraw:
|
|||||||
|
|
||||||
push edit1
|
push edit1
|
||||||
call [edit_box_draw]
|
call [edit_box_draw]
|
||||||
|
|
||||||
; redraw.finish
|
; redraw.finish
|
||||||
mov eax, 12
|
mov eax, 12
|
||||||
mov ebx, 2
|
mov ebx, 2
|
||||||
@ -394,22 +396,22 @@ on_redraw:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
extractrunpathandparams:
|
extractrunpathandparams:
|
||||||
xor ecx, ecx
|
xor ecx, ecx
|
||||||
|
|
||||||
mov eax, [esp + 4]
|
mov eax, [esp + 4]
|
||||||
mov [runpath], eax
|
mov [runpath], eax
|
||||||
|
|
||||||
movzx eax, byte [eax]
|
movzx eax, byte [eax]
|
||||||
cmp eax, 34
|
cmp eax, 34
|
||||||
jne .start_without_quote
|
jne .start_without_quote
|
||||||
|
|
||||||
inc ecx
|
inc ecx
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.loop1:
|
.loop1:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
cmp eax, 34
|
cmp eax, 34
|
||||||
jne .not_quote
|
jne .not_quote
|
||||||
|
|
||||||
@ -421,25 +423,25 @@ extractrunpathandparams:
|
|||||||
mov [ptrlastendpath], eax
|
mov [ptrlastendpath], eax
|
||||||
mov [lastendpath], byte 34
|
mov [lastendpath], byte 34
|
||||||
inc ecx
|
inc ecx
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.skip_space1:
|
.skip_space1:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
cmp al, 32
|
cmp al, 32
|
||||||
jne .skipped1
|
jne .skipped1
|
||||||
inc ecx
|
inc ecx
|
||||||
jmp .skip_space1
|
jmp .skip_space1
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.skipped1:
|
.skipped1:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
add eax, ecx
|
add eax, ecx
|
||||||
mov [runparams], eax
|
mov [runparams], eax
|
||||||
inc dword [runpath]
|
inc dword [runpath]
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.not_quote:
|
.not_quote:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jne .not_zero1
|
jne .not_zero1
|
||||||
@ -450,17 +452,17 @@ extractrunpathandparams:
|
|||||||
add eax, ecx
|
add eax, ecx
|
||||||
mov [ptrlastendpath], eax
|
mov [ptrlastendpath], eax
|
||||||
mov [lastendpath], byte 0
|
mov [lastendpath], byte 0
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.not_zero1:
|
.not_zero1:
|
||||||
inc ecx
|
inc ecx
|
||||||
jmp .loop1
|
jmp .loop1
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.start_without_quote:
|
.start_without_quote:
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.loop2:
|
.loop2:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
cmp eax, 32
|
cmp eax, 32
|
||||||
jne .not_space
|
jne .not_space
|
||||||
|
|
||||||
@ -472,24 +474,24 @@ extractrunpathandparams:
|
|||||||
mov [ptrlastendpath], eax
|
mov [ptrlastendpath], eax
|
||||||
mov [lastendpath], byte 32
|
mov [lastendpath], byte 32
|
||||||
inc ecx
|
inc ecx
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.skip_space2:
|
.skip_space2:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
cmp al, 32
|
cmp al, 32
|
||||||
jne .skipped2
|
jne .skipped2
|
||||||
inc ecx
|
inc ecx
|
||||||
jmp .skip_space2
|
jmp .skip_space2
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.skipped2:
|
.skipped2:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
add eax, ecx
|
add eax, ecx
|
||||||
mov [runparams], eax
|
mov [runparams], eax
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.not_space:
|
.not_space:
|
||||||
mov eax, [runpath]
|
mov eax, [runpath]
|
||||||
movzx eax, byte [eax + ecx]
|
movzx eax, byte [eax + ecx]
|
||||||
|
|
||||||
test eax, eax
|
test eax, eax
|
||||||
jne .not_zero2
|
jne .not_zero2
|
||||||
@ -500,16 +502,16 @@ extractrunpathandparams:
|
|||||||
add eax, ecx
|
add eax, ecx
|
||||||
mov [ptrlastendpath], eax
|
mov [ptrlastendpath], eax
|
||||||
mov [lastendpath], byte 0
|
mov [lastendpath], byte 0
|
||||||
jmp .exit
|
jmp .exit
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.not_zero2:
|
.not_zero2:
|
||||||
inc ecx
|
inc ecx
|
||||||
jmp .loop2
|
jmp .loop2
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.exit:
|
.exit:
|
||||||
ret 4
|
ret 4
|
||||||
|
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
draw.button:
|
draw.button:
|
||||||
mov eax, 8
|
mov eax, 8
|
||||||
mov ebx, [esp + 16]
|
mov ebx, [esp + 16]
|
||||||
@ -522,7 +524,7 @@ draw.button:
|
|||||||
mov esi, [sc.work_button]
|
mov esi, [sc.work_button]
|
||||||
int 64
|
int 64
|
||||||
ret 20
|
ret 20
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
draw.text:
|
draw.text:
|
||||||
mov eax, 4
|
mov eax, 4
|
||||||
mov ebx, [esp + 16]
|
mov ebx, [esp + 16]
|
||||||
@ -533,21 +535,21 @@ draw.text:
|
|||||||
mov edx, [esp + 8]
|
mov edx, [esp + 8]
|
||||||
int 64
|
int 64
|
||||||
ret 16
|
ret 16
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
load.library:
|
load.library:
|
||||||
mov eax, 68
|
mov eax, 68
|
||||||
mov ebx, 19
|
mov ebx, 19
|
||||||
mov ecx, [esp + 4]
|
mov ecx, [esp + 4]
|
||||||
int 64
|
int 64
|
||||||
ret 4
|
ret 4
|
||||||
; ======================================================================= ;
|
; ======================================================================= ;
|
||||||
getprocaddress:
|
getprocaddress:
|
||||||
mov edx, [esp + 8] ; hlib
|
mov edx, [esp + 8] ; hlib
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
test edx, edx ; If hlib = 0 then goto .end
|
test edx, edx ; If hlib = 0 then goto .end
|
||||||
jz .end
|
jz .end
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.next:
|
.next:
|
||||||
cmp [edx], dword 0 ; If end of export table then goto .end
|
cmp [edx], dword 0 ; If end of export table then goto .end
|
||||||
jz .end
|
jz .end
|
||||||
|
|
||||||
@ -555,7 +557,7 @@ getprocaddress:
|
|||||||
mov esi, [edx]
|
mov esi, [edx]
|
||||||
mov edi, [esp + 4] ; name
|
mov edi, [esp + 4] ; name
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.next_:
|
.next_:
|
||||||
lodsb
|
lodsb
|
||||||
scasb
|
scasb
|
||||||
jne .fail
|
jne .fail
|
||||||
@ -563,17 +565,17 @@ getprocaddress:
|
|||||||
jnz .next_
|
jnz .next_
|
||||||
jmp .ok
|
jmp .ok
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.fail:
|
.fail:
|
||||||
add edx, 8
|
add edx, 8
|
||||||
jmp .next
|
jmp .next
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.ok: ; return address
|
.ok: ; return address
|
||||||
mov eax, [edx + 4]
|
mov eax, [edx + 4]
|
||||||
; ----------------------- ;
|
; ----------------------- ;
|
||||||
.end:
|
.end:
|
||||||
ret 8
|
ret 8
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
file_info:
|
file_info:
|
||||||
dd 7
|
dd 7
|
||||||
@ -583,20 +585,20 @@ runparams:
|
|||||||
dd 0
|
dd 0
|
||||||
dd 0
|
dd 0
|
||||||
db 0
|
db 0
|
||||||
runpath:
|
runpath:
|
||||||
dd 0
|
dd 0
|
||||||
|
|
||||||
|
|
||||||
screen:
|
screen:
|
||||||
.height dw 0
|
.height dw 0
|
||||||
.width dw 0
|
.width dw 0
|
||||||
|
|
||||||
window:
|
window:
|
||||||
.left dd 0
|
.left dd 0
|
||||||
.top dd 0
|
.top dd 0
|
||||||
.width dd 0
|
.width dd 0
|
||||||
.height dd 0
|
.height dd 0
|
||||||
|
|
||||||
box_lib dd 0
|
box_lib dd 0
|
||||||
|
|
||||||
edit1:
|
edit1:
|
||||||
@ -619,13 +621,13 @@ edit1:
|
|||||||
.cl_curs_y dd 0
|
.cl_curs_y dd 0
|
||||||
.shift dd 0
|
.shift dd 0
|
||||||
.shift_old dd 0
|
.shift_old dd 0
|
||||||
|
|
||||||
edit_box_draw dd 0
|
edit_box_draw dd 0
|
||||||
edit_box_key dd 0
|
edit_box_key dd 0
|
||||||
edit_box_mouse dd 0
|
edit_box_mouse dd 0
|
||||||
edit_box_set_text dd 0
|
edit_box_set_text dd 0
|
||||||
|
|
||||||
sc:
|
sc:
|
||||||
.frames dd 0
|
.frames dd 0
|
||||||
.grab dd 0
|
.grab dd 0
|
||||||
.grab_button dd 0
|
.grab_button dd 0
|
||||||
@ -636,10 +638,10 @@ sc:
|
|||||||
.work_button_text dd 0
|
.work_button_text dd 0
|
||||||
.work_text dd 0
|
.work_text dd 0
|
||||||
.work_graph dd 0
|
.work_graph dd 0
|
||||||
|
|
||||||
proc_lib dd 0
|
proc_lib dd 0
|
||||||
|
|
||||||
od:
|
od:
|
||||||
.mode dd 0
|
.mode dd 0
|
||||||
.procinfo dd 0
|
.procinfo dd 0
|
||||||
.com_area_name dd sz_FFFFFFFF_open_dialog
|
.com_area_name dd sz_FFFFFFFF_open_dialog
|
||||||
@ -656,7 +658,7 @@ od:
|
|||||||
.x_start dw 0
|
.x_start dw 0
|
||||||
.y_size dw 414
|
.y_size dw 414
|
||||||
.y_start dw 0
|
.y_start dw 0
|
||||||
|
|
||||||
opendialog_init dd 0
|
opendialog_init dd 0
|
||||||
opendialog_start dd 0
|
opendialog_start dd 0
|
||||||
|
|
||||||
@ -664,8 +666,8 @@ filefilter dd 0
|
|||||||
runresult dd sz_empty
|
runresult dd sz_empty
|
||||||
|
|
||||||
lastendpath db 0
|
lastendpath db 0
|
||||||
ptrlastendpath dd 0
|
ptrlastendpath dd 0
|
||||||
|
|
||||||
sz_empty db 0
|
sz_empty db 0
|
||||||
|
|
||||||
sz_box_lib db "/sys/lib/box_lib.obj",0
|
sz_box_lib db "/sys/lib/box_lib.obj",0
|
||||||
@ -681,19 +683,34 @@ sz_FFFFFFFF_open_dialog db "FFFFFFFF_open_dialog",0
|
|||||||
sz_SYS db "/sys",0
|
sz_SYS db "/sys",0
|
||||||
sz_opendial_path db "/sys/File managers/opendial",0
|
sz_opendial_path db "/sys/File managers/opendial",0
|
||||||
|
|
||||||
sz_Program_run_successfully db "Program run successfully",0
|
if lang eq it
|
||||||
sz_File_not_found db "File not found",0
|
sz_Program_run_successfully db "Programma eseguito correttamente",0
|
||||||
sz_File_is_not_executable db "File is not executable",0
|
sz_File_not_found db "File non trovato",0
|
||||||
sz_Too_many_processes db "Too many processes",0
|
sz_File_is_not_executable db "File non eseguibile",0
|
||||||
sz_Access_denied db "Access denied",0
|
sz_Too_many_processes db "Troppi processi",0
|
||||||
sz_Out_of_memory db "Out of memory",0
|
sz_Access_denied db "Accesso negato",0
|
||||||
sz_Unknown_error db "Unknown error",0
|
sz_Out_of_memory db "Out of memory",0
|
||||||
|
sz_Unknown_error db "Errore sconosciuto",0
|
||||||
|
|
||||||
sz_Type_name_of_program db "Type name of program, and Kolibri will run it for you",0
|
sz_Type_name_of_program db "Digita il nome del programma per eseguirlo",0
|
||||||
|
|
||||||
sz_run db " Run ",0
|
sz_run db "Esegui ",0
|
||||||
sz_browse db " Browse ",0
|
sz_browse db " Naviga",0
|
||||||
|
|
||||||
; ======================================================================= ;
|
else
|
||||||
|
sz_Program_run_successfully db "Program run successfully",0
|
||||||
|
sz_File_not_found db "File not found",0
|
||||||
|
sz_File_is_not_executable db "File is not executable",0
|
||||||
|
sz_Too_many_processes db "Too many processes",0
|
||||||
|
sz_Access_denied db "Access denied",0
|
||||||
|
sz_Out_of_memory db "Out of memory",0
|
||||||
|
sz_Unknown_error db "Unknown error",0
|
||||||
|
|
||||||
|
sz_Type_name_of_program db "Type name of program, and Kolibri will run it for you",0
|
||||||
|
|
||||||
|
sz_run db " Run ",0
|
||||||
|
sz_browse db " Browse ",0
|
||||||
|
end if
|
||||||
|
; ======================================================================= ;
|
||||||
end_:
|
end_:
|
||||||
|
|
||||||
|
19
programs/system/RunOD/makefile
Normal file
19
programs/system/RunOD/makefile
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#!gmake
|
||||||
|
|
||||||
|
# Macro
|
||||||
|
FASM=/opt/bin/fasm
|
||||||
|
KPACK=/opt/bin/kpack
|
||||||
|
LANG=lang.inc
|
||||||
|
FILE=RunOD
|
||||||
|
SOURCE=${FILE}.asm
|
||||||
|
OUT=${FILE}.bin
|
||||||
|
|
||||||
|
en:
|
||||||
|
echo "lang fix en" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
it:
|
||||||
|
echo "lang fix it" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${LANG} ${OUT}
|
25
programs/system/rdsave/trunk/makefile
Normal file
25
programs/system/rdsave/trunk/makefile
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!gmake
|
||||||
|
|
||||||
|
# Macro
|
||||||
|
FASM=/opt/bin/fasm
|
||||||
|
KPACK=/opt/bin/kpack
|
||||||
|
LANG=lang.inc
|
||||||
|
FILE=rdsave
|
||||||
|
SOURCE=${FILE}.asm
|
||||||
|
OUT=${FILE}.bin
|
||||||
|
|
||||||
|
en:
|
||||||
|
echo "lang fix en" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
ru:
|
||||||
|
echo "lang fix ru" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
it:
|
||||||
|
echo "lang fix it" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
et:
|
||||||
|
echo "lang fix et" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${LANG} ${OUT}
|
@ -20,7 +20,7 @@ include '..\..\..\macros.inc'
|
|||||||
|
|
||||||
appname equ 'RDsave '
|
appname equ 'RDsave '
|
||||||
version equ '1.3'
|
version equ '1.3'
|
||||||
|
|
||||||
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à
|
use32 ; ¢ª«îç¨âì 32-¡¨âë© à¥¦¨¬ áᥬ¡«¥à
|
||||||
org 0x0 ; ¤à¥á æ¨ï á ã«ï
|
org 0x0 ; ¤à¥á æ¨ï á ã«ï
|
||||||
|
|
||||||
@ -96,7 +96,7 @@ still:
|
|||||||
|
|
||||||
dec eax ; ¯¥à¥à¨á®¢ âì ®ª®?
|
dec eax ; ¯¥à¥à¨á®¢ âì ®ª®?
|
||||||
jz red ; ¥á«¨ ¤ - ¬¥âªã red
|
jz red ; ¥á«¨ ¤ - ¬¥âªã red
|
||||||
dec eax
|
dec eax
|
||||||
jz key
|
jz key
|
||||||
dec eax
|
dec eax
|
||||||
jz button
|
jz button
|
||||||
@ -242,7 +242,7 @@ draw_window:
|
|||||||
;®âà¨á®¢ª ª®¯®ª
|
;®âà¨á®¢ª ª®¯®ª
|
||||||
sub ebx,4 shl 16
|
sub ebx,4 shl 16
|
||||||
sub ecx,4 shl 16
|
sub ecx,4 shl 16
|
||||||
mcall 8,,,5,[sc.work_button]
|
mcall 8,,,5,[sc.work_button]
|
||||||
|
|
||||||
sub ecx,40 shl 16
|
sub ecx,40 shl 16
|
||||||
dec edx
|
dec edx
|
||||||
@ -332,7 +332,7 @@ key_help_correct:
|
|||||||
mov cx,13
|
mov cx,13
|
||||||
mcall 13,,,[sc.work_graph]
|
mcall 13,,,[sc.work_graph]
|
||||||
popa
|
popa
|
||||||
mcall
|
mcall
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
@ -386,6 +386,21 @@ error10 db 'Juurdep
|
|||||||
error11 db 'Seadme viga',0
|
error11 db 'Seadme viga',0
|
||||||
aUnknownError db 'Tundmatu viga',0
|
aUnknownError db 'Tundmatu viga',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
|
else if lang eq it
|
||||||
|
save db 'Salva',0
|
||||||
|
select db 'Seleziona',0
|
||||||
|
label1 db 'Seleziona cosa salvare:',0
|
||||||
|
label2 db ' oppure seleziona il file:',0
|
||||||
|
label3 db 'Tutte le cartelle devono esistere',0
|
||||||
|
ok db 'Il RAM-drivet e stato salvato',0
|
||||||
|
error3 db 'Filesystem sconosciuto',0
|
||||||
|
error5 db 'Percorso non valido',0
|
||||||
|
error8 db 'Disco pieno',0
|
||||||
|
error9 db 'Tabella FAT corrotta',0
|
||||||
|
error10 db 'Accesso negato',0
|
||||||
|
error11 db 'Errore di device',0
|
||||||
|
aUnknownError db 'Errore sconosciuto',0
|
||||||
|
;---------------------------------------------------------------------
|
||||||
else
|
else
|
||||||
save db ' Save',0
|
save db ' Save',0
|
||||||
select db ' Select',0
|
select db ' Select',0
|
||||||
@ -483,7 +498,7 @@ aOpenDialog_Start db 'OpenDialog_start',0
|
|||||||
;aOpenDialog_Version db 'Version_OpenDialog',0
|
;aOpenDialog_Version db 'Version_OpenDialog',0
|
||||||
;---------------------------------------------------------------------
|
;---------------------------------------------------------------------
|
||||||
align 4
|
align 4
|
||||||
Box_lib_import:
|
Box_lib_import:
|
||||||
;init_lib dd a_init
|
;init_lib dd a_init
|
||||||
;version_lib dd a_version
|
;version_lib dd a_version
|
||||||
|
|
||||||
|
16
programs/system/refrscrn/makefile
Normal file
16
programs/system/refrscrn/makefile
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#!gmake
|
||||||
|
|
||||||
|
# Macro
|
||||||
|
FASM=/opt/bin/fasm
|
||||||
|
KPACK=/opt/bin/kpack
|
||||||
|
LANG=lang.inc
|
||||||
|
FILE=refrscrn
|
||||||
|
SOURCE=${FILE}.asm
|
||||||
|
OUT=${FILE}.bin
|
||||||
|
|
||||||
|
en:
|
||||||
|
echo "lang fix en" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${LANG} ${OUT}
|
22
programs/system/run/trunk/makefile
Normal file
22
programs/system/run/trunk/makefile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
#!gmake
|
||||||
|
|
||||||
|
# Macro
|
||||||
|
FASM=/opt/bin/fasm
|
||||||
|
KPACK=/opt/bin/kpack
|
||||||
|
LANG=lang.inc
|
||||||
|
FILE=run
|
||||||
|
SOURCE=${FILE}.asm
|
||||||
|
OUT=${FILE}.bin
|
||||||
|
|
||||||
|
en:
|
||||||
|
echo "lang fix en" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
ru:
|
||||||
|
echo "lang fix ru" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
it:
|
||||||
|
echo "lang fix it" > ${LANG}
|
||||||
|
${FASM} ${SOURCE} ${OUT}
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f ${LANG} ${OUT}
|
@ -11,7 +11,7 @@ include 'txtbut.inc'
|
|||||||
include '../../../macros.inc'
|
include '../../../macros.inc'
|
||||||
include 'run.mac'
|
include 'run.mac'
|
||||||
include 'lang.inc'
|
include 'lang.inc'
|
||||||
use32
|
use32
|
||||||
org 0x0
|
org 0x0
|
||||||
db 'MENUET01'
|
db 'MENUET01'
|
||||||
dd 0x1
|
dd 0x1
|
||||||
@ -46,7 +46,7 @@ red:
|
|||||||
push dword [sc.work_graph]
|
push dword [sc.work_graph]
|
||||||
pop [input_fn.focus_border_color]
|
pop [input_fn.focus_border_color]
|
||||||
call draw_window
|
call draw_window
|
||||||
still: ;®á®¢®© ®¡à ¡®â稪
|
still: ;®á®¢®© ®¡à ¡®â稪
|
||||||
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
mcall 10 ;Ž¦¨¤ âì ᮡëâ¨ï
|
||||||
dec eax
|
dec eax
|
||||||
jz red
|
jz red
|
||||||
@ -54,7 +54,7 @@ still: ;
|
|||||||
jz key
|
jz key
|
||||||
dec eax
|
dec eax
|
||||||
jz button
|
jz button
|
||||||
; mouse_edit_box input_fn
|
; mouse_edit_box input_fn
|
||||||
push dword input_fn
|
push dword input_fn
|
||||||
call [edit_box_mouse]
|
call [edit_box_mouse]
|
||||||
|
|
||||||
@ -239,31 +239,44 @@ input_fn edit_box 0,5,5,0xffffff,0x6a9480,0,0xaaaaaa,0,511,fn,mouse_dd,ed_focus+
|
|||||||
;mouse_flag: dd 0x0
|
;mouse_flag: dd 0x0
|
||||||
input_fn_end:
|
input_fn_end:
|
||||||
if lang eq ru
|
if lang eq ru
|
||||||
hello db '‚¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã ¨ ¦¬¨â¥ Enter',0
|
hello db '‚¢¥¤¨â¥ ¯®«ë© ¯ãâì ª ä ©«ã ¨ ¦¬¨â¥ Enter',0
|
||||||
bad_file_sys db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
|
bad_file_sys db '<27>¥¨§¢¥áâ ï ä ©«®¢ ï á¨á⥬ ',0 ; 3
|
||||||
file_not_find db '” ©« ¥ ©¤¥',0 ; 5
|
file_not_find db '” ©« ¥ ©¤¥',0 ; 5
|
||||||
bad_fat_table db '’ ¡«¨æ FAT à §àãè¥ ',0 ; 9
|
bad_fat_table db '’ ¡«¨æ FAT à §àãè¥ ',0 ; 9
|
||||||
acces_denyied db '„®áâ㯠§ ¯à¥é¥',0 ; 10
|
acces_denyied db '„®áâ㯠§ ¯à¥é¥',0 ; 10
|
||||||
device_error db 'Žè¨¡ª ãáâனá⢠',0 ; 11
|
device_error db 'Žè¨¡ª ãáâனá⢠',0 ; 11
|
||||||
out_of_memory db '<27>¥¤®áâ â®ç® ¯ ¬ïâ¨',0 ; 30
|
out_of_memory db '<27>¥¤®áâ â®ç® ¯ ¬ïâ¨',0 ; 30
|
||||||
file_not_executable db '” ©« ¥ ï¥âáï ¨á¯®«ï¥¬ë¬',0 ; 31
|
file_not_executable db '” ©« ¥ ï¥âáï ¨á¯®«ï¥¬ë¬',0 ; 31
|
||||||
many_processes db '‘«¨èª®¬ ¬®£® ¯à®æ¥áᮢ',0 ; 32
|
many_processes db '‘«¨èª®¬ ¬®£® ¯à®æ¥áᮢ',0 ; 32
|
||||||
run_ok db '<27>à®£à ¬¬ ãá¯¥è® § ¯ãé¥ ',0
|
run_ok db '<27>à®£à ¬¬ ãá¯¥è® § ¯ãé¥ ',0
|
||||||
grab_text db '‡ ¯ã᪠¯à®£à ¬¬ë',0
|
grab_text db '‡ ¯ã᪠¯à®£à ¬¬ë',0
|
||||||
run_but_text db '‡€<E280A1>“‘’ˆ’œ',0
|
run_but_text db '‡€<E280A1>“‘’ˆ’œ',0
|
||||||
|
else if lang eq it
|
||||||
|
hello db 'Inserisci percorso completo al file e premi <Enter>',0
|
||||||
|
bad_file_sys db 'Filesysrem sconosciuto',0 ; 3
|
||||||
|
file_not_find db 'File non trovato',0 ; 5
|
||||||
|
bad_fat_table db 'Tabella FAT corrotta',0 ; 9
|
||||||
|
acces_denyied db 'Accesso negato',0 ; 10
|
||||||
|
device_error db 'Device error',0 ; 11
|
||||||
|
out_of_memory db 'Out of memory',0 ; 30
|
||||||
|
file_not_executable db 'File non eseguibile',0 ; 31
|
||||||
|
many_processes db 'Troppo processi',0 ; 32
|
||||||
|
run_ok db 'Il programma eseguito correttamente',0
|
||||||
|
grab_text db 'RUN',0
|
||||||
|
run_but_text db 'Esegui',0
|
||||||
else
|
else
|
||||||
hello db 'Enter full path to file and press <Enter>',0
|
hello db 'Enter full path to file and press <Enter>',0
|
||||||
bad_file_sys db 'Unknown file system',0 ; 3
|
bad_file_sys db 'Unknown file system',0 ; 3
|
||||||
file_not_find db 'File not found',0 ; 5
|
file_not_find db 'File not found',0 ; 5
|
||||||
bad_fat_table db 'FAT table corrupted',0 ; 9
|
bad_fat_table db 'FAT table corrupted',0 ; 9
|
||||||
acces_denyied db 'Access denied',0 ; 10
|
acces_denyied db 'Access denied',0 ; 10
|
||||||
device_error db 'Device error',0 ; 11
|
device_error db 'Device error',0 ; 11
|
||||||
out_of_memory db 'Out of memory',0 ; 30
|
out_of_memory db 'Out of memory',0 ; 30
|
||||||
file_not_executable db 'File is not executable',0 ; 31
|
file_not_executable db 'File is not executable',0 ; 31
|
||||||
many_processes db 'Too many processes',0 ; 32
|
many_processes db 'Too many processes',0 ; 32
|
||||||
run_ok db 'The program was started successfully',0
|
run_ok db 'The program was started successfully',0
|
||||||
grab_text db 'RUN',0
|
grab_text db 'RUN',0
|
||||||
run_but_text db 'RUN',0
|
run_but_text db 'RUN',0
|
||||||
end if
|
end if
|
||||||
status dd hello
|
status dd hello
|
||||||
|
|
||||||
@ -286,7 +299,7 @@ head_f_l db 'System error',0
|
|||||||
err_message_import db 'Error on load import library box_lib.obj',0
|
err_message_import db 'Error on load import library box_lib.obj',0
|
||||||
end if
|
end if
|
||||||
|
|
||||||
myimport:
|
myimport:
|
||||||
|
|
||||||
edit_box_draw dd aEdit_box_draw
|
edit_box_draw dd aEdit_box_draw
|
||||||
edit_box_key dd aEdit_box_key
|
edit_box_key dd aEdit_box_key
|
||||||
|
Loading…
Reference in New Issue
Block a user