rdos/kernel/fcb.asm

21 lines
457 B
NASM
Raw Normal View History

2020-10-13 22:10:23 +02:00
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
2020-10-13 22:10:23 +02:00
test dl, dl
jnz .nofix
mov dl, [defdrv] ; A=0
inc dl
mov [es:bx], dl ; A=1
2020-10-13 22:10:23 +02:00
; now set as current i/o drive
.nofix: dec dl ; A=0 for dsksel
jmp logdrv