;
; ===========================================================================
; === Device drivers                                                      ===
; ===========================================================================
;

include \nxdos\src\kernel\drivers\null.asm
include \nxdos\src\kernel\drivers\clock.asm
include \nxdos\src\kernel\drivers\console.asm
include \nxdos\src\kernel\drivers\aux$.asm
include \nxdos\src\kernel\drivers\fossil.asm
include \nxdos\src\kernel\drivers\lpt.asm

IF (NETWORK)
        include \nxdos\src\kernel\drivers\network.asm
ENDIF
IF (USB)
        include \nxdos\src\kernel\drivers\usb4dos.asm
ENDIF
IF (AUDIO)
        include \nxdos\src\kernel\drivers\audio.asm
ENDIF

        include \nxdos\src\kernel\drivers\tapedrv.asm
        include \nxdos\src\kernel\drivers\cdrom.asm

; ===========================================================================
devdriver proc far
; initialize internal devices
; ===========================================================================
      _newline
      call cs:nul_init
      call cs:clockinit
      call cs:con_init
      call cs:aux_init
      call cs:popen
      call cs:lpt_init
IF (NETWORK)
      call cs:net_init
ENDIF
IF (USB)
      call cs:usb_init
ENDIF

IF (GRAPHICS)
      call cs:gfx_init
ENDIF
IF (AUDIO)
      call cs:snd_init
ENDIF

      ; initialize external .SYS files here
      ; etc...
      ;      Load DRIVER.SYS
      ;      Run driver.init
      ;      repeat until no more drivers
      ;  mov  bx, cs:con_driver   ; get first driver in chain
      ;  mov  word ptr device_root+0, bx
      ;  mov  word ptr device_root+2, ds
init2:
      ;  cmp  word ptr [bx], 0ffffh  ; last driver?
      ;  je   init3
      ;  jmp  biosinit
init3:      
       ret
devdriver endp

