DOS 3.30 source code leak
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.

156 lines
4.3 KiB

5 years ago
  1. ; SCCSID = @(#)dossym.asm 1.1 85/04/10
  2. ; SCCSID = @(#)dossym.asm 1.1 85/04/10
  3. PAGE 80,132
  4. TRUE EQU 0FFFFh
  5. FALSE EQU 0
  6. Installed = TRUE
  7. IFNDEF DEBUG
  8. DEBUG = FALSE
  9. ENDIF
  10. include dosmac.INC
  11. INCLUDE VERSIONA.INC ;DEFINE THE MAJOR AND MINOR VERSION NUMBERS
  12. ;;IF2
  13. ;; %OUT DOSSYM in Pass 2
  14. ;;ENDIF
  15. BREAK <Control character definitions>
  16. c_DEL EQU 7Fh ; ASCII rubout or delete previous char
  17. c_BS EQU 08h ; ^H ASCII backspace
  18. c_CR EQU 0Dh ; ^M ASCII carriage return
  19. c_LF EQU 0Ah ; ^J ASCII linefeed
  20. c_ETB EQU 17h ; ^W ASCII end of transmission
  21. c_NAK EQU 15h ; ^U ASCII negative acknowledge
  22. c_ETX EQU 03h ; ^C ASCII end of text
  23. c_HT EQU 09h ; ^I ASCII tab
  24. BREAK <Read This and Weep>
  25. ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
  26. ; ;
  27. ; C A V E A T P R O G R A M M E R ;
  28. ; ;
  29. ; Certain structures, constants and system calls below are private to ;
  30. ; the DOS and are extremely version-dependent. They may change at any ;
  31. ; time at the implementors' whim. As a result, they must not be ;
  32. ; documented to the general public. If an extreme case arises, they ;
  33. ; must be documented with this warning. ;
  34. ; ;
  35. ; Those structures and constants that are subject to the above will be ;
  36. ; marked and bracketed with the flag: ;
  37. ; ;
  38. ; C A V E A T P R O G R A M M E R ;
  39. ; ;
  40. ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
  41. include bpb.INC
  42. include buffer.INC
  43. BREAK <User stack inside of system call and SysVars>
  44. ; Location of user registers relative user stack pointer
  45. user_environ STRUC
  46. user_AX DW ?
  47. user_BX DW ?
  48. user_CX DW ?
  49. user_DX DW ?
  50. user_SI DW ?
  51. user_DI DW ?
  52. user_BP DW ?
  53. user_DS DW ?
  54. user_ES DW ?
  55. user_IP DW ?
  56. user_CS DW ?
  57. user_F DW ?
  58. user_environ ENDS
  59. include sysvar.INC
  60. include vector.INC
  61. ;include mult.INC
  62. BREAK <Disk map>
  63. ; MSDOS partitions the disk into 4 sections:
  64. ;
  65. ; phys sector 0: +-------------------+
  66. ; | | boot/reserved |
  67. ; | +-------------------+
  68. ; | | File allocation |
  69. ; v | table(s) |
  70. ; | (multiple copies |
  71. ; | are kept) |
  72. ; +-------------------+
  73. ; | Directory |
  74. ; +-------------------+
  75. ; | File space |
  76. ; +-------------------+
  77. ; | Unaddressable |
  78. ; | (to end of disk) |
  79. ; +-------------------+
  80. ;
  81. ; All partition boundaries are sector boundaries. The size of the FAT is
  82. ; adjusted to maximize the file space addressable.
  83. include dirent.INC
  84. BREAK <File allocation Table information>
  85. ;
  86. ; The File Allocation Table uses a 12-bit entry for each allocation unit on
  87. ; the disk. These entries are packed, two for every three bytes. The contents
  88. ; of entry number N is found by 1) multiplying N by 1.5; 2) adding the result
  89. ; to the base address of the Allocation Table; 3) fetching the 16-bit word
  90. ; at this address; 4) If N was odd (so that N*1.5 was not an integer), shift
  91. ; the word right four bits; 5) mask to 12 bits (AND with 0FFF hex). Entry
  92. ; number zero is used as an end-of-file trap in the OS and is passed to the
  93. ; BIOS to help determine disk format. Entry 1 is reserved for future use.
  94. ; The first available allocation unit is assigned entry number two, and even
  95. ; though it is the first, is called cluster 2. Entries greater than 0FF8H
  96. ; (12-bit fats) or 0FFF8H (16-bit fats) are end of file marks; entries of zero
  97. ; are unallocated. Otherwise, the contents of a FAT entry is the number of
  98. ; the next cluster in the file.
  99. ;
  100. ; Clusters with bad sectors are tagged with FF7H. Any non-zero number would
  101. ; do because these clusters show as allocated, but are not part of any
  102. ; allocation chain and thus will never be allocated to a file. A particular
  103. ; number is selected so that disk checking programs know what to do (ie. a
  104. ; cluster with entry FF7H which is not in a chain is not an error).
  105. include dpb.INC
  106. include curdir.INC
  107. ;include cpmfcb.INC
  108. ;include find.INC
  109. include pdb.INC
  110. include exe.INC
  111. include sf.INC
  112. include arena.INC
  113. include intnat.INC
  114. include mi.INC
  115. fChk equ 1
  116. fDelim equ 2
  117. fSpChk equ 4
  118. fFCB equ 8
  119. ;include filemode.INC
  120. ;include error.INC
  121. include syscall.INC
  122. include doscntry.inc ;J.K. 5/26/86
  123. SUBTTL