forked from KolibriOS/kolibrios
small optimization. reduce code size
git-svn-id: svn://kolibrios.org@501 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
fef3689506
commit
59eaa9f2bd
@ -83,14 +83,23 @@ szEXPORTS db 'EXPORTS',0
|
||||
szIMPORTS db 'IMPORTS',0
|
||||
|
||||
firstapp db '%sys%/LAUNCHER',0
|
||||
char dd 0,0,0
|
||||
dd 2560
|
||||
dd FONT_I
|
||||
db '%sys%/FONTS/CHAR.MT',0
|
||||
char2 dd 0,0,0
|
||||
dd 2560
|
||||
dd FONT_II
|
||||
db '%sys%/FONTS/CHAR2.MT',0
|
||||
|
||||
if 0
|
||||
char dd 0,0,0
|
||||
dd 2560
|
||||
dd FONT_I
|
||||
db '%sys%/FONTS/CHAR.MT',0
|
||||
|
||||
char2 dd 0,0,0
|
||||
dd 2560
|
||||
dd FONT_II
|
||||
db '%sys%/FONTS/CHAR2.MT',0
|
||||
else
|
||||
|
||||
char db '%sys%/FONTS/CHAR.MT',0
|
||||
char2 db '%sys%/FONTS/CHAR2.MT',0
|
||||
|
||||
end if
|
||||
|
||||
|
||||
bootpath db '/KOLIBRI '
|
||||
|
@ -18,8 +18,10 @@ endl
|
||||
|
||||
|
||||
mov esi,[sourc]
|
||||
mov edi,ebp
|
||||
add edi,tmpsrc-ebp
|
||||
; mov edi,ebp
|
||||
; add edi,tmpsrc-ebp
|
||||
lea edi, [tmpsrc]
|
||||
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
@ -39,29 +41,35 @@ endl
|
||||
xor eax,eax
|
||||
.loop:
|
||||
push eax
|
||||
mov ebx,ebp
|
||||
add ebx,param-ebp
|
||||
mov ecx,ebp
|
||||
add ecx,val-ebp
|
||||
; mov ebx,ebp
|
||||
; add ebx,param-ebp
|
||||
; mov ecx,ebp
|
||||
; add ecx,val-ebp
|
||||
lea ebx, [param]
|
||||
lea ecx, [val]
|
||||
invoke ini.get_par,sect, ebx, ecx, eax
|
||||
|
||||
mov bl,[param]
|
||||
or bl,bl
|
||||
jz .done
|
||||
|
||||
mov eax,ebp
|
||||
add eax,tmpsrc-ebp
|
||||
mov ebx,ebp
|
||||
add ebx,param-ebp
|
||||
mov ecx,ebp
|
||||
add ecx,val-ebp
|
||||
; mov eax,ebp
|
||||
; add eax,tmpsrc-ebp
|
||||
; mov ebx,ebp
|
||||
; add ebx,param-ebp
|
||||
; mov ecx,ebp
|
||||
; add ecx,val-ebp
|
||||
lea eax, [tmpsrc]
|
||||
lea ebx, [param]
|
||||
lea ecx, [val]
|
||||
mov edx,[dest]
|
||||
|
||||
stdcall full_file_name_parse, eax,edx,ebx,ecx
|
||||
|
||||
mov esi,[dest]
|
||||
mov edi,ebp
|
||||
add edi,tmpsrc-ebp
|
||||
; mov edi,ebp
|
||||
; add edi,tmpsrc-ebp
|
||||
lea edi, [tmpsrc]
|
||||
@@:
|
||||
lodsb
|
||||
stosb
|
||||
@ -76,8 +84,9 @@ endl
|
||||
pop eax
|
||||
full_file_name_exit:
|
||||
|
||||
mov eax,ebp
|
||||
add eax,tmpsrc-ebp
|
||||
; mov eax,ebp
|
||||
; add eax,tmpsrc-ebp
|
||||
lea eax, [tmpsrc]
|
||||
stdcall full_file_name_parse , eax , [dest], sysdir_ , sys_path
|
||||
popad
|
||||
ret
|
||||
|
@ -552,27 +552,18 @@ no_lib_load:
|
||||
|
||||
; LOAD FONTS I and II
|
||||
|
||||
; mov esi,char
|
||||
; xor ebx,ebx
|
||||
; mov ecx,2560
|
||||
; mov edx,FONT_I
|
||||
; call fs_RamdiskRead
|
||||
|
||||
; mov esi,char2
|
||||
; xor ebx,ebx
|
||||
; mov ecx,2560;26000
|
||||
; mov edx,FONT_II
|
||||
; call fs_RamdiskRead
|
||||
|
||||
pushad
|
||||
push eax
|
||||
mov eax,char
|
||||
call file_system_lfn
|
||||
mov eax,char2
|
||||
call file_system_lfn
|
||||
pop eax
|
||||
popad
|
||||
; pushad
|
||||
; push eax
|
||||
; mov eax,char
|
||||
; call file_system_lfn
|
||||
; mov eax,char2
|
||||
; call file_system_lfn
|
||||
; pop eax
|
||||
; popad
|
||||
|
||||
stdcall read_file, char, FONT_I, 0, 2560
|
||||
stdcall read_file, char2, FONT_II, 0, 2560
|
||||
|
||||
mov esi,boot_fonts
|
||||
call boot_log
|
||||
@ -657,10 +648,10 @@ no_lib_load:
|
||||
mov esi,boot_setostask
|
||||
call boot_log
|
||||
|
||||
mov eax, fpu_data
|
||||
mov dword [SLOT_BASE+APPDATA.fpu_state], eax
|
||||
mov dword [SLOT_BASE+APPDATA.fpu_handler], 0
|
||||
mov dword [SLOT_BASE+APPDATA.sse_handler], 0
|
||||
xor eax, eax
|
||||
mov dword [SLOT_BASE+APPDATA.fpu_state], fpu_data
|
||||
mov dword [SLOT_BASE+APPDATA.fpu_handler], eax
|
||||
mov dword [SLOT_BASE+APPDATA.sse_handler], eax
|
||||
|
||||
; name for OS/IDLE process
|
||||
|
||||
@ -680,9 +671,8 @@ no_lib_load:
|
||||
cld
|
||||
rep movsd
|
||||
|
||||
mov dword [SLOT_BASE+256+APPDATA.fpu_handler], 0
|
||||
mov dword [SLOT_BASE+256+APPDATA.sse_handler], 0
|
||||
mov dword [SLOT_BASE+256+APPDATA.cursor], ebx
|
||||
mov dword [SLOT_BASE+256+APPDATA.fpu_handler], eax
|
||||
mov dword [SLOT_BASE+256+APPDATA.sse_handler], eax
|
||||
|
||||
mov ebx, SLOT_BASE+256+APP_OBJ_OFFSET
|
||||
mov dword [SLOT_BASE+256+APPDATA.fd_obj], ebx
|
||||
@ -766,17 +756,11 @@ no_lib_load:
|
||||
|
||||
; LOAD FIRST APPLICATION
|
||||
cli
|
||||
|
||||
if 0
|
||||
cmp byte [BOOT_VAR+0x9030],1
|
||||
jne no_load_vrr_m
|
||||
|
||||
; mov ebp, vrr_m
|
||||
; xor ebx, ebx
|
||||
; xor edx, edx
|
||||
; call fs_execute
|
||||
; cmp eax,2 ; if vrr_m app found (PID=2)
|
||||
; je first_app_found
|
||||
|
||||
|
||||
stdcall kernel_alloc, 0x100
|
||||
push eax
|
||||
mov ebx,eax
|
||||
@ -790,18 +774,11 @@ no_lib_load:
|
||||
push eax
|
||||
stdcall kernel_free, ebx
|
||||
pop eax
|
||||
|
||||
cmp eax,2 ; if vrr_m app found (PID=2)
|
||||
je first_app_found
|
||||
|
||||
no_load_vrr_m:
|
||||
; mov ebp, firstapp
|
||||
; xor ebx, ebx
|
||||
; xor edx, edx
|
||||
; call fs_execute
|
||||
; cmp eax,2 ; continue if a process has been loaded
|
||||
; je first_app_found
|
||||
; mov eax, 0xDEADBEEF ; otherwise halt
|
||||
; hlt
|
||||
|
||||
stdcall kernel_alloc, 0x100
|
||||
push eax
|
||||
@ -820,8 +797,44 @@ no_load_vrr_m:
|
||||
mov eax, 0xDEADBEEF ; otherwise halt
|
||||
hlt
|
||||
|
||||
first_app_found:
|
||||
|
||||
else
|
||||
sub esp, 0x100
|
||||
|
||||
cmp byte [BOOT_VAR+0x9030],1
|
||||
jne no_load_vrr_m
|
||||
|
||||
mov ebp, esp
|
||||
stdcall full_file_name,vrr_m,ebp
|
||||
|
||||
xor ebx, ebx
|
||||
xor edx, edx
|
||||
call fs_execute
|
||||
|
||||
cmp eax,2 ; if vrr_m app found (PID=2)
|
||||
je first_app_found
|
||||
|
||||
no_load_vrr_m:
|
||||
|
||||
mov ebp, esp
|
||||
stdcall full_file_name,firstapp,ebp
|
||||
|
||||
xor ebx, ebx
|
||||
xor edx, edx
|
||||
call fs_execute
|
||||
|
||||
cmp eax,2 ; continue if a process has been loaded
|
||||
je first_app_found
|
||||
|
||||
mov eax, 0xDEADBEEF ; otherwise halt
|
||||
hlt
|
||||
|
||||
first_app_found:
|
||||
|
||||
add esp, 0x100
|
||||
|
||||
end if
|
||||
cli
|
||||
|
||||
;mov [TASK_COUNT],dword 2
|
||||
|
Loading…
Reference in New Issue
Block a user