rdos/kernel/bpb.asm
2019-09-29 21:33:28 +00:00

32 lines
355 B
NASM

; IN DL drive number
; BP ptr to bpb_size'd buffer
bpb_load:
push ax
push dx
mov [bp+(bpb_size-1)], dl
; load first sector
xor dx, dx
xor ax, ax
call drive_read
push cx
push si
push di
; copy BPB to BP
mov si, (diskbuf+0x0B)
mov di, bp
mov cx, (bpb_size-1)
rep movsb
pop di
pop si
pop cx
pop dx
pop ax
ret