Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 5569 → Rev 5363

/kernel/trunk/blkdev/bd_drv.inc
7,7 → 7,8
 
$Revision$
 
; Disk access through BIOS
 
; Access through BIOS by diamond
iglobal
align 4
bd_callbacks:
22,16 → 23,6
.end:
endg
 
uglobal
bios_hdpos dd 0
bios_cur_sector dd ?
bios_read_len dd ?
cache_chain_ptr dd ?
int13_regs_in rb sizeof.v86_regs
int13_regs_out rb sizeof.v86_regs
cache_chain_size db ?
endg
;-----------------------------------------------------------------
proc bd_read_interface stdcall uses edi, \
userdata, buffer, startsector:qword, numsectors
; userdata = old [hdpos] = 80h + index in NumBiosDisks
85,7 → 76,7
xor eax, eax
ret
endp
;-----------------------------------------------------------------
 
proc bd_write_interface stdcall uses esi edi, \
userdata, buffer, startsector:qword, numsectors
; userdata = old [hdpos] = 80h + index in NumBiosDisks
151,7 → 142,7
xor eax, eax
ret
endp
;-----------------------------------------------------------------
 
; This is a stub.
proc bd_querymedia stdcall, hd_data, mediainfo
mov eax, [mediainfo]
162,7 → 153,16
xor eax, eax
ret
endp
;-----------------------------------------------------------------
 
;-----------------------------------------------------------------------------
; \begin{diamond}
uglobal
bios_hdpos dd 0 ; 0 is invalid value for [hdpos]
bios_cur_sector dd ?
bios_read_len dd ?
endg
;-----------------------------------------------------------------------------
align 4
bd_read:
push eax
push edx
209,7 → 209,8
.v86err:
mov [hd_error], 1
jmp hd_read_error
;-----------------------------------------------------------------
;-----------------------------------------------------------------------------
align 4
bd_write_cache_chain:
pusha
mov edi, OS_BASE + 0x9A000
233,7 → 234,13
popa
mov [hd_error], 1
jmp hd_write_error
;-----------------------------------------------------------------
;-----------------------------------------------------------------------------
uglobal
int13_regs_in rb sizeof.v86_regs
int13_regs_out rb sizeof.v86_regs
endg
;-----------------------------------------------------------------------------
align 4
int13_call:
; Because this code uses fixed addresses,
; it can not be run simultaniously by many threads.
283,3 → 290,4
mov edx, ecx
@@:
ret
; \end{diamond}