1 ; _____________________________________________ 2 ; | | 3 ; | Project: APPLER | 4 ; | File: FM.INC | 5 ; | Compiler: 16-bit TASM (2.5) | 6 ; | | 7 ; | Subject: File Maneger Macros & Stuff | 8 ; | | 9 ; | Author: Emil Dotchevski | 10 ; |_____________________________________________| 11 12 MAX_DIRECTORY_ENTRIES = 100h 13 MAX_MEMORY_ENTRIES = 20h 14 15 DTA_S struc 16 Reserved db 15h dup (0) 17 Attributes db 0 18 Time dw 0 19 Date dw 0 20 FileSize dd 0 21 FileSpec db 0Dh dup (0) 22 ends 23 24 ; File Attributes Bitmaps: 25 FA_READ_ONLY = 00000001b 26 FA_HIDDEN = 00000010b 27 FA_SYSTEM = 00000100b 28 FA_VOLUME_LABEL = 00001000b 29 FA_DIRECTORY = 00010000b 30 FA_ARCHIVE = 00100000b 31 32 FileDescription struc 33 FileName db 0Dh dup (0) 34 FileType db 0 35 FileBegAdr dw 0 36 FileEndAdr dw 0 37 FileLength dw 0 38 FileFlags db 0 39 File1st4bytes db 4 dup (0) 40 ends 41 42 ; File Flags Bitmaps: 43 FF_DAMAGED? = 00000001b 44 FF_SHOWADDR? = 00000010b 45 FF_MODIFYADDR? = 00000100b 46 FF_MODIFYTYPE? = 00001000b 47 FF_MODIFYNAME? = 00010000b 48 49 ; File Type Codes: 50 FD_DIRECTORY = 0 51 FD_CODE = 1 52 FD_STATUS = 2 53 FD_MSDOS = 3 54 55 FindFirst macro 56 mov ah,4Eh 57 int 21h 58 endm 59 60 FindNext macro 61 mov ah,4Fh 62 int 21h 63 endm