Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 1376 → Rev 2212

/kernel/branches/net/blkdev/cd_drv.inc
239,10 → 239,10
in AL,DX
test AL,80h ;ñîñòîÿíèå ñèãíàëà BSY
jnz @@WaitDevice0
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR
jnz @@Err6
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ
jz @@WaitDevice0
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR
jnz @@Err6
; Ïîñëàòü ïàêåòíóþ êîìàíäó
cli
mov DX,[ATABasePortAddr]
282,10 → 282,10
in AL,DX
test AL,80h ;ñîñòîÿíèå ñèãíàëà BSY
jnz @@WaitDevice1
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR
jnz @@Err6_temp
test AL,08h ;ñîñòîÿíèå ñèãíàëà DRQ
jz @@WaitDevice1
test AL,1 ;ñîñòîÿíèå ñèãíàëà ERR
jnz @@Err6_temp
; Ïðèíÿòü áëîê äàííûõ îò êîíòðîëëåðà
mov EDI,[CDDataBuf_pointer] ;0x7000 ;CDDataBuf
; Çàãðóçèòü àäðåñ ðåãèñòðà äàííûõ êîíòðîëëåðà
/kernel/branches/net/blkdev/hd_drv.inc
49,6 → 49,12
; Read through BIOS?
cmp [hdpos], 0x80
jae .bios
; hd_read_{dma,pio} use old ATA with 28 bit for sector number
cmp eax, 0x10000000
jb @f
inc [hd_error]
jmp return_01
@@:
; DMA read is permitted if [allow_dma_access]=1 or 2
cmp [allow_dma_access], 2
ja .nodma
235,6 → 241,8
 
align 4
cache_write_pio:
cmp dword[esi],0x10000000
jae .bad
; call disable_ide_int
 
call wait_for_hd_idle
295,6 → 303,9
pop esi ecx
 
ret
.bad:
inc [hd_error]
ret
 
save_hd_wait_timeout:
 
686,6 → 697,9
write_cache_chain:
cmp [hdpos], 0x80
jae bd_write_cache_chain
mov eax,[cache_chain_ptr]
cmp dword[eax],0x10000000
jae .bad
push esi
mov eax, IDE_descriptor_table
mov edx,eax
779,6 → 793,9
jnz hd_write_error_dma
pop esi
ret
.bad:
inc [hd_error]
ret
 
uglobal
IDEContrRegsBaseAddr dw ?
882,11 → 899,11
; Because this code uses fixed addresses,
; it can not be run simultaniously by many threads.
; 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], 9A000000h ; buffer 9A00:0000
mov dword [BOOT_VAR + 518h], eax
and dword [BOOT_VAR + 51Ch], 0
mov word [OS_BASE + 510h], 10h ; packet length
mov word [OS_BASE + 512h], cx ; number of sectors
mov dword [OS_BASE + 514h], 9A000000h ; buffer 9A00:0000
mov dword [OS_BASE + 518h], eax
and dword [OS_BASE + 51Ch], 0
push ebx ecx esi edi
mov ebx, int13_regs_in
mov edi, ebx
916,10 → 933,12
mov [ebx+v86_regs.eflags], 20200h
mov esi, [sys_v86_machine]
mov ecx, 0x502
push fs
call v86_start
pop fs
and [bios_hdpos], 0
pop edi esi ecx ebx
movzx edx, byte [BOOT_VAR + 512h]
movzx edx, byte [OS_BASE + 512h]
test byte [int13_regs_out+v86_regs.eflags], 1
jnz @f
mov edx, ecx
/kernel/branches/net/blkdev/rd.inc
411,6 → 411,8
jb .ret
cmp al, 'z'
jbe .az
cmp al, 'ñ'
jz .yo1
cmp al, ' '
jb .ret
cmp al, 'à'
426,6 → 428,10
.az:
and al, not 0x20
ret
.yo1:
; 0xF1 -> 0xF0
dec ax
ret
 
fat_get_name:
; in: edi->FAT entry
/kernel/branches/net/blkdev/rdsave.inc
21,12 → 21,10
endg
sysfn_saveramdisk: ; 18.6 = SAVE FLOPPY IMAGE (HD version only)
call restorefatchain
mov eax, saverd_fileinfo
mov ebx, saverd_fileinfo
mov [saverd_fileinfo.name], ecx
pushad
push eax
call file_system_lfn
pop eax
call file_system_lfn ;in ebx
popad
mov [esp+32], eax
ret