Kernel updated to 0.7.0.0

git-svn-id: svn://kolibrios.org@536 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Evgeny Grechnikov (Diamond) 2007-06-07 13:34:43 +00:00
parent 5154195769
commit dea47105d0
5 changed files with 130 additions and 153 deletions

View File

@ -20,13 +20,8 @@ endl
push eax
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
popad
ret
stdcall strtoint,eax
mov [mouse_speed_factor], ax
;mouse_delay
lea eax,[par]
@ -34,9 +29,7 @@ endl
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 @@ endl
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,10 +51,10 @@ endl
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]
@ -66,10 +62,15 @@ endl
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
@ -102,7 +103,11 @@ endl
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 @@ endl
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 @@ endl
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 @@ endl
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 @@ proc do_inet_adr stdcall,strs
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

View File

@ -613,16 +613,15 @@ proc map_mem stdcall, lin_addr:dword,pdir:dword,\
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]
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 @@ proc map_mem stdcall, lin_addr:dword,pdir:dword,\
.map: mov eax, [esi+edx*4]
and eax, 0xFFFFF000
test eax, eax
jz .exit
stdcall map_page,edi,eax,dword PG_UW
jz .exit
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 @@ proc set_ipc_buff
.touch: mov eax, [ebx]
add ebx, 0x1000
cmp ebx, ecx
jna .touch
jb .touch
popf
xor eax, eax
@ -761,6 +769,7 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
dst_slot dd ?
dst_offset dd ?
buf_size dd ?
used_buf dd ?
endl
pushf
@ -785,11 +794,21 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
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 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
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,12 +862,11 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
mov dword [check_idle_semaphore],5
.ipc_no_cis:
popf
xor eax, eax
ret
push 0
jmp .ret
.no_pid:
popf
mov eax, 4
mov eax, 4
ret
.no_ipc_area:
popf
@ -858,12 +874,18 @@ proc sys_ipc_send stdcall, PID:dword, msg_addr:dword, msg_size:dword
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

View File

@ -382,13 +382,13 @@ cd_get_parameters_of_file:
cd_get_parameters_of_file_1:
; ïîëó÷àåì àòðèáóòû ôàéëà
xor eax,eax
; ôàéë íå àðõèâèðîâàëñ
inc al
; ôàéë íå àðõèâèðîâàëñÿ
inc eax
shl eax,1
; ýòî êàòàëîã?
test [ebp-8],byte 2
jz .file
inc al
inc eax
.file:
; ìåòêà òîìà íå êàê â FAT, â ýòîì âèäå îòñóòñâóåò
; ôàéë íå ÿâëÿåòñÿ ñèñòåìíûì
@ -396,11 +396,11 @@ cd_get_parameters_of_file_1:
; ôàéë ÿâëÿåòñÿ ñêðûòûì? (àòðèáóò ñóùåñòâîâàíèå)
test [ebp-8],byte 1
jz .hidden
inc al
inc eax
.hidden:
shl eax,1
; ôàéë âñåãäà òîëüêî äëÿ ÷òåíèÿ, òàê êàê ýòî CD
inc al
inc eax
mov [edi],eax
; ïîëó÷àåì âðåìÿ äëÿ ôàéëà
;÷àñ
@ -462,27 +462,31 @@ fs_CdGetFileInfo:
mov eax, 2
ret
@@:
push edi ebp
push edi
call cd_find_lfn
pushfd
cmp [DevErrorCode], 0
jz @f
popfd
pop ebp edi
pop edi
mov eax, 11
ret
@@:
popfd
jnc @f
pop ebp edi
pop edi
mov eax, ERROR_FILE_NOT_FOUND
ret
@@:
mov edi, edx
push ebp
mov ebp, [cd_current_pointer_of_input]
add ebp, 33
call cd_get_parameters_of_file_1
pop ebp
and dword [edi+4], 0
pop ebp edi
pop edi
xor eax, eax
ret
@ -612,18 +616,16 @@ cd_compare_name:
.loop:
cld
lodsb
push ax
push eax
call char_todown
call ansi2uni_char
xchg ah,al
cld
scasw
pop ax
pop eax
je .coincides
call char_toupper
call ansi2uni_char
xchg ah,al
cld
sub edi,2
scasw
jne .name_not_coincide

View File

@ -107,7 +107,7 @@ use16
org 0x0
jmp start_of_code
version db 'Kolibri OS version 0.6.5.0 ',13,10,13,10,0
version db 'Kolibri OS version 0.7.0.0 ',13,10,13,10,0
include "boot/bootstr.inc" ; language-independent boot messages
include "boot/preboot.inc"
@ -2285,7 +2285,7 @@ endg
iglobal
version_inf:
db 0,6,5,0 ; version 0.6.5.0
db 0,7,0,0 ; version 0.7.0.0
db UID_KOLIBRI
db 'Kolibri',0
version_end:

