forked from KolibriOS/kolibrios
zSea: fixed long command line handling
git-svn-id: svn://kolibrios.org@6435 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
e5f26674e7
commit
7c0ebfd724
@ -55,8 +55,8 @@ plugin_9_name:
|
||||
file_name:
|
||||
rb 1024
|
||||
;----------------------
|
||||
temp_area:
|
||||
rb 64*1024 ; new max cmdline 64 Kb
|
||||
dest_cmdline:
|
||||
rb 256
|
||||
;----------------------
|
||||
procinfo:
|
||||
process_info:
|
||||
|
@ -36,7 +36,7 @@
|
||||
dd IM_END ; size of image
|
||||
dd I_END ; memory for app
|
||||
dd stacktop ; esp
|
||||
dd ext_dest_cmdline ; I_Param
|
||||
dd dest_cmdline ; I_Param
|
||||
dd path ; APPLICATION PACH
|
||||
|
||||
include 'lang.inc'
|
||||
@ -51,9 +51,6 @@ include '../../proc32.inc'
|
||||
include '../../develop/libraries/box_lib/load_lib.mac'
|
||||
@use_library ;use load lib macros
|
||||
;******************************************************************************
|
||||
ext_dest_cmdline:
|
||||
dd 0xffffffff
|
||||
dd temp_area
|
||||
;------------------------------------------------------------------------------
|
||||
START: ; start of execution
|
||||
mcall 68, 11
|
||||
@ -110,7 +107,8 @@ START: ; start of execution
|
||||
|
||||
;-----------------------------------------------------
|
||||
; check for parameters
|
||||
cmp dword [temp_area],'BOOT'
|
||||
mov esi, [28]
|
||||
cmp dword [esi],'BOOT'
|
||||
jne .no_boot
|
||||
.background:
|
||||
call load_image
|
||||
@ -140,7 +138,7 @@ START: ; start of execution
|
||||
;-----------------------------------------------------
|
||||
.no_boot:
|
||||
xor eax,eax
|
||||
cmp byte [temp_area],al
|
||||
cmp [esi],al
|
||||
jnz @f
|
||||
mov [file_name],eax
|
||||
jmp .no_param
|
||||
@ -153,7 +151,7 @@ START: ; start of execution
|
||||
rep stosd
|
||||
|
||||
|
||||
mov edi,temp_area ; look for <0> in temp_area
|
||||
mov edi, [28] ; look for <0> in temp_area
|
||||
|
||||
cmp [edi],byte "\"
|
||||
jne .continue
|
||||
@ -171,11 +169,13 @@ START: ; start of execution
|
||||
mov esi,edi
|
||||
mov ecx,4095 ;257 ; strlen
|
||||
repne scasb
|
||||
lea ecx, [edi-temp_area]
|
||||
mov ecx, edi
|
||||
sub ecx, [28]
|
||||
|
||||
mov edi,string
|
||||
rep movsb ; copy string from temp_area to "string" (filename)
|
||||
cmp [temp_area],byte "\"
|
||||
mov ecx, [28]
|
||||
cmp [ecx],byte "\"
|
||||
je START.background
|
||||
call load_directory
|
||||
test eax,eax
|
||||
|
Loading…
Reference in New Issue
Block a user