Subversion Repositories Kolibri OS

Rev

Rev 4878 | Rev 6637 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4878 Rev 6435
Line 34... Line 34...
34
	dd 0x01		; header version
34
	dd 0x01		; header version
35
	dd START	; start of code
35
	dd START	; start of code
36
	dd IM_END	; size of image
36
	dd IM_END	; size of image
37
	dd I_END	; memory for app
37
	dd I_END	; memory for app
38
	dd stacktop	; esp
38
	dd stacktop	; esp
39
	dd ext_dest_cmdline	; I_Param
39
    dd dest_cmdline ; I_Param
40
	dd path		; APPLICATION PACH
40
	dd path		; APPLICATION PACH
Line 41... Line 41...
41
 
41
 
42
include 'lang.inc'
42
include 'lang.inc'
43
;include 'macros.inc'
43
;include 'macros.inc'
Line 49... Line 49...
49
;include 'debug.inc'
49
;include 'debug.inc'
50
;include 'load_lib.mac'
50
;include 'load_lib.mac'
51
include '../../develop/libraries/box_lib/load_lib.mac'
51
include '../../develop/libraries/box_lib/load_lib.mac'
52
        @use_library    ;use load lib macros
52
        @use_library    ;use load lib macros
53
;******************************************************************************
53
;******************************************************************************
54
ext_dest_cmdline:
-
 
55
	dd 0xffffffff
-
 
56
	dd temp_area
-
 
57
;------------------------------------------------------------------------------
54
;------------------------------------------------------------------------------
58
START:				; start of execution
55
START:				; start of execution
59
	mcall	68, 11
56
	mcall	68, 11
60
	mcall	66, 1,1
57
	mcall	66, 1,1
61
	mcall 40, 0x27
58
	mcall 40, 0x27
Line 108... Line 105...
108
	
105
 
Line 109... Line 106...
109
	call	get_filter_data
106
	call	get_filter_data
110
 
107
 
-
 
108
;-----------------------------------------------------
111
;-----------------------------------------------------
109
; check for parameters
112
; check for parameters
110
    mov     esi, [28]
113
	cmp	dword [temp_area],'BOOT'
111
    cmp dword [esi],'BOOT'
114
	jne	.no_boot
112
	jne	.no_boot
115
.background:
113
.background:
116
	call	load_image
114
	call	load_image
Line 138... Line 136...
138
	
136
 
139
	mcall -1
137
	mcall -1
140
;-----------------------------------------------------
138
;-----------------------------------------------------
141
 .no_boot:
139
 .no_boot:
142
	xor	eax,eax
140
	xor	eax,eax
143
	cmp	byte [temp_area],al
141
    cmp [esi],al
144
	jnz	@f
142
	jnz	@f
145
	mov	[file_name],eax
143
	mov	[file_name],eax
146
	jmp .no_param
144
	jmp .no_param
Line 151... Line 149...
151
	mov	ecx,4096/4	;256/4	;	length of a string
149
	mov	ecx,4096/4	;256/4	;	length of a string
152
	xor	eax,eax	;	symbol <0>
150
	xor	eax,eax	;	symbol <0>
153
	rep	stosd
151
	rep	stosd
Line 154... Line 152...
154
 
152
 
Line 155... Line 153...
155
 
153
 
156
	mov	edi,temp_area	; look for <0> in temp_area
154
    mov edi, [28]  ; look for <0> in temp_area
157
 
155
 
158
	cmp	[edi],byte "\"
156
	cmp	[edi],byte "\"
Line 169... Line 167...
169
	add	edi,4
167
	add	edi,4
170
.continue:
168
.continue:
171
	mov	esi,edi
169
	mov	esi,edi
172
	mov	ecx,4095 ;257	;	strlen
170
	mov	ecx,4095 ;257	;	strlen
173
	repne scasb
171
	repne scasb
-
 
172
    mov     ecx, edi
174
	lea		ecx, [edi-temp_area]
173
    sub     ecx, [28]
Line 175... Line 174...
175
 
174
 
176
	mov	edi,string
175
	mov	edi,string
-
 
176
	rep	movsb		; copy string from temp_area to "string" (filename)
177
	rep	movsb		; copy string from temp_area to "string" (filename)
177
    mov ecx, [28]
178
	cmp	[temp_area],byte "\"
178
    cmp [ecx],byte "\"
179
	je	START.background
179
	je	START.background
180
	call	load_directory
180
	call	load_directory
181
	test	eax,eax
181
	test	eax,eax
182
	jnz	@f
182
	jnz	@f