View File

@ -911,6 +911,10 @@ vesa20_drawbackground_stretch:
; dword [esp+4] = y * BgrDataHeight / ScreenHeight
push eax
mov ecx, [BgrDataWidth]
lea edx, [ecx*3]
imul edx, [BgrDataHeight]
add edx, [img_background]
push edx
mul ecx
imul esi, ecx
dec ecx
@ -932,16 +936,18 @@ vesa20_drawbackground_stretch:
; dword [esp] = saved esi
; dword [esp+4] = saved edx
; dword [esp+8] = saved ecx
; dword [esp+12] = limit for overlapping of points
; dword [esp+16] = x
; dword [esp+20] = (y * BgrDataHeight) mod ScreenHeight (used to fast recalculating of esi)
; dword [esp+24] = y
; dword [esp+12] = BgrDataWidth-1, x-limit for overlapping of points
; dword [esp+16] = end of bgr memory (defines y-limit for overlapping of points)
; dword [esp+20] = x
; dword [esp+24] = (y * BgrDataHeight) mod ScreenHeight (used to fast recalculating of esi)
; dword [esp+28] = y
; precalculated constants:
; dword [esp+28] = BgrDataHeight mod ScreenHeight
; dword [esp+32] = BgrDataHeight div ScreenHeight
; dword [esp+36] = BgrDataWidth mod ScreenWidth
; dword [esp+40] = BgrDataWidth div ScreenWidth
; dword [esp+32] = BgrDataHeight mod ScreenHeight
; dword [esp+36] = BgrDataHeight div ScreenHeight
; dword [esp+40] = BgrDataWidth mod ScreenWidth
; dword [esp+44] = BgrDataWidth div ScreenWidth
sdp3:
add edx, [esp+40]
cmp [ebp+WinMapAddress], byte 1
jnz snbgp
mov al, [esi+2]
@ -949,9 +955,24 @@ sdp3:
mov ax, [esi]
cmp ecx, [esp+12]
jae @f
cmp edx, [ScreenWidth]
jb @f
mov ebx, [esi+2]
shr ebx, 8
call overlapping_of_points
@@:
mov ebx, [esp+24]
add ebx, [esp+32]
cmp ebx, [ScreenHeight]
jbe @f
mov ebx, [BgrDataWidth]
lea ebx, [ebx*3]
add ebx, esi
cmp ebx, [esp+16]
jae @f
mov ebx, [ebx-1]
shr ebx, 8
call overlapping_of_points
@@:
mov [edi], ax
shr eax, 16
@ -960,16 +981,16 @@ snbgp:
cmp [ScreenBPP], byte 25
sbb edi, -4
add ebp, 1
mov eax, [esp+16]
mov eax, [esp+20]
add eax, 1
mov [esp+16], eax
mov [esp+20], eax
cmp eax, [draw_data+32+RECT.right]
ja sdp4
mov eax, [esp+40]
mov eax, [esp+44]
add ecx, eax
lea eax, [eax*3]
add esi, eax
add edx, [esp+36]
; add edx, [esp+40]
cmp edx, [ScreenWidth]
jbe sdp3
sub edx, [ScreenWidth]
@ -979,9 +1000,9 @@ snbgp:
jmp sdp3
sdp4:
; next y
mov ebx, [esp+24]
mov ebx, [esp+28]
add ebx, 1
mov [esp+24], ebx
mov [esp+28], ebx
cmp ebx, [draw_data+32+RECT.bottom]
ja sdpdone
; advance edi, ebp to next scan line
@ -1001,25 +1022,25 @@ sdp4:
pop esi edx ecx
push ecx edx
xor ebx, ebx
mov eax, [esp+20-4]
add eax, [esp+28-4]
mov eax, [esp+24-4]
add eax, [esp+32-4]
cmp eax, [ScreenHeight]
jbe @f
sub eax, [ScreenHeight]
mov ebx, 1
sub eax, ebx
@@:
mov [esp+20-4], eax
add ebx, [esp+32-4]
mov [esp+24-4], eax
add ebx, [esp+36-4]
lea ebx, [ebx*3]
imul ebx, [BgrDataWidth]
add esi, ebx
push esi
mov eax, [draw_data+32+RECT.left]
mov [esp+16], eax
mov [esp+20], eax
jmp sdp3
sdpdone:
add esp, 44
add esp, 48
popad
mov [EGA_counter],1
call VGA_drawbackground