+ ret
+
+;--------------------------------------------------------------;
+; open_file - open file, return handle ;
+;--------------------------------------------------------------;
+; ;
+; in: reg = ASCIIZ file name and such ;
+; ;
+; out: reg = dword file handle ;
+; ;
+;--------------------------------------------------------------;
+open_file:
+ push eax
+ ; file handles need to be dword, where the high
+ ; word contains drive number, and the low word
+ ; is the drive/FS specific handle. meaning no internal
+ ; table in VFS, created dynamically with FS info.
+ ; limits FS to a max of 65535 opened files. most use fewer
+ ; as default. FAT12 driver has 32.
+ ; FS reports error if handle is invalid.
+ pop eax