In this example we go through the File I/O API to demonstrate how we can check if a file exists on the host's file system. Be sure your running the latest KERNEL and have the FILEIO.SYS driver properly installed on your host or this example won't work.
DCS File found.\n\0
DCS File not found.\n\0
After assembling you can run it at the command-line using the following: fexists.bin KERNEL.SYS