Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

104 lines
3.6 KiB

  1. ;/*
  2. ; * Microsoft Confidential
  3. ; * Copyright (C) Microsoft Corporation 1989 - 1991
  4. ; * All Rights Reserved.
  5. ; */
  6. ;===========================================================================
  7. ;
  8. ;
  9. ; FILE: SAFEDEF.INC
  10. ;
  11. ; Contains all structure declarations and equates for SAFE.ASM
  12. ;
  13. ; johnhe - 10/09/89
  14. ;===========================================================================
  15. ;===========================================================================
  16. ; Entry layout for a DOS file in a DOS directory */
  17. ;===========================================================================
  18. Dir STRUC
  19. fName DB ' ' ; File primary name
  20. fExt DB ' ' ; File extension
  21. fAttrib DB 0 ; File attributes
  22. fReserved DB 10 DUP (0) ; Reserved by DOS
  23. fTime DW 0 ; Packed creation time
  24. fDate DW 0 ; Packed creation date
  25. fCluster DW 0 ; Files starting cluster
  26. fSize DD 0 ; File lenght in bytes
  27. Dir ENDS
  28. ;===========================================================================
  29. ; Layout of the recovery file header
  30. ;===========================================================================
  31. FileHeader STRUC
  32. fhSign1 DB 4 DUP (?) ; 055h, 0AAh, 0AAh, 055h
  33. fhSign2 DB 16 DUP (?) ; "Microsoft Corp.",0
  34. fhHeadChksum DB (?) ; Chksum for 1st 512 bytes
  35. fhFileChkSum DB (?) ; Chksum for rest of the file
  36. fhChainOffset DW (?) ; File's cluster chain
  37. fhBootSize DD (?) ; Size of boot record
  38. fhFatSize DD (?) ; Size of FAT
  39. fhDirSize DD (?) ; Size of root directory
  40. fhClustSize DD (?) ; Size of the 2 cluster
  41. fhBootOffset DD (?) ; Offset of boot record
  42. fhFatOffset DD (?) ; Offset of FAT
  43. fhDirOffset DD (?) ; Offset of root directory
  44. fhClustOffset DD (?) ; Offset of the 2 cluster
  45. fhDir DB 32 DUP (?) ; This file's directory entry
  46. fhBpb DB 25 DUP (?) ; Disk's BPB structure
  47. fhFileReserve DB (?) ; Start of reserved area
  48. FileHeader ENDS
  49. ;===========================================================================
  50. ; Layout of the int 25 & 26 packets
  51. ;===========================================================================
  52. DiskPacket STRUC
  53. pAddr DD (?) ; Buffer address
  54. pSectors DW (?) ; Number of sectors
  55. pStart DD (?) ; Relative starting sector
  56. DiskPacket ENDS
  57. ;===========================================================================
  58. ; Misc. equates
  59. ;===========================================================================
  60. IGNORE_BIT EQU 00001000b ; Mask to get ignore bit from AH
  61. ; at entry to int 24h handler
  62. SECTOR_SIZE EQU 512 ; Normal sector size
  63. HEADER_SIZE EQU 2048 ; Smallest cluster on a hard disk
  64. MAX_SECTORS EQU 3fh ; Max secters for read or write
  65. OFFSET_BPB EQU 11 ; Offset of BPB in boot record
  66. BPB_LENGTH EQU 25 ; Length of BPB structure
  67. DIR_ENTRY_LEN EQU 32 ; Lenght of a directory entry
  68. DIR_NAME_LEN EQU 11 ; Bytes in a directory file name
  69. ERASED_FILE EQU 0e5h
  70. IFDEF DBLSPACE_HOOKS
  71. NUM_SYS_FILES EQU 4 ; IO.SYS MSDOS.SYS COMMAND.COM DBLSPACE.BIN
  72. ELSE
  73. NUM_SYS_FILES EQU 3 ; IO.SYS MSDOS.SYS COMMAND.COM
  74. ENDIF
  75. DO_READ EQU 0 ; Signal to do a read
  76. DO_WRITE EQU 1 ; Signal to do a write
  77. MAX_BLOCK_SIZE EQU 0fff0h ; Max bytes for DOS read or write
  78. BOOT_VALUE EQU 0 ; Layout of values in the arrays
  79. FAT_VALUE EQU 1 ; which describe the offset in
  80. DIR_VALUE EQU 2 ; in the restore file and each
  81. CLUSTER_VALUE EQU 3 ; areas length
  82. RESTORE_ATTRIBS EQU 7 ; Restore file's attributes
  83. ;===========================================================================
  84.