@Panel: do not kill self and icon

Kernel: stage one of use dev config

git-svn-id: svn://kolibrios.org@494 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
SPraid (simba) 2007-05-15 12:03:26 +00:00
parent ed1742523e
commit ba74e7f00f
4 changed files with 241 additions and 5 deletions

View File

@ -18,3 +18,203 @@ proc load_conf_file
ret ret
.fname db '%sys%/sys.conf',0 .fname db '%sys%/sys.conf',0
endp endp
proc set_kentel_conf
locals
par db 30 dup(?)
endl
;[gui]
;mouse_speed
mov eax,ebp
add eax,par-ebp
invoke ini.get_str, ugui, ugui_mouse_speed, eax, ugui_mouse_speed_def
stdcall strtoint,eax
push eax
pop edx
call _mouse_speed
;mouse_delay
mov eax,ebp
add eax,par-ebp
invoke ini.get_str, ugui, ugui_mouse_delay, eax, ugui_mouse_delay_def
stdcall strtoint,eax
push eax
pop edx
call _mouse_delay
;[dev]
;sb16
mov eax,ebp
add eax,par-ebp
invoke ini.get_str, udev, udev_sb16, eax, udev_sb16_def
stdcall strtoint,eax
push eax
pop ecx
call _sb16
;sound_dma
mov eax,ebp
add eax,par-ebp
invoke ini.get_str, udev, udev_sound_dma, eax, udev_sound_dma_def
stdcall strtoint,eax
push eax
pop ecx
call _sound_dma
;midibase
mov eax,ebp
add eax,par-ebp
invoke ini.get_str, udev, udev_midibase, eax, udev_midibase_def
stdcall strtoint,eax
push eax
pop ecx
call _midibase
endp
ugui db 'gui',0
ugui_mouse_speed db 'mouse_speed',0
ugui_mouse_speed_def db '',0
ugui_mouse_delay db 'mouse_delay',0
ugui_mouse_delay_def db '',0
udev db 'dev',0
udev_sb16 db 'sb16',0
udev_sb16_def db '',0
udev_sound_dma db 'sound_dma',0
udev_sound_dma_def db '',0
udev_midibase db 'midibase',0
udev_midibase_def db '',0
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax (¯® ¢â®à®¬ã ᨬ¢®«ã ®¯à¥¤¥«ï¥â á¨á⥬ã áç¨á«¥­¨ï)
proc strtoint stdcall,strs
pushad
mov eax,[strs]
inc eax
mov bl,[eax]
cmp bl,'x'
je .hex
cmp bl,'X'
je .hex
jmp .dec
.hex:
inc eax
stdcall strtoint_hex,eax
jmp .exit
.dec:
dec eax
stdcall strtoint_dec,eax
.exit:
mov [esi+28],eax
popad
ret
endp
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï ¤¥áïâ¨ç­®£®
proc strtoint_dec stdcall,strs
pushad
xor ecx,ecx
mov ebx,1 ; ¯®à冷ª
mov esi,[strs]
@@:
xor eax,eax
lodsb
cmp al,0
je .end
sub al,30h
imul ebx
add ecx,eax
imul ebx,ebx,10
jmp @b
.end:
mov [esi+28],ecx
popad
ret
endp
; ª®­¢¥à祭¨¥ áâப¨ ¢ DWord ¢ eax ¤«ï è¥á­ ¤æ â¨à¨ç­®£®
proc strtoint_hex stdcall,strs
pushad
xor ecx,ecx
mov ebx,1 ; ¯®à冷ª
mov esi,[strs]
@@:
xor eax,eax
lodsb
cmp al,0
je .end
cmp al,'a'
jae .bm
cmp al,'A'
jae .bb
jmp .cc
.bm: ; 57h
sub al,57h
jmp .do
.bb: ; 37h
sub al,37h
jmp .do
.cc: ; 30h
sub al,30h
.do:
imul ebx
add ecx,eax
imul ebx,ebx,16
jmp @b
.end:
mov [esi+28],ecx
popad
ret
endp
; ãáâ ­®¢ª¨ ¨§ setup
_mouse_speed:
mov eax,18
mov ebx,19
mov ecx,1
int 0x40
ret
_mouse_delay:
mov eax,18
mov ebx,19
mov ecx,3
int 0x40
ret
_sb16:
mov eax,21
mov ebx,4
int 0x40
ret
_sound_dma:
mov eax,21
mov ebx,10
int 0x40
ret
_midibase:
mov eax,21
mov ebx,1
int 0x40
ret

View File

@ -542,6 +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
no_lib_load: no_lib_load:
; LOAD FONTS I and II ; LOAD FONTS I and II

View File

@ -1,2 +1,14 @@
[path] [path]
/rd/1=%sys% /rd/1=%sys%
%sys%/dll=%sys%/lib
[gui]
mouse_speed=2
mouse_delay=0x00A
[dev]
sb16=0x220
sound_dma=1
midibase=0x320
[end]

View File

@ -93,10 +93,33 @@ begin_1:
kill_active_application: kill_active_application:
mcall 18, 7 mcall 18, 7
mov ecx,eax mov ecx,eax
; mcall 9, area9
; mov eax,area9 ;//{SPraid.simba do not kill panel and icon
; mov ecx,[eax+4] push eax
mov eax,9
mov ebx, process_info_buffer
int 0x40
mov eax,process_info_buffer
add eax,10
mov ebx,[eax]
cmp ebx,'ICON'
je no_kill
cmp ebx,'@PAN'
jne kill_app
add eax,4
mov ebx,[eax]
and ebx,0x0000FFFF
cmp ebx,'EL'
je no_kill
kill_app:
pop ecx
mcall 18, 2 mcall 18, 2
jmp if_kill
no_kill:
pop eax
if_kill:
;// }SPraid.simba
jmp begin_1.ret jmp begin_1.ret
start_menu_application: start_menu_application:
@ -2079,11 +2102,11 @@ screen_size:
.height dw ? .height dw ?
.width dw ? .width dw ?
area9 rb 100
system_colours rd 10 system_colours rd 10
app_list rd 50 app_list rd 50
alt_tab_list rd 256*2 alt_tab_list rd 256*2
alt_tab_list_size dd ? alt_tab_list_size dd ?
process_info_buffer rb 1024
tictable: tictable:
rd 256 rd 256
image: image: