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