12,59 → 12,59 |
|
$Revision$ |
|
|
iglobal |
conf_path_sect: db 'path',0 |
|
conf_fname db '/sys/sys.conf',0 |
|
endg |
; set soke kernel configuration |
proc set_kernel_conf |
locals |
par db 30 dup(?) |
endl |
locals |
par db 30 dup(?) |
endl |
|
pushad |
pushad |
;[gui] |
;mouse_speed |
|
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, ugui, ugui_mouse_speed,\ |
eax,30, ugui_mouse_speed_def |
pop eax |
stdcall strtoint,eax |
mov [mouse_speed_factor], ax |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, ugui, ugui_mouse_speed,\ |
eax,30, ugui_mouse_speed_def |
pop eax |
stdcall strtoint,eax |
mov [mouse_speed_factor], ax |
|
;mouse_delay |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, ugui, ugui_mouse_delay,\ |
eax,30, ugui_mouse_delay_def |
pop eax |
stdcall strtoint,eax |
mov [mouse_delay], eax |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, ugui, ugui_mouse_delay,\ |
eax,30, ugui_mouse_delay_def |
pop eax |
stdcall strtoint,eax |
mov [mouse_delay], eax |
|
|
;midibase |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, udev, udev_midibase, eax,30, udev_midibase_def |
pop eax |
stdcall strtoint,eax |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, udev, udev_midibase, eax,30, udev_midibase_def |
pop eax |
stdcall strtoint,eax |
|
cmp eax, 0x100 |
jb @f |
cmp eax, 0x10000 |
jae @f |
mov [midi_base], ax |
mov [mididp], eax |
inc eax |
mov [midisp], eax |
cmp eax, 0x100 |
jb @f |
cmp eax, 0x10000 |
jae @f |
mov [midi_base], ax |
mov [mididp], eax |
inc eax |
mov [midisp], eax |
@@: |
popad |
ret |
popad |
ret |
endp |
|
iglobal |
ugui db 'gui',0 |
ugui_mouse_speed db 'mouse_speed',0 |
ugui_mouse_speed_def db '2',0 |
74,8 → 74,63 |
udev db 'dev',0 |
udev_midibase db 'midibase',0 |
udev_midibase_def db '0x320',0 |
endg |
;set up netvork configuration |
proc set_network_conf |
locals |
par db 30 dup(?) |
endl |
pushad |
|
;[net] |
;active |
lea eax,[par] |
invoke ini.get_int,conf_fname, unet, unet_active, 0 |
or eax,eax |
jz .do_not_set_net |
mov eax, [stack_config] |
and eax, 0xFFFFFF80 |
add eax, 3 |
mov [stack_config], eax |
call ash_eth_enable |
|
;addr |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, unet, unet_addr, eax,30, unet_def |
pop eax |
stdcall do_inet_adr,eax |
mov [stack_ip], eax |
|
;mask |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, unet, unet_mask, eax,30, unet_def |
pop eax |
stdcall do_inet_adr,eax |
mov [subnet_mask], eax |
|
;gate |
lea eax,[par] |
push eax |
invoke ini.get_str,conf_fname, unet, unet_gate, eax,30, unet_def |
pop eax |
stdcall do_inet_adr,eax |
mov [gateway_ip], eax |
.do_not_set_net: |
popad |
ret |
|
|
endp |
iglobal |
unet db 'net',0 |
unet_active db 'active',0 |
unet_addr db 'addr',0 |
unet_mask db 'mask',0 |
unet_gate db 'gate',0 |
unet_def db 0 |
endg |
; convert string to DWord |
proc strtoint stdcall,strs |
pushad |
184,15 → 239,15 |
cmp al,'A' |
jae .bb |
jmp .cc |
.bm: ; 57h |
.bm: ; 57h |
sub al,57h |
jmp .do |
|
.bb: ; 37h |
.bb: ; 37h |
sub al,37h |
jmp .do |
|
.cc: ; 30h |
.cc: ; 30h |
sub al,30h |
|
.do: |
Property changes: |
Added: svn:mergeinfo |