Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 535 → Rev 537

/kernel/tags/kolibri0.7.0.0/core/conf_lib.inc
21,13 → 21,8
invoke ini.get_str,conf_fname, ugui, ugui_mouse_speed, eax,30, ugui_mouse_speed_def
pop eax
stdcall strtoint,eax
push eax
pop edx
call _mouse_speed
mov [mouse_speed_factor], ax
 
popad
ret
;mouse_delay
lea eax,[par]
push eax
34,9 → 29,7
invoke ini.get_str,conf_fname, ugui, ugui_mouse_delay, eax,30, ugui_mouse_delay_def
pop eax
stdcall strtoint,eax
push eax
pop edx
call _mouse_delay
mov [mouse_delay], eax
 
;[dev]
;sb16
45,9 → 38,12
invoke ini.get_str,conf_fname, udev, udev_sb16, eax,30, udev_sb16_def
pop eax
stdcall strtoint,eax
push eax
pop ecx
call _sb16
cmp eax, 0x100
jb @f
cmp eax, 0x10000
jae @f
mov [sb16], eax
@@:
;sound_dma
lea eax,[par]
55,11 → 51,11
invoke ini.get_str,conf_fname, udev, udev_sound_dma, eax,30, udev_sound_dma_def
pop eax
stdcall strtoint,eax
push eax
pop ecx
call _sound_dma
cmp eax, 3
ja @f
mov [sound_dma], eax
@@:
;midibase
lea eax,[par]
push eax
66,11 → 62,16
invoke ini.get_str,conf_fname, udev, udev_midibase, eax,30, udev_midibase_def
pop eax
stdcall strtoint,eax
push eax
pop ecx
call _midibase
cmp eax, 0x100
jb @f
cmp eax, 0x10000
jae @f
mov [midi_base], ax
mov [mididp], eax
inc eax
mov [midisp], eax
@@:
popad
ret
endp
102,7 → 103,11
invoke ini.get_int,conf_fname, unet, unet_active, 0
or eax,eax
jz .do_not_set_net
call _net_up
mov eax, [stack_config]
and eax, 0xFFFFFF80
add eax, 3
mov [stack_config], eax
call ash_eth_enable
;addr
lea eax,[par]
110,9 → 115,7
invoke ini.get_str,conf_fname, unet, unet_addr, eax,30, unet_def
pop eax
stdcall do_inet_adr,eax
push eax
pop ecx
call _net_addr
mov [stack_ip], eax
;mask
lea eax,[par]
120,9 → 123,7
invoke ini.get_str,conf_fname, unet, unet_mask, eax,30, unet_def
pop eax
stdcall do_inet_adr,eax
push eax
pop ecx
call _net_mask
mov [subnet_mask], eax
;gate
lea eax,[par]
130,9 → 131,7
invoke ini.get_str,conf_fname, unet, unet_gate, eax,30, unet_def
pop eax
stdcall do_inet_adr,eax
push eax
pop ecx
call _net_gate
mov [gateway_ip], eax
.do_not_set_net:
popad
ret
311,70 → 310,3
popad
ret
endp
 
 
;setup configurations
 
_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
_net_addr:
mov eax,52
mov ebx,3
int 0x40
ret
_net_mask:
mov eax,52
mov ebx,12
int 0x40
ret
 
_net_gate:
mov eax,52
mov ebx,11
int 0x40
ret
_net_up:
mov eax,52
mov ebx,0
int 0x40
and eax,0xFFFFFF80
add eax,3
mov ecx,eax
mov eax,52
mov ebx,2
int 0x40
ret
/kernel/tags/kolibri0.7.0.0/core/memory.inc
613,7 → 613,7
mov eax, [pdir]
and eax, 0xFFFFF000
 
stdcall map_page,[ipc_pdir],eax,dword PG_UW
stdcall map_page,[ipc_pdir],eax,PG_UW
mov ebx, [ofs]
shr ebx, 22
mov esi, [ipc_pdir]
620,9 → 620,8
mov edi, [ipc_ptab]
mov eax, [esi+ebx*4]
and eax, 0xFFFFF000
test eax, eax
jz .exit
stdcall map_page,edi,eax,dword PG_UW
stdcall map_page,edi,eax,PG_UW
; inc ebx
; add edi, 0x1000
; mov eax, [esi+ebx*4]
645,13 → 644,22
 
.map: mov eax, [esi+edx*4]
and eax, 0xFFFFF000
test eax, eax
jz .exit
stdcall map_page,edi,eax,dword PG_UW
stdcall map_page,edi,eax,PG_UW
dec ecx
jz .exit
add edi, 0x1000
inc edx
dec ecx
cmp edx, 0x400
jnz .map
inc ebx
mov eax, [ipc_pdir]
mov eax, [eax+ebx*4]
and eax, 0xFFFFF000
jz .exit
stdcall map_page,esi,eax,PG_UW
xor edx, edx
jmp .map
 
.exit:
ret
749,7 → 757,7
.touch: mov eax, [ebx]
add ebx, 0x1000
cmp ebx, ecx
jna .touch
jb .touch
 
popf
xor eax, eax
761,6 → 769,7
dst_slot dd ?
dst_offset dd ?
buf_size dd ?
used_buf dd ?
endl
 
pushf
785,11 → 794,21
mov esi, [eax+SLOT_BASE+0xa4]
mov [buf_size], esi
 
stdcall map_mem, [ipc_tmp], [SLOT_BASE+eax+0xB8],\
mov ecx, [ipc_tmp]
cmp esi, 0x40000-0x1000 ; size of [ipc_tmp] minus one page
jbe @f
push eax esi edi
add esi,0x1000
stdcall alloc_kernel_space,esi
mov ecx, eax
pop edi esi eax
@@:
mov [used_buf], ecx
stdcall map_mem, ecx, [SLOT_BASE+eax+0xB8],\
edi, esi
 
mov edi, [dst_offset]
add edi, [ipc_tmp]
add edi, [used_buf]
cmp dword [edi], 0
jnz .ipc_blocked ;if dword [buffer]<>0 - ipc blocked now
 
803,8 → 822,6
mov dword [edi+4], ebx
mov eax,[TASK_BASE]
mov eax, [eax+0x04] ;eax - our PID
mov edi, [dst_offset]
add edi, [ipc_tmp]
add edi, edx
mov [edi], eax
mov ecx, [msg_size]
845,9 → 862,8
 
mov dword [check_idle_semaphore],5
.ipc_no_cis:
popf
xor eax, eax
ret
push 0
jmp .ret
.no_pid:
popf
mov eax, 4
858,12 → 874,18
inc eax
ret
.ipc_blocked:
popf
mov eax, 2
ret
push 2
jmp .ret
.buffer_overflow:
push 3
.ret:
mov eax, [used_buf]
cmp eax, [ipc_tmp]
jz @f
stdcall free_kernel_space,eax
@@:
pop eax
popf
mov eax, 3
ret
endp