rdos/kernel/fcb.asm

21 lines
457 B
NASM

section .bss
; default drive if field in FCB = 0
defdrv: resb 1
section .text
; Functions here generally expect the FCB to be at ES:BX
; Helper function: read the drive number from FCB,
; apply default if necessary,
; and make it current I/O drive
setdrv: mov dl, [es:bx] ; A=1
test dl, dl
jnz .nofix
mov dl, [defdrv] ; A=0
inc dl
mov [es:bx], dl ; A=1
; now set as current i/o drive
.nofix: dec dl ; A=0 for dsksel
jmp logdrv