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.

198 lines
9.1 KiB

  1. ;/*
  2. ; * Microsoft Confidential
  3. ; * Copyright (C) Microsoft Corporation 1991
  4. ; * All Rights Reserved.
  5. ; */
  6. data segment public 'DATA'
  7. ;
  8. ;***************************************************************************
  9. ; Equates
  10. ;***************************************************************************
  11. ;
  12. ;Match Flags
  13. Numeric_Value equ 8000h ; ;AN000;
  14. Signed_Numeric_Value equ 4000h ; ;AN000;
  15. Simple_String equ 2000h ; ;AN000;
  16. Date_String equ 1000h ; ;AN000;
  17. Time_String equ 0800h ; ;AN000;
  18. Complex_List equ 0400h ; ;AN000;
  19. Filespec equ 0200h ; ;AN000;
  20. Drive_Only equ 0100h ; ;AN000;
  21. Quoted_String equ 0080h ; ;AN000;
  22. Ignore_Colon equ 0010h ; ;AN000;
  23. Repeats_Allowed equ 0002h ; ;AN000;
  24. Optional equ 0001h ; ;AN000;
  25. ;Function_Flags
  26. File_Table_Capitalize equ 1 ; ;AN000;
  27. ;Result buffer type returned
  28. rb_Number equ 1
  29. rb_List_Index equ 2
  30. rb_String equ 3
  31. rb_Complex equ 4
  32. rb_Filespec equ 5
  33. rb_Drive equ 6
  34. rb_Date equ 7
  35. rb_Time equ 8
  36. rb_Quoted_String equ 9
  37. ;Extra delimeters and EOL
  38. Delimiters_Only equ 1 ; ;AN000;
  39. EOL_Or_Delimiters equ 2 ; ;AN000;
  40. Semi_Colon equ ";" ; ;AN000;
  41. Tab equ 09h ; ;AN000;
  42. Colon1 equ ":" ; ;AN000;
  43. NUL equ "0"
  44. ;Parse Errors
  45. No_Error equ 0 ; ;AN000;
  46. Too_Many_Operands equ 1 ; ;AN000;
  47. Operand_Missing equ 2 ; ;AN000;
  48. Not_In_Switch_List equ 3 ; ;AN000;
  49. Not_In_Keyword_List equ 4 ; ;AN000;
  50. Out_Of_Range equ 6 ; ;AN000;
  51. Not_In_Value_List equ 7 ; ;AN000;
  52. Not_In_String_List equ 8 ; ;AN000;
  53. Syntax_Error equ 9 ; ;AN000;
  54. End_Of_Parse equ -1 ; ;AN000;
  55. ;Other
  56. None equ 0 ; ;AN000;
  57. No_Error equ 0 ; ;AN000;
  58. Switch_Found equ 0FFFFh ; ;AN000;
  59. Range_Ok equ 1 ; ;AN000;
  60. Command_Line_Parms equ 81h ; ;AN000;
  61. ;
  62. ;*****************************************************************************
  63. ; Parse Structures
  64. ;*****************************************************************************
  65. ;
  66. Control struc
  67. Match_Flags dw ?
  68. Function_Flags dw ?
  69. Result dw ?
  70. Values dw ?
  71. Num_Keywords db ?
  72. Keyword db ?
  73. Control ends
  74. File_Name_Return struc ; ;AN000;
  75. Drive_Type db 0 ; ;AN000;
  76. Drive_Item_Tag db 0 ; ;AN000;
  77. Synonym dw 0 ; ;AN000;
  78. String_Value_ptr db 0 ;File Name ;AN000;
  79. File_Name_Return ends ; ;AN000;
  80. ;
  81. ;**************************************************************************
  82. ; Parse tables
  83. ;**************************************************************************
  84. ;
  85. Command_Line_Table label byte ; ;AN000;
  86. dw Command_Control ;Point to next level ;AN000;
  87. db Delimiters_Only ; ;AN000;
  88. db 1 ; ;AN000;
  89. db Semi_Colon ; ;AN000;
  90. ;
  91. ;**************************************************************************
  92. ; Define Positionals, Switches and Keywords
  93. ;**************************************************************************
  94. ;
  95. Command_Control label byte ; ;AN000;
  96. db 1,2 ;File names Positional (1 required) ;AN000;
  97. dw Positional_Control1 ;Pointer to control table ;AN000;
  98. dw Positional_Control2 ;Pointer to control table ;AN000;
  99. db 1 ; 1 switch
  100. dw Switch_Control1 ; Pointer to control table
  101. db None ;No Keywords (maxk) ;AN000;
  102. ;
  103. ;**************************************************************************
  104. ;Control Tables
  105. ;**************************************************************************
  106. ;
  107. Positional_Control1 label byte ; ;AN000;
  108. dw Filespec ;Match_Flag ;AN000;
  109. dw File_Table_Capitalize ;No function flags ;AN000;
  110. dw File_Name_Buffer1 ;Where it will be returned ;AN000;
  111. dw No_Value ;No value ranges defined ;AN000;
  112. db None ;No defined switches/keywords ;AN000;
  113. Positional_Control2 label byte ; ;AN000;
  114. dw Filespec+Optional ;Match_Flag ;AN000;
  115. dw File_Table_Capitalize ;No function flags ;AN000;
  116. dw File_Name_Buffer2 ;Where it will be returned ;AN000;
  117. dw No_Value ;No value ranges defined ;AN000;
  118. db None ;No defined switches/keywords ;AN000;
  119. Switch_Control1 label byte ; used by /?
  120. dw 0 ; Match Mask
  121. dw 0 ; Func Mask
  122. dw Switch_Buffer1 ; ptr to Results
  123. dw No_Value ; ptr to Value
  124. db 1 ; # of synonyms
  125. sw1_s1 db "/?",0 ; 1st synonym
  126. No_Value label byte ; ;AN000;
  127. db 0 ; ;AN000;
  128. ;
  129. ;************************************************************************
  130. ; PARSE Return Buffers
  131. ;************************************************************************
  132. ;
  133. File_name_Buffer1 label byte ; ;AN000;
  134. rb_type1 db 0 ;type returned ;AN000;
  135. rb_item_tag1 db 0 ;matched item tag ;AN000;
  136. rb_synonym1 dw 0 ;found synonyms ;AN000;
  137. rb_string1_off dw 0 ;Offset of string ;AN000;
  138. rb_string1_seg dw 0 ;Offset of string ;AN000;
  139. File_name_Buffer2 label byte ; ;AN000;
  140. rb_type2 db 0 ;type returned ;AN000;
  141. rb_item_tag2 db 0 ;matched item tag ;AN000;
  142. rb_synonym2 dw 0 ;found synonyms ;AN000;
  143. rb_string2_off dw 0 ;Offset of string ;AN000;
  144. rb_string2_seg dw 0 ;Offset of string ;AN000;
  145. Switch_Buffer1 label byte ; used by /?
  146. sw_type1 db 0 ; type returned
  147. sw_tag1 db 0 ; matched item tag
  148. sw_synonym1 dw 0 ; found synonym
  149. sw_padding1 dd 0 ; pad it out
  150. data ends
  151.