diagfat         proc    far

_start:         jmp     _initialize
include \nxdos\src\toolbox.asm
include \nxdos\src\kernel\dma.asm
include \nxdos\src\kernel\filesys.asm
_initialize:
                mov  dl, 0
                call FAT12_Mount
                jc   mounterror

                push cs
                pop  es
                mov  si, offset FAT12_ROOT
                lea  di, filename
                call remove_filedot
                call cs:FAT12_findfile
                jc   mounterror
                call putnum
                _newline
                jmp  exitptr
mounterror:
                _print filenotfound, 1
exitptr:        call dosexit
                int 20h      
filename        db 'DIAGFAT.COM',0
filenotfound    db 'File not found.',0ffh,0
diagfat         endp
