Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 819 → Rev 820

/kernel/trunk/blkdev/hd_drv.inc
806,7 → 806,7
ja .notread
sub eax, [bios_cur_sector]
shl eax, 9
add eax, (OS_BASE+0x9C000)
add eax, (OS_BASE+0x9A000)
push ecx esi edi
mov esi, eax
shl edi, 9
851,7 → 851,7
shl esi, 9
call calculate_cache_2
add esi, eax
mov edi, OS_BASE + 0x9C000
mov edi, OS_BASE + 0x9A000
movzx ecx, [cache_chain_size]
push ecx
shl ecx, 9-2
884,7 → 884,7
; In current implementation it is protected by common mutex 'hd1_status'
mov word [BOOT_VAR + 510h], 10h ; packet length
mov word [BOOT_VAR + 512h], cx ; number of sectors
mov dword [BOOT_VAR + 514h], 9C000000h ; buffer 9C00:0000
mov dword [BOOT_VAR + 514h], 9A000000h ; buffer 9A00:0000
mov dword [BOOT_VAR + 518h], eax
and dword [BOOT_VAR + 51Ch], 0
push ebx ecx esi edi
911,7 → 911,7
@@:
mov word [ebx+v86_regs.esi], 510h
mov word [ebx+v86_regs.ss], 9000h
mov word [ebx+v86_regs.esp], 0C000h
mov word [ebx+v86_regs.esp], 0A000h
mov word [ebx+v86_regs.eip], 500h
mov [ebx+v86_regs.eflags], 20200h
mov esi, [sys_v86_machine]
/kernel/trunk/core/v86.inc
89,7 → 89,7
 
pop esi
; now V86 specific: initialize known addresses in first Mb
pop eax edi
pop eax
; first page - BIOS data (shared between all machines!)
; physical address = 0x2f0000
; linear address = BOOT_VAR = OS_BASE + 0x2f0000
96,12 → 96,22
mov dword [eax], (BOOT_VAR - OS_BASE) or 111b
mov dword [eax+800h], BOOT_VAR
; page before 0xA0000 - Extended BIOS Data Area (shared between all machines!)
; physical address = 0x9F000
; linear address = 0x8009F000
mov dword [eax+0x9E*4], 0x9E000 or 111b
mov dword [eax+0x9E*4+800h], 0x9E000 + OS_BASE
mov dword [eax+0x9F*4], 0x9F000 or 111b
mov dword [eax+0x9F*4+800h], 0x9F000 + OS_BASE
; physical address = 0x9C000
; linear address = 0x8009C000
; (I have seen one computer with EBDA segment = 0x9D80,
; all other computers use less memory)
mov ecx, 4
mov edx, 0x9C000
push eax
lea edi, [eax+0x9C*4]
@@:
lea eax, [edx + OS_BASE]
mov [edi+800h], eax
lea eax, [edx + 111b]
stosd
loop @b
pop eax
pop edi
; addresses 0xC0000 - 0xFFFFF - BIOS code (shared between all machines!)
; physical address = 0xC0000
; linear address = 0x800C0000
216,12 → 226,13
mov byte [BOOT_VAR + 0x505], 0xF4
mov esi, eax
mov ebx, [eax+V86_machine.pagedir]
; one page for stack, two pages for results (0x2000 bytes = 16 sectors)
mov dword [ebx+0x99*4+0x1000], 0x99000 or 111b
mov dword [ebx+0x99*4+0x1800], OS_BASE + 0x99000
mov dword [ebx+0x9A*4+0x1000], 0x9A000 or 111b
mov dword [ebx+0x9A*4+0x1800], OS_BASE + 0x9A000
mov dword [ebx+0x9B*4+0x1000], 0x9B000 or 111b
mov dword [ebx+0x9B*4+0x1800], OS_BASE + 0x9B000
mov dword [ebx+0x9C*4+0x1000], 0x9C000 or 111b
mov dword [ebx+0x9C*4+0x1800], OS_BASE + 0x9C000
mov dword [ebx+0x9D*4+0x1000], 0x9D000 or 111b
mov dword [ebx+0x9D*4+0x1800], OS_BASE + 0x9D000
if ~DEBUG_SHOW_IO
; allow access to all ports
mov ecx, [esi+V86_machine.iopm]
/kernel/trunk/fs/ntfs.inc
793,14 → 793,17
add esp, 10h
mov eax, [ntfs_cur_tail]
test eax, eax
jz .okret
jz @f
sub eax, 0x200
add [ntfs_cur_read], eax
jmp .okret
@@:
clc
ret
.errread2:
pop ecx
add esp, 10h
jmp .errret
stc
ret
.break:
add esp, 10h ; CF=0
mov [ntfs_bCanContinue], 1
1032,6 → 1035,8
push eax
mov al, [edi]
inc edi
cmp al, '/'
jz .slash
call char_toupper
cmp al, [esp]
pop eax
1044,6 → 1049,10
movzx eax, word [esi+8]
add esi, eax
jmp .scanloopint
.slash:
pop eax
pop edi
pop esi
.subnode:
test byte [esi+0Ch], 1
jz .notfound