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
|
2021-01-02 03:07:40 +01:00
|
|
|
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
|
2021-01-02 03:07:40 +01:00
|
|
|
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
|
2020-12-16 00:29:35 +01:00
|
|
|
jmp logdrv
|