WIP on fcb io
This commit is contained in:
parent
a65f54b121
commit
66f54f639c
4 changed files with 21 additions and 41 deletions
|
@ -46,8 +46,18 @@ drive_read:
|
|||
dec dl
|
||||
mov ax, 0x0201
|
||||
mov bx, diskbuf
|
||||
; try read
|
||||
int 0x13
|
||||
.giveup:
|
||||
jnc .end
|
||||
; reset disk
|
||||
mov ah, 0x00
|
||||
int 0x13
|
||||
; loop with si
|
||||
dec si
|
||||
test si, si
|
||||
jnz .try
|
||||
stc
|
||||
.end:
|
||||
pop si
|
||||
pop bx
|
||||
pop dx
|
||||
|
@ -57,27 +67,3 @@ drive_read:
|
|||
.fast: ; fast lane for boot sector
|
||||
inc cl
|
||||
jmp .try
|
||||
.fail:
|
||||
; reset disk
|
||||
mov ah, 0x00
|
||||
int 0x13
|
||||
; loop with si
|
||||
dec si
|
||||
test si, si
|
||||
jnz .try
|
||||
stc
|
||||
jmp .giveup
|
||||
|
||||
; Seek to fcb_off given in a ptr
|
||||
; IN BX ptr to FCB
|
||||
drive_seek:
|
||||
push ax
|
||||
push cx
|
||||
mov cl, [bx+fcb_ss]
|
||||
add cl, 7
|
||||
mov ax, 1
|
||||
sal ax, cl
|
||||
int3
|
||||
pop cx
|
||||
pop ax
|
||||
ret
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue