home *** CD-ROM | disk | FTP | other *** search
/ Turbo Toolbox / Turbo_Toolbox.iso / tasm / idos.inc < prev    next >
Text File  |  1988-08-28  |  3KB  |  60 lines

  1.  
  2. ;   FILENAME: DOS.DEC
  3. ;
  4. ;   Copyright (c) 1988 by Borland International, Inc.
  5. ;
  6. ;   DESCRIPTION: This module declares various equates, macros, structures
  7. ;   and unions useful in communicating with DOS. This include file uses
  8. ;   ideal mode syntax.
  9.  
  10. struc   PascalString    ; Structure representing a Turbo Pascal string
  11.     LengthByte  db  ?               ; Leading length byte(<= 255)
  12.     Contents    db  255 dup (?) ; Contents of the string
  13. ends    ; PascalString
  14.  
  15. struc   Psp ; Structure representing DOS's Program Segment Prefix(Psp)
  16.     Int20h              dw  ?   ; Int 20h
  17.     EndOfAllocation dw  ?   ; Segment, end of allocation block
  18.     Reserved1           db  ?   ; Reserved by DOS
  19.     MsDosDispatcher db  5h  dup (?) ; Long call to MS-DOS function
  20.                                         ; dispatcher
  21.     OldTermination      dd  ?   ; Previous contents of termination handler
  22.                                 ; interrupt vector(Int 22h)
  23.     OldCtrlCHandler dd  ?   ; Previous contents of CTRL-C interrupt
  24.                                 ; vector(Int 23h)
  25.     OldCriticalError    dd  ?   ; Previous contents of critical-error
  26.                                 ; interrupt vector(Int 24h)
  27.     Reserved2           db  16h dup (?) ; Reserved by DOS
  28.     EnvironmentBlock    dw  ?           ; Segment address of environment block
  29.     Reserved3           db  2Eh dup (?) ; Reserved by DOS
  30.     Fcb1                db  10h dup (?) ; Default File Control Block(FCB) #1
  31.     Fcb2                db  14h dup (?) ; Default File Control Block(FCB) #2
  32.     CommandTail PascalString <> ; Command tail and default Dta
  33. ends    ; Psp
  34.  
  35. ; The following record type represents the file attributes field in a
  36. ; DOS directory entry.
  37.  
  38. record  FileAttribType  UnUsed:2, Archive:1, Directory:1, Volume:1, System:1, Hidden:1, ReadOnly:1
  39.  
  40. struc   Dta ; Structure representing the DOS Data Transfer Area(Dta)
  41.     Reserved        db  15h dup (?)     ; Used by Find Next function
  42.     FileAttribute   FileAttribType  <>  ; Attribute of file that was found
  43.     ;         BIT       Meaning
  44.     ; 7 6 5 4 3 2 1 0
  45.     ;               1   Read only
  46.     ;             1     Hidden
  47.     ;           1       System
  48.     ;         1         Volume label
  49.     ;       1           Subdirectory
  50.     ;     1             Archive
  51.     ;   1               Unused
  52.     ; 1                 Unused
  53.     Filetime        dw  ?               ; Time of file modification
  54.     Filedate        dw  ?               ; Date of file modification
  55.     Filesize        dd  ?               ; File size in bytes
  56.     Filename        db  13  dup (?)     ; File name(ASCIIZ string)
  57. ends    ; Dta
  58.  
  59. DTA_SIZE    equ 15h + 1 + 2 + 2 + 4 + 13    ; Size of DTA struc
  60.