+ ;---------------------------------------------;
+ ; FAT12 file search/DTA structure ;
+ ;---------------------------------------------;
+ struc search
+ {
+ .searchname:
+ times 255 db 0 ; file search pattern.
+ .attribute db 0 ; search attribute.
+ .direntry dw 0 ; directory entry number, 0 based
+ .dircluster dw 0 ; starting cluster of dir, 0 root
+ .foundattrib db 0 ; attribute of matching file
+ .foundtime dw 0 ; file time
+ .founddate dw 0 ; file date
+ .foundsize dw 0 ; file size
+ }
+
+ virtual at 0
+ search search
+ sizeof.search = $-$$
+ end virtual
+
+ ;---------------------------------------------;
+ ; FAT12 file-handle structure ;
+ ;---------------------------------------------;
+ struc filehandle
+ {
+ .handles db 0 ; reference count or or zero for unused
+ .mode db 0 ; open mode. 0=read, 1=write, 2=r/w.
+ .lfn_entry dw 0 ; file LFN directory entry position
+ .direntry dw 0 ; file directory entry position
+ .cluster dw 0 ; file first cluster
+ .attribute db 0 ; file attributes
+ .filetime dw 0 ; last modified time
+ .filedate dw 0 ; last modified date
+ .filesize dd 0 ; filesize
+ .position dd 0 ; R/W position in file
+ .clusterpos dw 0 ; cluster number of last cluster read
+ .shortname:
+ times 11 db 0 ; short name
+ .fullname:
+ times 255 db 0 ; the full LFN
+ }
+
+ virtual at 0
+ filehandle filehandle
+ sizeof.filehandle = $-$$
+ end virtual
+