cpustring fixed

conf_lib fixed

git-svn-id: svn://kolibrios.org@497 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
SPraid (simba) 2007-05-15 18:05:31 +00:00
parent f7e118aec3
commit 91e30473ed
2 changed files with 100 additions and 34 deletions

View File

@ -20,24 +20,32 @@ proc load_conf_file
endp endp
proc set_kentel_conf proc set_kernel_conf
locals locals
par db 30 dup(?) par db 30 dup(?)
endl endl
pushad
;[gui] ;[gui]
;mouse_speed ;mouse_speed
mov eax,ebp mov eax,ebp
add eax,par-ebp add eax,par-ebp
invoke ini.get_str, ugui, ugui_mouse_speed, eax, ugui_mouse_speed_def push eax
stdcall strtoint,eax invoke ini.get_str, ugui, ugui_mouse_speed, eax, ugui_mouse_speed_def
pop eax
stdcall strtoint,eax
push eax push eax
pop edx pop edx
call _mouse_speed call _mouse_speed
popad
ret
;mouse_delay ;mouse_delay
mov eax,ebp mov eax,ebp
add eax,par-ebp add eax,par-ebp
push eax
invoke ini.get_str, ugui, ugui_mouse_delay, eax, ugui_mouse_delay_def invoke ini.get_str, ugui, ugui_mouse_delay, eax, ugui_mouse_delay_def
pop eax
stdcall strtoint,eax stdcall strtoint,eax
push eax push eax
pop edx pop edx
@ -47,7 +55,9 @@ endl
;sb16 ;sb16
mov eax,ebp mov eax,ebp
add eax,par-ebp add eax,par-ebp
push eax
invoke ini.get_str, udev, udev_sb16, eax, udev_sb16_def invoke ini.get_str, udev, udev_sb16, eax, udev_sb16_def
pop eax
stdcall strtoint,eax stdcall strtoint,eax
push eax push eax
pop ecx pop ecx
@ -56,7 +66,9 @@ endl
;sound_dma ;sound_dma
mov eax,ebp mov eax,ebp
add eax,par-ebp add eax,par-ebp
push eax
invoke ini.get_str, udev, udev_sound_dma, eax, udev_sound_dma_def invoke ini.get_str, udev, udev_sound_dma, eax, udev_sound_dma_def
pop eax
stdcall strtoint,eax stdcall strtoint,eax
push eax push eax
pop ecx pop ecx
@ -66,29 +78,34 @@ endl
;midibase ;midibase
mov eax,ebp mov eax,ebp
add eax,par-ebp add eax,par-ebp
push eax
invoke ini.get_str, udev, udev_midibase, eax, udev_midibase_def invoke ini.get_str, udev, udev_midibase, eax, udev_midibase_def
pop eax
stdcall strtoint,eax stdcall strtoint,eax
push eax push eax
pop ecx pop ecx
call _midibase call _midibase
popad
ret
endp endp
ugui db 'gui',0 ugui db 'gui',0
ugui_mouse_speed db 'mouse_speed',0 ugui_mouse_speed db 'mouse_speed',0
ugui_mouse_speed_def db '',0 ugui_mouse_speed_def db '2',0
ugui_mouse_delay db 'mouse_delay',0 ugui_mouse_delay db 'mouse_delay',0
ugui_mouse_delay_def db '',0 ugui_mouse_delay_def db '0x00A',0
udev db 'dev',0 udev db 'dev',0
udev_sb16 db 'sb16',0 udev_sb16 db 'sb16',0
udev_sb16_def db '',0 udev_sb16_def db '0x220',0
udev_sound_dma db 'sound_dma',0 udev_sound_dma db 'sound_dma',0
udev_sound_dma_def db '',0 udev_sound_dma_def db '1',0
udev_midibase db 'midibase',0 udev_midibase db 'midibase',0
udev_midibase_def db '',0 udev_midibase_def db '0x320',0
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax (¯® ¢â®à®¬ã ᨬ¢®«ã ®¯à¥¤¥«ï¥â á¨á⥬ã áç¨á«¥­¨ï) ; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax (¯® ¢â®à®¬ã ᨬ¢®«ã ®¯à¥¤¥«ï¥â á¨á⥬ã áç¨á«¥­¨ï)
proc strtoint stdcall,strs proc strtoint stdcall,strs
pushad pushad
@ -108,7 +125,7 @@ proc strtoint stdcall,strs
dec eax dec eax
stdcall strtoint_dec,eax stdcall strtoint_dec,eax
.exit: .exit:
mov [esi+28],eax mov [esp+28],eax
popad popad
ret ret
endp endp
@ -116,26 +133,52 @@ endp
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï ¤¥áïâ¨ç­®£® ; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï ¤¥áïâ¨ç­®£®
proc strtoint_dec stdcall,strs proc strtoint_dec stdcall,strs
pushad pushad
xor edx,edx
; ¯®¨áª ª®­æ 
mov esi,[strs]
@@:
lodsb
or al,al
jnz @b
mov ebx,esi
mov esi,[strs]
dec ebx
sub ebx,esi
mov ecx,1
@@:
dec ebx
or ebx,ebx
jz @f
imul ecx,ecx,10 ; ¯®à冷ª
jmp @b
@@:
xchg ebx,ecx
xor ecx,ecx xor ecx,ecx
mov ebx,1 ; ¯®à冷ª
mov esi,[strs]
@@: @@:
xor eax,eax xor eax,eax
lodsb lodsb
cmp al,0 cmp al,0
je .end je .eend
sub al,30h sub al,30h
imul ebx imul ebx
add ecx,eax add ecx,eax
imul ebx,ebx,10 push ecx
xchg eax,ebx
mov ecx,10
div ecx
xchg eax,ebx
pop ecx
jmp @b jmp @b
.end: .eend:
mov [esi+28],ecx mov [esp+28],ecx
popad popad
ret ret
endp endp
@ -143,45 +186,56 @@ endp
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï è¥á­ ¤æ â¨à¨ç­®£® ; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï è¥á­ ¤æ â¨à¨ç­®£®
proc strtoint_hex stdcall,strs proc strtoint_hex stdcall,strs
pushad pushad
xor edx,edx
mov esi,[strs]
mov ebx,1
add esi,1
@@:
lodsb
or al,al
jz @f
shl ebx,4
jmp @b
@@:
xor ecx,ecx xor ecx,ecx
mov ebx,1 ; ¯®à冷ª
mov esi,[strs] mov esi,[strs]
@@: @@:
xor eax,eax xor eax,eax
lodsb lodsb
cmp al,0 cmp al,0
je .end je .eend
cmp al,'a' cmp al,'a'
jae .bm jae .bm
cmp al,'A' cmp al,'A'
jae .bb jae .bb
jmp .cc jmp .cc
.bm: ; 57h .bm: ; 57h
sub al,57h sub al,57h
jmp .do jmp .do
.bb: ; 37h .bb: ; 37h
sub al,37h sub al,37h
jmp .do jmp .do
.cc: ; 30h .cc: ; 30h
sub al,30h sub al,30h
.do: .do:
imul ebx imul ebx
add ecx,eax add ecx,eax
imul ebx,ebx,16 shr ebx,4
jmp @b jmp @b
.end: .eend:
mov [esi+28],ecx mov [esp+28],ecx
popad popad
ret ret
endp endp
; ãáâ ­®¢ª¨ ¨§ setup ; ãáâ ­®¢ª¨ ¨§ setup

