Protypical implementation of DPT copying

This commit is contained in:
Nero 2020-10-24 22:50:23 +00:00
parent 33f4fe37a8
commit dc6035fe9d
4 changed files with 80 additions and 21 deletions

View file

@ -8,24 +8,37 @@ dskseek: resd 1
; disk buffer for I/O operations
dskbuf: resb 512
dpt: resb DPTSIZE
section .text
ret: ret
; Convert drive number into DL for int 13h
; IN dl dos drive number
; OUT dl bios drive number
getdl: cmp dl, 2
jc ret
mov dl, 0x80
ret
; select drive
; IN dl drive number
dsksel: cmp dl, 1
jnc ret
mov al, dl
and al, 0x02
ror dl, 1
ror dl, 1
cmp dl, byte [dsknum]
dsksel: cmp dl, byte [dsknum]
je ret
call dskrst
int 3
call getdl
mov ah, 8
les di, [0x1E*4]
int 0x13
; copy dpt
mov bx, di
mov dx, dpt
mov cx, DPTSIZE
call lod
ret