READFAT PROC
; ebx = cluster
WRITEFATX PROC
; writes a value to a specified fat entry directly
; output : if error ax contains 0
; preserves all other registers
; ecx = value
; ebx = cluster
XWRITEFAT12 PROC
; reads a fat value from the specified fat entry from sector directly
; output : cx contains fat value ebx=start fat
; preserves dx and bx
XREADFAT12 PROC
; writes a value to a specified fat entry in es:bx
; output : if error ax contains 0
; preserves all registers but ax
; all fat should be loaded into memory before this macro
; ecx = value
; ebx = cluster
WRITEFAT12 PROC
; reads a fat value from the specified fat entry from es:bx
; output : cx contains value
; entire fat12 should be loaded into memory before this macro
READFAT12 PROC
DELFAT12CHAIN PROC
; output bx equal the first fat number which contains value
; bx = fat no that contains value
; clusters is 3 sector long so we read 3 sectors and 1024 fat entries at once
; preserves all other registers except bx and dx
; all fat should be loaded into memory before this macro
SEARCHFAT12 PROC
READFAT16 PROC
; ecx = value
; ebx = cluster
WRITEFAT16 PROC
XREADFAT16 PROC
XWRITEFAT16 PROC
DELFAT16CHAIN PROC
SEARCHFAT16 PROC
; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
; ////////////////////////////////////////////// fat32 routines /////////////////////////////////////////////////
; ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
READFAT32 PROC
READFAT32 ENDP
WRITEFAT32 PROC
WRITEFAT32 ENDP
; call xreadfat32 ebx
XREADFAT32 PROC
; xwritefat32 ebx,ecx
; ecx = value
XWRITEFAT32 PROC
; call delfat32chain ebx
; ebx = start fat
WRITEFAT32CHAIN PROC
DELFAT32CHAIN PROC
; call searchfat32 ebx
SEARCHFAT32 PROC
FAT2MEM MACRO
MEM2FAT MACRO
FORMATA MACRO DRIVE,ENDSECT,VALUE
SETFLOPPYSERIAL MACRO
WRITEFAT MACRO CLUSTER,VALUE
LOADFAT MACRO
SAVEFAT MACRO CLUSTER,VALUE
DELFATCHAIN MACRO CLUSTER
SEARCHFAT MACRO VALUE
; input : es:di should point to filename
GETCURRENTFATCLUSTER MACRO
ENDM
; es:di should point to filename
SETCURRENTFATCLUSTER MACRO CLUSTER
GETFILECLUSTER MACRO FNAME
SETFILECLUSTER MACRO FNAME,CLUSTER