View File

@ -542,7 +542,7 @@ include 'vmodeld.inc'
; LOADING LIBRARES ; LOADING LIBRARES
stdcall dll.Load,@IMPORT ; SPraid - çàãðóçêà ôóíêöèîíàëà (ïîêà ÷òî èíè ôàéë) stdcall dll.Load,@IMPORT ; SPraid - çàãðóçêà ôóíêöèîíàëà (ïîêà ÷òî èíè ôàéë)
call load_conf_file ; prepare configuration file call load_conf_file ; prepare configuration file
;call set_kentel_conf ; configure devices and gui call set_kentel_conf ; configure devices and gui
no_lib_load: no_lib_load:
; LOAD FONTS I and II ; LOAD FONTS I and II
@ -3441,11 +3441,23 @@ checkmisc:
cmp [ctrl_alt_del], 1 cmp [ctrl_alt_del], 1
jne nocpustart jne nocpustart
mov ebp, cpustring
lea esi,[ebp+6]
xor ebx,ebx ; no parameters stdcall kernel_alloc, 0x100
xor edx,edx ; no flags push eax
call fs_RamdiskExecute.flags mov ebx,eax
stdcall full_file_name,cpustring,eax
mov ebp, eax
xor ebx, ebx
xor edx, edx
call fs_execute
pop ebx
push eax
stdcall kernel_free, ebx
pop eax
mov [ctrl_alt_del], 0 mov [ctrl_alt_del], 0
nocpustart: nocpustart: