     1                                  ;	SCCSID = @(#)ibmcode.asm	1.1 85/04/10
     2                                  ;TITLE	MISC DOS ROUTINES - Int 25 and 26 handlers and other
     3                                  ;NAME	IBMCODE
     4                                  
     5                                  ;
     6                                  ; System call dispatch code.
     7                                  ;
     8                                  
     9                                  [list -]
     9          ******************       warning: out: ... CLONE version build switch on ... [-w+user]
    14                                  
    15                                  ;=== Push trace listing source: ms_code.nas
    16                                  %include "ms_code.nas"
     1                              <1> ;	SCCSID = @(#)mscode.asm 1.2 85/07/23
     2                              <1> ;
     3                              <1> ; MSCODE.ASM -- MSDOS code
     4                              <1> ;
     5                              <1> 
     6                              <1> [list -]
     6          ******************  <1>  warning: redefining multi-line macro `struc' [-w+pp-macro-redef-multi]
    14                              <4> [list -]
    14                              <3> [list -]
     6                              <2> %include "entrysw.mac"
     1                              <3> 
     2                              <3> %ifndef __ENTRYSW_MAC__
     3                              <3>  %assign __ENTRYSW_MAC__ 1
     4                              <3> 
     5                              <3> %assign _DOSCODEHMA		1
     6                              <3> %assign _RELOCATEDOSCODE	1
     7                              <3> 
     8                              <3> 		; Write a label "%1" (only if DOSCODE isn't relocated) and
     9                              <3> 		; "relocated%1" (always).
    10                              <3> 	%imacro relocated 1-2.nolist
    11                              <3> %ifnidni %2, device
    12                              <3>  %ifnidni %2, amis
    13                              <3>   %ifn _RELOCATEDOSCODE
    14                              <3> %1:
    15                              <3> 	global %1
    16                              <3>   %endif
    17                              <3>  %endif
    18                              <3> %endif
    19                              <3> relocated%1:				; always used for local labels
    20                              <3> 	global relocated%1
    21                              <3> 	%endmacro
    22                              <3> 
    23                              <3> %if _RELOCATEDOSCODE
    24                              <3> DOSENTRYADJUSTSEGMENT equ 60h - 26h
    25                              <3> %else
    26                              <3> DOSENTRYADJUSTSEGMENT equ 0
    27                              <3> %endif
    28                              <3> DOSENTRYADJUSTOFFSET equ DOSENTRYADJUSTSEGMENT * 16
    29                              <3> 
    30                              <3> DOSENTRYDEVICEBASE equ 10h
    31                              <3> 
    32                              <3> %endif
     7                              <2> [list -]
    39                              <2> usesection DOSENTRY
    40                              <2> 
    41                              <2> %endif
     9                              <1> %include "dosseg.nas"
     1                              <2> ;	SCCSID = @(#)dosseg.asm	1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)dosseg.asm	1.1 85/04/10
     3                              <2> ;
     4                              <2> ; segment ordering for MSDOS
     5                              <2> ;
     6                              <2> 
     7                              <2> %include "ddataseg.nas"
     1                              <3> 
     2                              <3> %include "lmacros3.mac"
     1                              <4> [list -]
     3                              <3> 
     4                              <3> addsection DOSSTART, align=16 PUBLIC class=DOSSTART
     5                              <3> ; (no prior section) ; DOSSTART		ENDS
     6                              <3> 
     7                              <3> addsection DOSSTARTJUMP, align=1 PUBLIC class=START
     8                              <3> ; (no prior section) ; DOSSTARTJUMP		ENDS
     9                              <3> 
    10                              <3> addsection CONSTANTS, align=2 PUBLIC class=CONST
    11                              <3> ; (no prior section) ; CONSTANTS	ENDS
    12                              <3> 
    13                              <3> addsection DATA, align=2 PUBLIC class=DATA
    14                              <3> ; (no prior section) ; DATA		ENDS
    15                              <3> 
    16                              <3> addsection TABLE, align=2 PUBLIC class=TABLE
    17                              <3> ; (no prior section) ; TABLE		ENDS
    18                              <3> 
    19                              <3> addsection DOSDATATABLE, align=2 PUBLIC class=DOSDATACODE
    20                              <3> ; (no prior section) ; DOSDATATABLE		ENDS
    21                              <3> 
    22                              <3> addsection DOSDATACODE, align=1 PUBLIC class=DOSDATACODE
    23                              <3> ; (no prior section) ; DOSDATACODE		ENDS
    24                              <3> 
    25                              <3> addsection DOSBIODATA, align=2 PUBLIC class=DOSBIODATA
    26                              <3> 
    27                              <3> addsection LAST, align=16 PUBLIC class=LAST
    28                              <3> ; (no prior section) ; LAST		ENDS
    29                              <3> 
    30                              <3> group DOSGROUP DOSSTART DOSSTARTJUMP CONSTANTS DATA TABLE DOSDATATABLE DOSDATACODE DOSBIODATA LAST
     8                              <2> 
     9                              <2> %include "dcodeseg.nas"
     1                              <3> 
     2                              <3> %ifndef DCODESEGNAS
     3                              <3> %assign DCODESEGNAS 1
     4                              <3> 
     5                              <3> section DOSCODETABLE align=2 PUBLIC class=DOSCODE
     6                              <3> ; (no prior section) ; DOSCODETABLE		ENDS
     7                              <3> section DOSCODECODE align=1 PUBLIC class=DOSCODE
     8                              <3> ; (no prior section) ; DOSCODECODE		ENDS
     9                              <3> section DOSBIOCODE align=2 PUBLIC class=DOSCODE
    10                              <3> section BIOCODE	align=2 PUBLIC class=DOSCODE
    11                              <3> 
    12                              <3> %ifnidni DOSENTRYGROUP, DOSCODEGROUP
    13                              <3>  group DOSCODEGROUP DOSCODETABLE DOSCODECODE DOSBIOCODE BIOCODE
    14                              <3> %endif
    15                              <3> 
    16                              <3> %endif
    10                              <2> 
    11                              <2> section LAST
    12                              <2> ; (no prior section) ; LAST		ENDS
    10                              <1> %include "dossym.mac"
     1                              <2> ;	SCCSID = @(#)dossym.asm 1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)dossym.asm 1.1 85/04/10
     3                              <2> ;	PAGE 80,132
     4                              <2> TRUE	    EQU 0FFFFh
     5                              <2> FALSE	    EQU 0
     6                              <2> 
     7                              <2> Installed   equ TRUE
     8                              <2> %IFNDEF	DEBUG
     9                              <2>     DEBUG	equ FALSE
    10                              <2> %ENDIF
    11                              <2> %IFNDEF	debug
    12                              <2>     debug	equ DEBUG
    13                              <2> %ENDIF
    14                              <2> 
    15                              <2> %if 0
    16                              <2>  DBCS equ FALSE		; for fixmem.pl operation
    17                              <2> %endif
    18                              <2> 
    19                              <2> ; NASM original macros
    20                              <2> 
    21                              <2> %macro DBCS 1.nolist
    22                              <2> %defstr %%string %1
    23                              <2> %substr %%prefix %%string 1,2
    24                              <2> %substr %%suffix %%string 3,-1
    25                              <2> %ifnidni %%prefix, "= "
    26                              <2>  %error Unexpected DBCS prefix
    27                              <2> %endif
    28                              <2> %deftok %%token %%suffix
    29                              <2> %xdefine DBCS %%token
    30                              <2> %endmacro
    31                              <2> 
    32                              <2> %include "DBCS.SW"
     1                              <3> DBCS = FALSE
     2                              <3> 
    33                              <2> %unmacro DBCS 1.nolist
    34                              <2> 
    35                              <2> ; end of NASM original macros
    36                              <2> 
    37                              <2> %include "dosmac.mac"
     1                              <3> ;	SCCSID = @(#)dosmac.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)dosmac.asm	1.1 85/04/10
     3                              <3> ;
     4                              <3> ; Macro file for MSDOS.
     5                              <3> ;
     6                              <3> 
     7                              <3> %ifndef __DOSMAC_MAC__
     8                              <3>  %assign __DOSMAC_MAC__ 1
     9                              <3> 
    10                              <3> TRUE    EQU 0FFFFh
    11                              <3> FALSE   EQU 0
    12                              <3> 
    13                              <3> 
    14                              <3> ; NASM original macros (comment for fixmem.pl)
    15                              <3> 
    16                              <3> ;SUBTTL BREAK a listing into pages and give new subtitles
    17                              <3> ;PAGE
    18                              <3> %imacro BREAK 0-1+.nolist
    19                              <3> 	;SUBTTL  subtitle
    20                              <3> 	;PAGE
    21                              <3> %endmacro
    22                              <3> ;.xcref  break
    23                              <3> 
    24                              <3> BREAK   <ASMVAR - handle assembly variables once and for all>
    25                              <3> 
    26                              <3> %if 0
    27                              <3> AsmVars Macro   varlist
    28                              <3> IRP     var,<varlist>
    29                              <3> AsmVar  var
    30                              <3> ENDM
    31                              <3> ENDM
    32                              <3> 
    33                              <3> AsmVar  Macro   var
    34                              <3> IFNDEF  var
    35                              <3> var = FALSE
    36                              <3> ENDIF
    37                              <3> ENDM
    38                              <3> %endif
    39                              <3> 
    40                              <3> BREAK <I_NEED: declare a variable external, if necessary, and allocate a size>
    41                              <3> 
    42                              <3> ;
    43                              <3> ; declare a variable external and allocate a size
    44                              <3> ;
    45                              <3> ;AsmVar  InstalledData
    46                              <3> %ifndef InstalledData
    47                              <3>  %define InstalledData 0
    48                              <3> %endif
    49                              <3> 
    50                              <3> %imacro I_NEED 1-2.nolist
    51                              <3> %ifn InstalledData
    52                              <3> 	[section DATA]
    53                              <3>     %IFIDNi   %2, WORD
    54                              <3> 	EXTRN   %1:WORD
    55                              <3>     %ELSE
    56                              <3> 	%IFIDNi   %2, DWORD
    57                              <3> 	EXTRN   %1:DWORD
    58                              <3> 	%ELSE
    59                              <3> 	EXTRN   %1:BYTE
    60                              <3> 	%ENDIF
    61                              <3>     %ENDIF
    62                              <3> 	__SECT__
    63                              <3> %ENDIF
    64                              <3> %endmacro
    65                              <3> 	;.xcref I_need
    66                              <3> 
    67                              <3> ;
    68                              <3> ; call a procedure that may be external.  The call will be short.
    69                              <3> ;
    70                              <3> %imacro invoke 1.nolist
    71                              <3> ;.xcref
    72                              <3> 	EXTRN   %1:NEAR
    73                              <3> ;.cref
    74                              <3> 	CALL    %1
    75                              <3> %endmacro
    76                              <3> ;.xcref  invoke
    77                              <3> 
    78                              <3> ;PAGE
    79                              <3> ;
    80                              <3> ; jump to a label that may be external.  The jump will be near.
    81                              <3> ;
    82                              <3> %imacro transfer 1.nolist
    83                              <3> ;.xcref
    84                              <3> 	EXTRN   %1:NEAR
    85                              <3> ;.cref
    86                              <3> 	JUMP    %1
    87                              <3> %endmacro
    88                              <3> ;.xcref  transfer
    89                              <3> 
    90                              <3> ;
    91                              <3> ; get a short address in a word
    92                              <3> ;
    93                              <3> %imacro short_addr 1.nolist
    94                              <3>     %ifnidn %1, ?
    95                              <3> 	EXTRN   %1:NEAR
    96                              <3> 	DW  OFFSET %1
    97                              <3>     %ELSE
    98                              <3> 	DW  ?
    99                              <3>     %ENDIF
   100                              <3> %endmacro
   101                              <3> ;.xcref  short_addr
   102                              <3> 
   103                              <3> ;
   104                              <3> ; get a long address in a dword
   105                              <3> ;
   106                              <3> %imacro long_addr 1.nolist
   107                              <3> 	EXTRN   %1:NEAR
   108                              <3> 	DD  %1
   109                              <3> %endmacro
   110                              <3> ;.xcref  long_addr
   111                              <3> 
   112                              <3> ;
   113                              <3> ; declare a PROC near or far but PUBLIC nonetheless
   114                              <3> ;
   115                              <3> ;.xcref ?frame
   116                              <3> ;.xcref ?aframe
   117                              <3> ;.xcref ?stackdepth
   118                              <3> ;.xcref ?initstack
   119                              <3> %assign ?frame           0                     ; initial
   120                              <3> %assign ?aframe          0                     ; initial
   121                              <3> %assign ?stackdepth      0                     ; initial stack size
   122                              <3> %assign ?initstack       0                     ; initial stack size
   123                              <3> 
   124                              <3> %imacro procedure 1-2.nolist
   125                              <3> 	%assign ?frame     0
   126                              <3> 	%assign ?aframe    2                   ;; remember the pushed BP
   127                              <3> 	%warning proc %1...
   128                              <3> %1    PROC    %2
   129                              <3> 	PUBLIC  %1
   130                              <3> 	%assign ?initstack     ?stackdepth     ;; beginning of procedure
   131                              <3> %endmacro
   132                              <3> ;.xcref  procedure
   133                              <3> 
   134                              <3> ;
   135                              <3> ; end a procedure and check that stack depth is preserved
   136                              <3> ;
   137                              <3> %imacro EndProc 1-2.nolist
   138                              <3> 	%ifnidni   %2, NoCheck        ;; check the stack size
   139                              <3> 	%if ?initstack != ?stackdepth    ;; is it different?
   140                              <3> 	%warning    ***** Possible stack size error in %1 *****
   141                              <3> 	%endif
   142                              <3> 	%endif
   143                              <3> %1    ENDP
   144                              <3> %endmacro
   145                              <3> ;.xcref  endproc
   146                              <3> ;PAGE
   147                              <3> ;
   148                              <3> ; define a data item to be public and of an appropriate size/type
   149                              <3> ;
   150                              <3> 
   151                              <3> %imacro stripangles 2.nolist
   152                              <3> %defstr %%param %2
   153                              <3> %rep 16
   154                              <3>  %substr %%opening %%param 1
   155                              <3>  %ifidn %%opening, '<'
   156                              <3>   %substr %%param %%param 2,-1
   157                              <3>  %endif
   158                              <3> %endrep
   159                              <3> %rep 16
   160                              <3>  %strlen %%length %%param
   161                              <3>  %substr %%closing %%param %%length
   162                              <3>  %ifidn %%closing, '>'
   163                              <3>   %substr %%param %%param 1,-2
   164                              <3>  %endif
   165                              <3> %endrep
   166                              <3> %deftok %%token %%param
   167                              <3> %1 %%token
   168                              <3> %endmacro
   169                              <3> 
   170                              <3> %imacro I_AM 2-*.nolist
   171                              <3> ;I_AM    MACRO   name,size,init
   172                              <3> %xdefine %%name %1
   173                              <3> ;; declare the type of the object
   174                              <3>     %IFIDNi %2, WORD
   175                              <3> %1    LABEL WORD
   176                              <3> 	%assign I_AM_SIZE      1
   177                              <3> 	%assign I_AM_LEN       2
   178                              <3>     %ELSE
   179                              <3> 	%IFIDNi %2, DWORD
   180                              <3> %1    LABEL DWORD
   181                              <3> 	%assign I_AM_SIZE      2
   182                              <3> 	%assign I_AM_LEN       2
   183                              <3> 	%ELSE
   184                              <3> 	    %IFIDNi %2, BYTE
   185                              <3> %1    LABEL BYTE
   186                              <3> 	%assign I_AM_SIZE      1
   187                              <3> 	%assign I_AM_LEN       1
   188                              <3> 	    %ELSE
   189                              <3> %1    LABEL BYTE
   190                              <3> %undef I_AM_SIZE
   191                              <3> 	stripangles %assign I_AM_SIZE, %2
   192                              <3> 	%assign I_AM_LEN       1
   193                              <3> 	    %ENDIF
   194                              <3> 	%ENDIF
   195                              <3>     %ENDIF
   196                              <3> ;; declare the object public
   197                              <3> 	PUBLIC  %%name
   198                              <3> ;; if no initialize then allocate blank storage
   199                              <3>     %IF %0 == 2
   200                              <3> 	DB  I_AM_SIZE*I_AM_LEN DUP (?)
   201                              <3>     %ELSE
   202                              <3> %ifn InstalledData
   203                              <3>  %rotate 2
   204                              <3>  %rep %0 - 2
   205                              <3> 	    %IF I_AM_LEN == 1
   206                              <3> 		stripangles db, %1
   207                              <3> 	    %ELSE
   208                              <3> 		stripangles dw, %1
   209                              <3> 	    %ENDIF
   210                              <3> 	    %assign I_AM_SIZE I_AM_SIZE - 1
   211                              <3> 	    %rotate 1
   212                              <3>  %endrep
   213                              <3> 	%IF I_AM_SIZE != 0
   214                              <3> 	    %error    ***** initialization of %%name not complete *****
   215                              <3> 	%ENDIF
   216                              <3> %ELSE
   217                              <3> 	DB  I_AM_SIZE*I_AM_LEN DUP (?)
   218                              <3> %ENDIF
   219                              <3>     %ENDIF
   220                              <3> %endmacro
   221                              <3> 
   222                              <3> %imacro I_AM_NOBITS 2-*.nolist
   223                              <3> ;I_AM    MACRO   name,size,init
   224                              <3> %xdefine %%name %1
   225                              <3> ;; declare the type of the object
   226                              <3>     %IFIDNi %2, WORD
   227                              <3> %1    LABEL WORD
   228                              <3> 	%assign I_AM_SIZE      1
   229                              <3> 	%assign I_AM_LEN       2
   230                              <3>     %ELSE
   231                              <3> 	%IFIDNi %2, DWORD
   232                              <3> %1    LABEL DWORD
   233                              <3> 	%assign I_AM_SIZE      2
   234                              <3> 	%assign I_AM_LEN       2
   235                              <3> 	%ELSE
   236                              <3> 	    %IFIDNi %2, BYTE
   237                              <3> %1    LABEL BYTE
   238                              <3> 	%assign I_AM_SIZE      1
   239                              <3> 	%assign I_AM_LEN       1
   240                              <3> 	    %ELSE
   241                              <3> %1    LABEL BYTE
   242                              <3> %undef I_AM_SIZE
   243                              <3> 	stripangles %assign I_AM_SIZE, %2
   244                              <3> 	%assign I_AM_LEN       1
   245                              <3> 	    %ENDIF
   246                              <3> 	%ENDIF
   247                              <3>     %ENDIF
   248                              <3> ;; declare the object public
   249                              <3> 	PUBLIC  %%name
   250                              <3> ;; if no initialize then allocate blank storage
   251                              <3>     %IF %0 == 2
   252                              <3> 	resb  I_AM_SIZE*I_AM_LEN
   253                              <3>     %ELSE
   254                              <3> %ifn InstalledData
   255                              <3>  %rotate 2
   256                              <3>  %rep %0 - 2
   257                              <3> 	    %IF I_AM_LEN == 1
   258                              <3> 		resb 1
   259                              <3> 	    %ELSE
   260                              <3> 		resw 1
   261                              <3> 	    %ENDIF
   262                              <3> 	    %assign I_AM_SIZE I_AM_SIZE - 1
   263                              <3> 	    %rotate 1
   264                              <3>  %endrep
   265                              <3> 	%IF I_AM_SIZE != 0
   266                              <3> 	    %error    ***** initialization of %%name not complete *****
   267                              <3> 	%ENDIF
   268                              <3> %ELSE
   269                              <3> 	resb  I_AM_SIZE*I_AM_LEN
   270                              <3> %ENDIF
   271                              <3>     %ENDIF
   272                              <3> %endmacro
   273                              <3> 
   274                              <3> ;.xcref  I_AM
   275                              <3> ;.xcref  I_AM_SIZE
   276                              <3> ;.xcref  I_AM_LEN
   277                              <3> %assign I_AM_SIZE 0
   278                              <3> %assign I_AM_LEN  0
   279                              <3> 
   280                              <3> ;PAGE
   281                              <3> 
   282                              <3> ;
   283                              <3> ; define an entry in a procedure
   284                              <3> ;
   285                              <3> %imacro entry 1-2.nolist
   286                              <3> %1:
   287                              <3> 	PUBLIC  %1
   288                              <3> %endmacro
   289                              <3> ;.xcref  entry
   290                              <3> 
   291                              <3> BREAK <ERROR - store an error code then jump to a label>
   292                              <3> 
   293                              <3> %imacro error 1.nolist
   294                              <3> ;.xcref
   295                              <3> 	MOV AL, %1
   296                              <3> 	transfer    SYS_RET_ERR
   297                              <3> ;.cref
   298                              <3> %endmacro
   299                              <3> ;.xcref  error
   300                              <3> 
   301                              <3> BREAK <JUMP - real jump that links up shortwise>
   302                              <3> ;
   303                              <3> ; given a label <lbl> either 2 byte jump to another label <lbl>_J
   304                              <3> ; if it is near enough or 3 byte jump to <lbl>
   305                              <3> ;
   306                              <3> 
   307                              <3> %imacro jump 1.nolist
   308                              <3> ;.xcref
   309                              <3> 
   310                              <3>     %ifndef %1_J                       ;; is this the first invocation
   311                              <3> %%a:      JMP %1
   312                              <3>     %ELSE
   313                              <3> 	%IF (%1_J >= $) || ($-%1_J > 126)
   314                              <3> %%a:      JMP %1                         ;; is the jump too far away?
   315                              <3> 	%ELSE
   316                              <3> %%a:      JMP %1_J                      ;; do the short one...
   317                              <3> 	%ENDIF
   318                              <3>     %ENDIF
   319                              <3>     %ixdefine %1_j %%a
   320                              <3> ;.cref
   321                              <3> %endmacro
   322                              <3> ;.xcref  jump
   323                              <3> 
   324                              <3> BREAK <RETURN - return from a function>
   325                              <3> 
   326                              <3> %imacro return 0.nolist
   327                              <3> %%a:
   328                              <3> 	RET
   329                              <3> %xdefine ret_l %%a
   330                              <3> %endmacro
   331                              <3> ;.xcref  return
   332                              <3> 
   333                              <3> BREAK <CONDRET - conditional return>
   334                              <3> 
   335                              <3> %imacro condret 2.nolist
   336                              <3> %assign %%exit 0
   337                              <3>     %ifdef   ret_l                       ;; if ret_l is defined
   338                              <3> 	%if (($ - ret_l) <= 126) && ($ > ret_l)
   339                              <3> 					;;     if ret_l is near enough then
   340                              <3> 	    %%a:  j%1    ret_l           ;;         a: j<CC> to ret_l
   341                              <3> 	    %xdefine ret_%1 %%a                 ;;         define ret_<CC> to be a:
   342                              <3> 	    %assign %%exit 1
   343                              <3> 	%endif
   344                              <3>     %endif
   345                              <3>     %ifn %%exit
   346                              <3>     %ifdef   ret_%1                     ;; if ret_<CC> defined
   347                              <3> 	%if (($ - ret_%1) <= 126) && ($ > ret_%1)
   348                              <3> 					;;     if ret_<CC> is near enough
   349                              <3> 	    %%a:  j%1    ret_%1         ;;         a: j<CC> to ret_<CC>
   350                              <3> 	    %xdefine ret_%1 %%a                 ;;         define ret_<CC> to be a:
   351                              <3> 	    %assign %%exit 1
   352                              <3> 	%endif
   353                              <3>     %endif
   354                              <3>     %endif
   355                              <3>     %ifn %%exit
   356                              <3>     j%2   %%a                           ;; j<NCC> a:
   357                              <3>     return                              ;; return
   358                              <3>     %%a:                                  ;; a:
   359                              <3>     %xdefine ret_%1 ret_l                     ;; define ret_<CC> to be ret_l
   360                              <3>     %endif
   361                              <3> %endmacro
   362                              <3> ;.xcref  condret
   363                              <3> 
   364                              <3> BREAK <RETZ - return if zero, links up shortwise if necessary>
   365                              <3> 
   366                              <3> %imacro retz 0.nolist
   367                              <3>     condret z,nz
   368                              <3> %endmacro
   369                              <3> ;.xcref  retz
   370                              <3> 
   371                              <3> BREAK <RETNZ - return if not zero, links up shortwise if necessary>
   372                              <3> 
   373                              <3> %imacro retnz 0.nolist
   374                              <3>     condret nz,z
   375                              <3> %endmacro
   376                              <3> ;.xcref  retnz
   377                              <3> 
   378                              <3> BREAK <RETC - return if carry set, links up shortwise if necessary>
   379                              <3> 
   380                              <3> %imacro retc 0.nolist
   381                              <3>     condret c,nc
   382                              <3> %endmacro
   383                              <3> ;.xcref  retc
   384                              <3> 
   385                              <3> BREAK <RETNC - return if not carry, links up shortwise if necessary>
   386                              <3> 
   387                              <3> %imacro retnc 0.nolist
   388                              <3>     condret nc,c
   389                              <3> %endmacro
   390                              <3> ;.xcref  retnc
   391                              <3> 
   392                              <3> BREAK <CONTEXT - set the DOS context to a particular register>
   393                              <3> 
   394                              <3> %imacro context 1.nolist
   395                              <3> 	PUSH    SS
   396                              <3> 	stripangles POP, %1
   397                              <3> 	; ASSUME  %1:DOSGROUP
   398                              <3> %endmacro
   399                              <3> ;.xcref  context
   400                              <3> 
   401                              <3> BREAK <SaveReg - save a set of registers>
   402                              <3> 
   403                              <3> %imacro SaveReg 0-*.nolist                 ;; push those registers
   404                              <3>  %rep %0
   405                              <3> 	%assign ?stackdepth ?stackdepth + 1
   406                              <3> 	stripangles push, %1
   407                              <3> 	%rotate 1
   408                              <3>  %endrep
   409                              <3> %endmacro
   410                              <3> ;.xcref  SaveReg
   411                              <3> 
   412                              <3> BREAK <RestoreReg - unsave some registers>
   413                              <3> 
   414                              <3> %imacro RestoreReg 0-*.nolist             ;; pop those registers
   415                              <3>  %rep %0
   416                              <3> 	%assign ?stackdepth ?stackdepth - 1
   417                              <3> 	stripangles pop, %1
   418                              <3> 	%rotate 1
   419                              <3>  %endrep
   420                              <3> %endmacro
   421                              <3> ;.xcref  RestoreReg
   422                              <3> 
   423                              <3> BREAK <Critical section macros>
   424                              <3> 
   425                              <3> %imacro EnterCrit 1.nolist
   426                              <3> 	Invoke  E%1
   427                              <3> %endmacro
   428                              <3> 
   429                              <3> %imacro LeaveCrit 1.nolist
   430                              <3> 	Invoke  L%1
   431                              <3> %endmacro
   432                              <3> 
   433                              <3> Break   <message - display a message>
   434                              <3> 
   435                              <3> ;AsmVars <ShareF,Cargs,Redirector>
   436                              <3> %ifndef ShareF
   437                              <3>  %idefine ShareF 0
   438                              <3> %endif
   439                              <3> %ifndef Cargs
   440                              <3>  %idefine Cargs 0
   441                              <3> %endif
   442                              <3> %ifndef Redirector
   443                              <3>  %idefine Redirector 0
   444                              <3> %endif
   445                              <3> %ifndef debug
   446                              <3>  %idefine debug 0
   447                              <3> %endif
   448                              <3> 
   449                              <3> %if debug
   450                              <3> %imacro fmt 3-*.nolist
   451                              <3> ;fmt     MACRO   typ,lev,fmts,args
   452                              <3> ;local   a,b,c
   453                              <3> 	PUSHF
   454                              <3> %IFNempty %1
   455                              <3> 	TEST    word [BugTyp],%1
   456                              <3> 	JZ      %%c
   457                              <3> 	CMP     word [BugLev],%2
   458                              <3> 	JB      %%c
   459                              <3> %ENDIF
   460                              <3> 	PUSH    AX
   461                              <3> 	PUSH    BP
   462                              <3> 	MOV     BP,SP
   463                              <3> %If (! sharef) && (! redirector)
   464                              <3> 	[section Table]
   465                              <3> %%a:       db      %3,0
   466                              <3> 	__SECT__
   467                              <3> 	MOV     AX,OFFSET %%a wrt DOSGROUP
   468                              <3> %else
   469                              <3> 	jmp     short %%b
   470                              <3> %%a:       db      %3,0
   471                              <3> %if sharef
   472                              <3> %%b:      mov     ax,offset %%a wrt share
   473                              <3> %else
   474                              <3> %%b:      mov     ax,offset %%a wrt netwrk
   475                              <3> %endif
   476                              <3> %endif
   477                              <3> 	PUSH    AX
   478                              <3> %iassign cargs 2
   479                              <3> %rotate 3
   480                              <3> %rep %0 - 3
   481                              <3>  %ifidni ax, %1
   482                              <3> 	MOV     AX,[BP+2]
   483                              <3>  %ELSE
   484                              <3> 	MOV     AX, %1
   485                              <3>  %ENDIF
   486                              <3> 	PUSH    AX
   487                              <3>  %iassign cargs cargs + 2
   488                              <3>  %rotate 1
   489                              <3> %endrep
   490                              <3> 	invoke  PFMT
   491                              <3> 	ADD     SP, Cargs
   492                              <3> 	POP     BP
   493                              <3> 	POP     AX
   494                              <3> %%c:
   495                              <3> 	POPF
   496                              <3> %endmacro
   497                              <3> %else
   498                              <3> %imacro fmt 3-*.nolist
   499                              <3> %endmacro
   500                              <3> %endif
   501                              <3> 
   502                              <3> Break   <DOSAssume - validate assumes>
   503                              <3> 
   504                              <3> ;AsmVar  Debug,$temp
   505                              <3> 
   506                              <3> %imacro detectstripangles 4.nolist
   507                              <3> %defstr %%param %4
   508                              <3> %assign ?%2 0
   509                              <3> %assign ?%3 0
   510                              <3> %rep 16
   511                              <3>  %substr %%opening %%param 1
   512                              <3>  %ifidn %%opening, '<'
   513                              <3>   %substr %%param %%param 2,-1
   514                              <3>   %assign ?%2 ?%2 + 1
   515                              <3>  %endif
   516                              <3> %endrep
   517                              <3> %rep 16
   518                              <3>  %strlen %%length %%param
   519                              <3>  %substr %%closing %%param %%length
   520                              <3>  %ifidn %%closing, '>'
   521                              <3>   %substr %%param %%param 1,-2
   522                              <3>   %assign ?%3 ?%3 + 1
   523                              <3>  %endif
   524                              <3> %endrep
   525                              <3> %deftok %%token %%param
   526                              <3> %define ?%1 %%token
   527                              <3> %endmacro
   528                              <3> 
   529                              <3> 
   530                              <3> %IF debug
   531                              <3> %imacro DOSAssume 3-*.nolist
   532                              <3> ;DOSAssume   Macro   reg,reglist,message
   533                              <3>  %ifidni %1, CS
   534                              <3>   %assign %%temp 1
   535                              <3>  %else
   536                              <3>   %ifidni %1, SS
   537                              <3>    %assign %%temp 0
   538                              <3>   %else
   539                              <3>    %error ***** Invalid DOS register %1 in DOSAssume *****
   540                              <3>   %endif
   541                              <3>  %endif
   542                              <3>  %rotate 1
   543                              <3>  %assign %%level 0
   544                              <3>  %assign %%amount %0 - 1
   545                              <3>  %rep 16
   546                              <3>   detectstripangles %%token, %%opening, %%closing, %1
   547                              <3>   %assign %%level %%level + ? %+ %%opening
   548                              <3>   %assign %%level %%level - ? %+ %%closing
   549                              <3>   %ifidni ? %+ %%token, DS
   550                              <3>    %assign %%temp %%temp | 2
   551                              <3>   %else
   552                              <3>    %ifidni ? %+ %%token, ES
   553                              <3>     %assign %%temp %%temp | 4
   554                              <3>    %else
   555                              <3>     %error ***** Invalid register reg in DOSAssume *****
   556                              <3>    %endif
   557                              <3>   %endif
   558                              <3>   %assign %%amount %%amount - 1
   559                              <3>   %rotate 1
   560                              <3>   %if %%level <= 0
   561                              <3>    %exitrep
   562                              <3>   %endif
   563                              <3>  %endrep
   564                              <3> 
   565                              <3> 	PUSH    AX
   566                              <3> 	MOV     AX, %%temp
   567                              <3> 	PUSH    AX
   568                              <3> %IF SHAREF
   569                              <3> 	MOV     AX,OFFSET %%a
   570                              <3> %ELSE
   571                              <3> 	MOV     AX,OFFSET %%a wrt DOSGroup
   572                              <3> %ENDIF
   573                              <3> 	PUSH    AX
   574                              <3> 	Invoke  SegCheck
   575                              <3> 	POP     AX
   576                              <3> %IFN SHAREF
   577                              <3> 	[section Table]
   578                              <3> %ELSE
   579                              <3> 	JMP     SHORT %%b
   580                              <3> %ENDIF
   581                              <3> %%a:
   582                              <3>  %rep %%amount
   583                              <3>         DB      %1
   584                              <3>   %rotate 1
   585                              <3>  %endrep
   586                              <3> 	db 0
   587                              <3> %IFN SHAREF
   588                              <3> 	__SECT__
   589                              <3> %ELSE
   590                              <3> %%b:
   591                              <3> %ENDIF
   592                              <3> ;IRP r,<reglist>
   593                              <3> ;    ASSUME  r:DOSGroup
   594                              <3> ;ENDM
   595                              <3> %endmacro
   596                              <3> %ELSE
   597                              <3> %imacro DOSAssume 3-*.nolist
   598                              <3> ;DOSAssume   Macro   reg,reglist,message
   599                              <3> ;IRP r,<reglist>
   600                              <3> ;    ASSUME  r:DOSGroup
   601                              <3> ;ENDM
   602                              <3> %endmacro
   603                              <3> %ENDIF
   604                              <3> 
   605                              <3> BREAK   <ASSERT - make assertions about registers>
   606                              <3> 
   607                              <3> %if 0
   608                              <3> ;IF DEBUG
   609                              <3> Assert  MACRO   kind, objs, message
   610                              <3> 	LOCAL   a,b
   611                              <3>     IFIDN   <kind>,<Z>
   612                              <3> 	CMP     objs,0
   613                              <3> 	JZ      a
   614                              <3> 	fmt <>,<>,<message>
   615                              <3> a:
   616                              <3>     ELSE
   617                              <3> 	IFIDN   <kind>,<NZ>
   618                              <3> 	CMP     objs,0
   619                              <3> 	JNZ     a
   620                              <3> 	fmt <>,<>,<message>
   621                              <3> a:
   622                              <3> 	ELSE
   623                              <3>     PUSH    AX
   624                              <3> 	    IRP obj,<objs>
   625                              <3> 	PUSH    obj
   626                              <3> 	    ENDM
   627                              <3> 	    IF SHAREF
   628                              <3>     MOV     AX,OFFSET b
   629                              <3> 	    ELSE
   630                              <3>     MOV     AX,OFFSET DOSGroup:b
   631                              <3> 	    ENDIF
   632                              <3>     PUSH    AX
   633                              <3> 	    IFIDN   <kind>,<ISBUF>
   634                              <3> 	Invoke  BUFCheck
   635                              <3> 	    ENDIF
   636                              <3> 	    IFIDN   <kind>,<ISSFT>
   637                              <3> 	Invoke  SFTCheck
   638                              <3> 	    ENDIF
   639                              <3> 	    IFIDN   <kind>,<ISDPB>
   640                              <3> 	Invoke  DPBCheck
   641                              <3> 	    ENDIF
   642                              <3>     POP     AX
   643                              <3> 	    IF SHAREF
   644                              <3>     JMP SHORT a
   645                              <3> b   DB  Message,0
   646                              <3> a:
   647                              <3> 	    ELSE
   648                              <3> Table   segment
   649                              <3> b   db  Message,0
   650                              <3> Table   ends
   651                              <3> 	    ENDIF
   652                              <3> 	ENDIF
   653                              <3>     ENDIF
   654                              <3> ENDM
   655                              <3> %ELSE
   656                              <3> %imacro Assert 0-*.nolist
   657                              <3> %endmacro
   658                              <3> %ENDIF
   659                              <3> 
   660                              <3> %ifndef Installed
   661                              <3>  %idefine Installed 1
   662                              <3> %endif
   663                              <3> 
   664                              <3> Break   <CallInstall - hook to installable pieces>
   665                              <3> 
   666                              <3> %imacro CallInstall 3-*.nolist
   667                              <3> ;CallInstall MACRO   name,mpx,fn,save,restore
   668                              <3> %define %%name %1
   669                              <3> %assign %%mpx %2
   670                              <3> %assign %%fn %3
   671                              <3> %IF Installed
   672                              <3>  %rotate 3
   673                              <3>  %assign %%level 0
   674                              <3>  %assign %%amountsaved 0
   675                              <3>  %rep %0 - 3
   676                              <3>   %ifnempty %1
   677                              <3>    detectstripangles %%token, %%opening, %%closing, %1
   678                              <3>    %assign %%level %%level + ? %+ %%opening
   679                              <3>    %assign %%level %%level - ? %+ %%closing
   680                              <3>    SaveReg ? %+ %%token
   681                              <3>   %endif
   682                              <3>   %assign %%amountsaved %%amountsaved + 1
   683                              <3>   %rotate 1
   684                              <3>   %if %%level <= 0
   685                              <3>    %exitrep
   686                              <3>   %endif
   687                              <3>  %endrep
   688                              <3> 	MOV     AX,(%%mpx << 8) + %%fn
   689                              <3> 	INT     2Fh
   690                              <3>  %assign %%level 0
   691                              <3>  %assign %%amountrestored 0
   692                              <3>  %rep %0 - 3 - %%amountsaved
   693                              <3>   %ifnempty %1
   694                              <3>    detectstripangles %%token, %%opening, %%closing, %1
   695                              <3>    %assign %%level %%level + ? %+ %%opening
   696                              <3>    %assign %%level %%level - ? %+ %%closing
   697                              <3>    RestoreReg ? %+ %%token
   698                              <3>   %endif
   699                              <3>   %assign %%amountrestored %%amountrestored + 1
   700                              <3>   %rotate 1
   701                              <3>   %if %%level <= 0
   702                              <3>    %exitrep
   703                              <3>   %endif
   704                              <3>  %endrep
   705                              <3>  %if %%level > 0 || %0 != 3 + %%amountsaved + %%amountrestored
   706                              <3>   %error Wrong amount saved or restored
   707                              <3>  %endif
   708                              <3> %ELSE
   709                              <3> 	Invoke  %%name
   710                              <3> %ENDIF
   711                              <3> %endmacro
   712                              <3> 
   713                              <3> Break   <Stack frame manipulators>
   714                              <3> 
   715                              <3> %imacro localvar 2.nolist
   716                              <3> %ifidni %2, BYTE
   717                              <3>  %assign ?frame ?frame + 1
   718                              <3>  %assign %%a ?frame
   719                              <3>  labelsize %1, byte, bp - %%a
   720                              <3> %else
   721                              <3>  %ifidni %2, WORD
   722                              <3>   %assign ?frame ?frame + 2
   723                              <3>   %assign %%a ?frame
   724                              <3>   labelsize %1, word, bp - %%a
   725                              <3>  %else
   726                              <3>   %ifidni %2, DWORD
   727                              <3>    %assign ?frame ?frame + 4
   728                              <3>    %assign %%a ?frame
   729                              <3>    labelsize %1 %+ l, word, bp - %%a
   730                              <3>    labelsize %1 %+ h, word, bp - %%a + 2
   731                              <3>    labelsize %1, dword, bp - %%a
   732                              <3>   %else
   733                              <3>    %assign ?frame ?frame + %2
   734                              <3>    %assign %%a ?frame
   735                              <3>    labelsize %1, byte, bp - %%a
   736                              <3>   %endif
   737                              <3>  %endif
   738                              <3> %endif
   739                              <3> %endmacro
   740                              <3> 
   741                              <3> %imacro enter 0.nolist
   742                              <3> 	push    bp
   743                              <3> 	mov     bp,sp
   744                              <3> 	sub     sp,?frame
   745                              <3> %endmacro
   746                              <3> 
   747                              <3> %imacro leave 0.nolist
   748                              <3> 	mov     sp,bp
   749                              <3> 	pop     bp
   750                              <3> %endmacro
   751                              <3> 
   752                              <3> 
   753                              <3> %imacro argvar 2.nolist
   754                              <3> %ifidni %2, BYTE
   755                              <3>  %assign %%a ?aframe
   756                              <3>  %assign ?aframe ?aframe + 1
   757                              <3>  labelsize %1, byte, bp + %%a
   758                              <3> %else
   759                              <3>  %ifidni %2, WORD
   760                              <3>   %assign %%a ?aframe
   761                              <3>   %assign ?aframe ?aframe + 2
   762                              <3>   labelsize %1, word, bp + %%a
   763                              <3>  %else
   764                              <3>   %ifidni %2, DWORD
   765                              <3>    %assign %%a ?aframe
   766                              <3>    %assign ?aframe ?aframe + 4
   767                              <3>    labelsize %1 %+ l, word, bp + %%a
   768                              <3>    labelsize %1 %+ h, word, bp + %%a + 2
   769                              <3>    labelsize %1, dword, bp + %%a
   770                              <3>   %else
   771                              <3>    %assign %%a ?aframe
   772                              <3>    %assign ?aframe ?aframe + %2
   773                              <3>    labelsize %1, byte, bp + %%a
   774                              <3>   %endif
   775                              <3>  %endif
   776                              <3> %endif
   777                              <3> %endmacro
   778                              <3> 
   779                              <3> BREAK   <errnz - generate compilation errors>
   780                              <3> 
   781                              <3> %imacro errnz 1.nolist
   782                              <3> detectstripangles %%token, %%opening, %%closing, %1
   783                              <3> %if ? %+ %%token
   784                              <3>     %error %1 <> 0
   785                              <3> %endif
   786                              <3> %endmacro
   787                              <3> 
   788                              <3> %endif
    38                              <2> 
    39                              <2> %include "versiona.mac"
     1                              <3> 
     2                              <3> major_version	    equ     4	    ;Major DOS version
     3                              <3> minor_version	    equ     00	    ;Minor DOS Version
     4                              <3> 
     5                              <3> MINOR_VERSION equ minor_version	; NASM port equate
     6                              <3> MAJOR_VERSION equ major_version	; NASM port equate
     7                              <3> expected_version    equ     (MINOR_VERSION << 8)+MAJOR_VERSION
     8                              <3> 
     9                              <3> alt_major_version    equ     5	    ;Major DOS version
    10                              <3> alt_minor_version    equ     26	    ;Minor DOS Version
    11                              <3> 
    12                              <3> alt_expected_version    equ     (alt_minor_version << 8) + alt_major_version
    13                              <3> 
    14                              <3> new_major_version    equ     5	    ;Major DOS version
    15                              <3> new_minor_version    equ     38	    ;Minor DOS Version
    16                              <3> new_expected_version    equ     (new_minor_version << 8) + new_major_version
    17                              <3> 
    18                              <3>        %warning out: ... for DOS Version 4.00 ...
    18          ******************  <3>  warning: out: ... for DOS Version 4.00 ... [-w+user]
    19                              <3> 
    20                              <3>        ;******************************
    21                              <3>        ;Each assembler program should:
    22                              <3>        ;  mov ah,030h			;DOS Get Version function
    23                              <3>        ;  int 021h			;Version ret. in AX,minor version first
    24                              <3>        ;  cmp ax,expected_version	;ALL utilities should check for an
    25                              <3>        ;  jne error_handler		; EXACT version match.
    26                              <3>        ;******************************
    27                              <3> 
    40                              <2> 
    41                              <2> BREAK <Control character definitions>
    42                              <2> 
    43                              <2> c_DEL	    EQU     7Fh 		;    ASCII rubout or delete previous char
    44                              <2> c_BS	    EQU     08h 		; ^H ASCII backspace
    45                              <2> c_CR	    EQU     0Dh 		; ^M ASCII carriage return
    46                              <2> c_LF	    EQU     0Ah 		; ^J ASCII linefeed
    47                              <2> c_ETB	    EQU     17h 		; ^W ASCII end of transmission
    48                              <2> c_NAK	    EQU     15h 		; ^U ASCII negative acknowledge
    49                              <2> c_ETX	    EQU     03h 		; ^C ASCII end of text
    50                              <2> c_HT	    EQU     09h 		; ^I ASCII tab
    51                              <2> 
    52                              <2> BREAK <Read This and Weep>
    53                              <2> 
    54                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    55                              <2> ;									   ;
    56                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    57                              <2> ;									   ;
    58                              <2> ; Certain structures, constants and system  calls  below  are  private	to ;
    59                              <2> ; the DOS  and	are  extremely	version-dependent.  They may change at any ;
    60                              <2> ; time at  the	implementors'  whim.   As  a  result,  they  must  not  be ;
    61                              <2> ; documented to  the  general  public.	 If  an  extreme case arises, they ;
    62                              <2> ; must be documented with this warning. 				   ;
    63                              <2> ;									   ;
    64                              <2> ; Those structures and constants that are subject to  the  above  will	be ;
    65                              <2> ; marked and bracketed with the flag:					   ;
    66                              <2> ;									   ;
    67                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    68                              <2> ;									   ;
    69                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    70                              <2> 
    71                              <2> %include "bpb.mac"
     1                              <3> 	%warning out: BPB.INC...
     1          ******************  <3>  warning: out: BPB.INC... [-w+user]
     2                              <3> ;	SCCSID = @(#)BPB.ASM	1.1 85/04/29
     3                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     4                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     5                              <3> ;									   ;
     6                              <3> 
     7                              <3> ; BIOS PARAMETER BLOCK DEFINITION
     8                              <3> ; THIS STRUCTURE IS USED TO BUILD A FULL DPB
     9                              <3> 
    10                              <3> BPBLOCK STRUC
    11 00000000 ????                <3> BPSECSZ DW	?			; SIZE IN BYTES OF PHYSICAL SECTOR
    12 00000002 ??                  <3> BPCLUS	DB	?			; SECTORS/ALLOC UNIT
    13 00000003 ????                <3> BPRES	DW	?			; NUMBER OF RESERVED SECTORS
    14 00000005 ??                  <3> BPFTCNT DB	?			; NUMBER OF FATS
    15 00000006 ????                <3> BPDRCNT DW	?			; NUMBER OF DIRECTORY ENTRIES
    16 00000008 ????                <3> BPSCCNT DW	?			; TOTAL NUMBER OF SECTORS
    17 0000000A ??                  <3> BPMEDIA DB	?			; MEDIA DESCRIPTOR BYTE
    18 0000000B ????                <3> BPFTSEC DW	?			; NUMBER OF SECTORS TAKEN UP BY ONE FAT
    19                              <3> BPBLOCK ENDS
    20                              <3> 
    21                              <3> A_BPB			STRUC
    22 00000000 ????                <3> BPB_BYTESPERSECTOR	DW	?
    23 00000002 ??                  <3> BPB_SECTORSPERCLUSTER	DB	?
    24 00000003 ????                <3> BPB_RESERVEDSECTORS	DW	?
    25 00000005 ??                  <3> BPB_NUMBEROFFATS	DB	?
    26 00000006 ????                <3> BPB_ROOTENTRIES 	DW	?
    27 00000008 ????                <3> BPB_TOTALSECTORS	DW	?
    28 0000000A ??                  <3> BPB_MEDIADESCRIPTOR	DB	?
    29 0000000B ????                <3> BPB_SECTORSPERFAT	DW	?
    30 0000000D ????                <3> BPB_SECTORSPERTRACK	DW	?
    31 0000000F ????                <3> BPB_HEADS		DW	?
    32 00000011 ????                <3> BPB_HIDDENSECTORS	DW	?
    33 00000013 ????                <3> 			DW	?
    34 00000015 ????                <3> BPB_BIGTOTALSECTORS	DW	?
    35 00000017 ????                <3> 			DW	?
    36 00000019 ????????????        <3> 			DB	6 DUP(?)
    37                              <3> A_BPB			ENDS
    38                              <3> ;									   ;
    39                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    40                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    72                              <2> 
    73                              <2> %include "buffer.mac"
     1                              <3> %include "buf2sw.mac"
     1                              <4> %define BUF2 1
     2                              <3> 
     3                              <3> ;	SCCSID = @(#)buffer.asm 1.1 85/04/09
     4                              <3> BREAK <Disk I/O Buffer Header>
     5                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     6                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     7                              <3> ;									   ;
     8                              <3> 
     9                              <3> %ifdef BUF2
    10                              <3> 
    11                              <3> ; Field definition for I/O buffer information
    12                              <3> 
    13                              <3> BUFFINFO        STRUC
    14 00000000 ????????            <3> NEXTBUF         DD      ?       ; Pointer to next buffer in list
    15                              <3> ; The next two items are often refed as a word
    16                              <3> buf_ID:
    17 00000004 ??                  <3> BUFDRV          DB      ?       ; Logical drive # assoc with buffer FF = free
    18                              <3> buf_flags:
    19 00000005 ??                  <3> BUFDATAFLAG	db	?
    20 00000006 ??                  <3> BUFPRI          DB      ?       ; Buffer selection priority (see EQUs below)
    21 00000007 ??                  <3> 	alignb 2
    22                              <3> buf_sector:
    23 00000008 ????????            <3> BUFSECNO        dd      ?       ; Sector number of buffer
    24                              <3> 	alignb 2
    25 0000000C ????????            <3> BUFDRVDP        DD      ?       ; Pointer to drive parameters
    26                              <3> BUFFINFO        ENDS
    27                              <3> 
    28                              <3> BUFINSIZ        EQU     BUFFINFO_struc_size
    29                              <3>                                 ; Size of structure in bytes
    30                              <3> BUFINSIZE equ BUFINSIZ
    31                              <3> 
    32                              <3> FREEPRI EQU     0
    33                              <3> LBRPRI  EQU     2               ; Last byte of buffer read
    34                              <3> LBWPRI  EQU     4               ; Last byte written
    35                              <3> RPRI    EQU     6               ; Read but not last byte
    36                              <3> WPRI    EQU     8               ; Written but not last byte
    37                              <3> DIRPRI  EQU     15              ; Directory Sector
    38                              <3> FATPRI  EQU     30              ; FAT sector
    39                              <3> 
    40                              <3> buf_dirty	EQU	01000000B
    41                              <3> buf_isDATA	EQU	00001000B
    42                              <3> buf_isDIR	EQU	00000100B
    43                              <3> buf_isFAT	EQU	00000010B
    44                              <3> buf_type_0	EQU	11110001B	; AND sets type to "none"
    45                              <3> 
    46                              <3> %else
    47                              <3> 
    48                              <3> ; Field definition for I/O buffer information
    49                              <3> 
    50                              <3> BUFFINFO	STRUC
    51                              <3> buf_next	DW	?		; Pointer to next buffer in list
    52                              <3> buf_prev	DW	?		; Pointer to prev buffer in list
    53                              <3> buf_ID		DB	?		; Drive of buffer (bit 7 = 0)
    54                              <3> 					; SFT table index (bit 7 = 1)
    55                              <3> 					; = FFH if buffer free
    56                              <3> buf_flags	DB	?		; Bit 7 = 1 if Remote file buffer
    57                              <3> 					;	= 0 if Local device buffer
    58                              <3> 					; Bit 6 = 1 if buffer dirty
    59                              <3> 					; Bit 5 = Reserved
    60                              <3> 					; Bit 4 = Search bit (bit 7 = 1)
    61                              <3> 					; Bit 3 = 1 if buffer is DATA
    62                              <3> 					; Bit 2 = 1 if buffer is DIR
    63                              <3> 					; Bit 1 = 1 if buffer is FAT
    64                              <3> 					; Bit 0 = Reserved
    65                              <3> buf_sector	DD	?		; Sector number of buffer (bit 7 = 0)
    66                              <3> ; The next two items are often refed as a word (bit 7 = 0)
    67                              <3> buf_wrtcnt	DB	?		; For FAT sectors, # times sector written out
    68                              <3> buf_wrtcntinc	DW	?		; "   "     "   , # sectors between each write
    69                              <3> buf_DPB 	DD	?		; Pointer to drive parameters
    70                              <3> buf_fill	DW	?		; How full buffer is (bit 7 = 1)
    71                              <3> buf_reserved	DB	?		; make DWORD boundary for 386
    72                              <3> BUFFINFO	ENDS
    73                              <3> 
    74                              <3> labelsize buf_offset, dword, buf_sector
    75                              <3> 					;For bit 7 = 1, this is the byte
    76                              <3> 					;offset of the start of the buffer in
    77                              <3> 					;the file pointed to by buf_ID.  Thus
    78                              <3> 					;the buffer starts at location
    79                              <3> 					;buf_offset in the file and contains
    80                              <3> 					;buf_fill bytes.
    81                              <3> 
    82                              <3> BUFINSIZ	EQU	BUFFINFO_struc_size
    83                              <3> 					; Size of structure in bytes
    84                              <3> 
    85                              <3> buf_Free	EQU	0FFh		; buf_id of free buffer
    86                              <3> 
    87                              <3> ;Flag byte masks
    88                              <3> buf_isnet	EQU	10000000B
    89                              <3> buf_dirty	EQU	01000000B
    90                              <3> 
    91                              <3> buf_isDATA	EQU	00001000B
    92                              <3> buf_isDIR	EQU	00000100B
    93                              <3> buf_isFAT	EQU	00000010B
    94                              <3> buf_type_0	EQU	11110001B	; AND sets type to "none"
    95                              <3> 
    96                              <3> buf_NetID	EQU	BUFINSIZ
    97                              <3> 
    98                              <3> ;
    99                              <3> ; Buffer Hash Entry Structure
   100                              <3> 
   101                              <3> BUFFER_HASH_ENTRY	STRUC		; DOS 4.00
   102                              <3> EMS_PAGE_NUM	DW	?		; logical page number for EMS handle
   103                              <3> BUFFER_BUCKET	DD	 ?		; pointer to buffers
   104                              <3> DIRTY_COUNT	DB	 ?		; number of dirty buffers
   105                              <3> BUFFER_RESERVED DB	 ?		; reserved
   106                              <3> BUFFER_HASH_ENTRY	ENDS
   107                              <3> 
   108                              <3> MaxBuffinBucket EQU	15		; Max number of buffers per bucket
   109                              <3> MaxBucketinPage EQU	 2		; Max number of buckets per 16kb page
   110                              <3> 
   111                              <3> %endif
   112                              <3> 
   113                              <3> ;									   ;
   114                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   115                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    74                              <2> 
    75                              <2> BREAK <User stack inside of system call and SysVars>
    76                              <2> ; Location of user registers relative user stack pointer
    77                              <2> 
    78                              <2> user_environ	STRUC
    79 00000000 ????                <2> user_AX     DW	    ?
    80 00000002 ????                <2> user_BX     DW	    ?
    81 00000004 ????                <2> user_CX     DW	    ?
    82 00000006 ????                <2> user_DX     DW	    ?
    83 00000008 ????                <2> user_SI     DW	    ?
    84 0000000A ????                <2> user_DI     DW	    ?
    85 0000000C ????                <2> user_BP     DW	    ?
    86 0000000E ????                <2> user_DS     DW	    ?
    87 00000010 ????                <2> user_ES     DW	    ?
    88 00000012 ????                <2> user_IP     DW	    ?
    89 00000014 ????                <2> user_CS     DW	    ?
    90 00000016 ????                <2> user_F	    DW	    ?
    91                              <2> user_environ	ENDS
    92                              <2> 
    93                              <2> %include "sysvar.mac"
     1                              <3> ;	SCCSID = @(#)sysvar.asm 1.1 85/04/10
     2                              <3> %include "version.mac"
     1                              <4> ; Some modules really want TRUE to be 0FFH.  Best to let them have their way.
     2                              <4> 	TRUE	   EQU	   0FFFFh
     3                              <4> 	TRUEBYTE   EQU     0FFh
     4                              <4> 	FALSE	   EQU	   0
     5                              <4> 
     6                              <4> ;
     7                              <4> ; Use the following switches to control cmacros.inc
     8                              <4> ;
     9                              <4> ?PLM       equ       0
    10                              <4> ?WIN       equ       0
    11                              <4> 
    12                              <4> memS       EQU     1			; Small model
    13                              <4> ;
    14                              <4> ; Use the switches below to produce the standard Microsoft version or the IBM
    15                              <4> ; version of the operating system
    16                              <4> ;
    17                              <4> ; The below chart will indicate how to set the switches to build the various
    18                              <4> ; versions
    19                              <4> ;
    20                              <4> ;                     IBMVER          IBMCOPYRIGHT
    21                              <4> ; --------------------------------------------------------
    22                              <4> ;  IBM Version   |     TRUE              TRUE
    23                              <4> ; --------------------------------------------------------
    24                              <4> ;  MS Version    |     FALSE             FALSE
    25                              <4> ; --------------------------------------------------------
    26                              <4> ;  Clone Version |     TRUE              FALSE
    27                              <4> ;
    28                              <4> IBMVER     EQU     TRUE
    29                              <4> IBMCOPYRIGHT EQU   FALSE
    30                              <4> 
    31                              <4> BUFFERFLAG	EQU	~ IBMCOPYRIGHT
    32                              <4> 
    33                              <4> %ifndef	MSVER	
    34                              <4> MSVER      EQU     ~ IBMVER
    35                              <4> %endif
    36                              <4> IBM	   EQU	   IBMVER
    37                              <4> ;
    38                              <4> ;
    39                              <4> 	%IF IBMVER
    40                              <4> 	    %IF IBMCOPYRIGHT
    41                              <4>               %warning out: ... IBM version build switch on ...
    42                              <4> 	    %ELSE
    43                              <4> 	      %warning out: ... CLONE version build switch on ...
    43          ******************  <4>  warning: out: ... CLONE version build switch on ... [-w+user]
    44                              <4> 	    %ENDIF
    45                              <4> 	%ELSE
    46                              <4> 	    %IFN IBMCOPYRIGHT
    47                              <4> 	      %warning out: ... MS version build switch on ...
    48                              <4> 	    %ELSE
    49                              <4> 	      %warning out: !!!!!!!!!  VERSION SWITCHES SET INCORECTLY  !!!!!!!!!
    50                              <4> 	      %warning out: !!!!!!!!! CHECK SETTINGS IN INC\VERSION.INC !!!!!!!!!
    51                              <4> 	    %ENDIF
    52                              <4> 	%ENDIF   
    53                              <4> ;
    54                              <4> ;
    55                              <4> ;***************************************************************************
    56                              <4> ;*          The following switches are for DBCS or SBCS support            *
    57                              <4> ;*                                                                         *
    58                              <4> ;*                     Set INTERNAT EQU TRUE FOR DBCS                      *
    59                              <4> ;*                     Set INTERNAT EQU FALSE FOR SBCS                     *
    60                              <4> ;*                                                                         *
    61                              <4> ;***************************************************************************
    62                              <4> ;
    63                              <4> IBMJAPVER  EQU	   FALSE		;If TRUE set KANJI true also
    64                              <4> 
    65                              <4> ;
    66                              <4> ; Switch INTERNAT for DBCS support
    67                              <4> ;
    68                              <4> INTERNAT   EQU	   FALSE
    69                              <4> ;
    70                              <4> 	%IF INTERNAT
    71                              <4> %ifndef KANJI
    72                              <4> KANJI	   EQU	   TRUE
    73                              <4> %endif
    74                              <4> IBMJAPAN   EQU	   TRUE
    75                              <4> 	%ELSE
    76                              <4> %ifndef KANJI
    77                              <4> KANJI	   EQU	   FALSE
    78                              <4> %endif
    79                              <4> IBMJAPAN   EQU	   FALSE
    80                              <4> 	%ENDIF
    81                              <4> 
    82                              <4> %ifndef altvect				; avoid jerking off vector.inc
    83                              <4> ALTVECT    EQU	   FALSE		;Switch to build ALTVECT version
    84                              <4> %endif
    85                              <4> 
    86                              <4> ;
    87                              <4> ; Country code switches
    88                              <4> ; The default contry code is assumed as USA.
    89                              <4> ;
    90                              <4> 	%IF INTERNAT
    91                              <4>  KOREA	   EQU	   TRUE
    92                              <4>  JAPAN	   EQU	   FALSE
    93                              <4> 	%ELSE
    94                              <4>  KOREA	   EQU	   FALSE
    95                              <4>  JAPAN	   EQU	   FALSE
    96                              <4> 	%ENDIF
    97                              <4> ;
    98                              <4> 		%IF INTERNAT
    99                              <4> %warning out: Internat(ECS) version build switch on
   100                              <4> 		%ENDIF
     3                              <3> 
     4                              <3> SysInitVars STRUC
     5 00000000 ????????            <3> SYSI_DPB	    DD	    ?		; DPB chain
     6 00000004 ????????            <3> SYSI_SFT	    DD	    ?		; SFT chain
     7 00000008 ????????            <3> SYSI_CLOCK	    DD	    ?		; CLOCK device
     8 0000000C ????????            <3> SYSI_CON	    DD	    ?		; CON device
     9 00000010 ????                <3> SYSI_MAXSEC	    DW	    ?		; maximum sector size
    10 00000012 ????????            <3> SYSI_BUF	    DD	    ?		; points to Hashinitvar
    11 00000016 ????????            <3> SYSI_CDS	    DD	    ?		; CDS list
    12 0000001A ????????            <3> SYSI_FCB	    DD	    ?		; FCB chain
    13 0000001E ????                <3> SYSI_Keep	    DW	    ?		; keep count
    14 00000020 ??                  <3> SYSI_NUMIO	    DB	    ?		; Number of block devices
    15 00000021 ??                  <3> SYSI_NCDS	    DB	    ?		; number of CDS's
    16 00000022 ????????            <3> SYSI_DEV	    DD	    ?		; device list
    17 00000026 ????                <3> SYSI_ATTR	    DW	    ?		; null device attribute word
    18 00000028 ????                <3> SYSI_STRAT	    DW	    ?		; null device strategy entry point
    19 0000002A ????                <3> SYSI_INTER	    DW	    ?		; null device interrupt entry point
    20 0000002C ????????????????    <3> SYSI_NAME	    DB	 8 DUP(?)	; null device name
    21 00000034 ??                  <3> SYSI_SPLICE	    DB	    ?		; TRUE -> splicees being done
    22 00000035 ????                <3> SYSI_IBMDOS_SIZE    DW	    ?		; DOS size in paragraphs
    23 00000037 ????????            <3> SYSI_IFS_DOSCALL@   DD	    ?		; IFS DOS service rountine entry
    24 0000003B ????????            <3> SYSI_IFS	    DD	    ?		; IFS header chain
    25 0000003F ????????            <3> SYSI_BUFFERS	    DW	    ?,? 	; BUFFERS= values (m,n)
    26 00000043 ??                  <3> SYSI_BOOT_DRIVE     DB	    ?		; boot drive A=1 B=2,..
    27 00000044 ??                  <3> SYSI_DWMOVE	    DB	    ?		; 1 if 386 machine
    28 00000045 ????                <3> SYSI_EXT_MEM	    DW	    ?		; Extended memory size in KB.
    29                              <3> SysInitVars ENDS
    30                              <3> 
    31                              <3> ;This is added for more information exchage between DOS, BIOS.
    32                              <3> ;DOS will give the pointer to SysInitTable in ES:DI. - J.K. 5/29/86
    33                              <3> SysInitVars_Ext struc
    34 00000000 ????????            <3> SYSI_InitVars		DD	?	; Points to the above structure.
    35 00000004 ????????            <3> SYSI_Country_Tab	DD	?	; DOS_Country_cdpg_info
    36                              <3> SysInitVars_Ext ends
    37                              <3> 
    38                              <3> ;The SYSI_BUF of SysInitVars points to the follwong structure
    39                              <3> EMS_MAP_BUFF_SIZE      EQU	12	; EMS map buffer size
    40                              <3> 
    41                              <3> Buffinfo    STRUC
    42 00000000 ????????            <3> Hash_ptr	 DD	 ?		     ; pointer to Hash table
    43 00000004 ????                <3> Hash_count	 DW	 ?		     ; number of Hash entries
    44 00000006 ????????            <3> Cache_ptr	 DD	 ?		     ; pointer to secondary cache
    45 0000000A ????                <3> Cache_count	 DW	 ?		     ; number of secondary cache entries
    46                              <3> 
    47                              <3> %IF	BUFFERFLAG
    48                              <3> 
    49 0000000C ??                  <3> EMS_SAFE_FLAG	DB	?
    50 0000000D ????????            <3> EMS_LAST_PAGE	DW	?, ?
    51 00000011 ????????            <3> EMS_FIRST_PAGE	DW	?, ?
    52 00000015 ????                <3> EMS_NPA640	DW	?
    53                              <3> 
    54                              <3> %ENDIF
    55                              <3> 
    56 00000017 ??                  <3> EMS_mode	 DB	 ?		     ; no EMS = -1
    57 00000018 ????                <3> EMS_handle	 DW	 ?		     ; EMS handle for buffers
    58 0000001A ????                <3> EMS_PageFrame_Number	DW   ?		     ; EMS page frame number
    59 0000001C ????                <3> EMS_Seg_Cnt	 DW	 ?		     ; EMS segment count
    60 0000001E ????                <3> EMS_Page_Frame	 DW	 ?		     ; EMS page frame segment address
    61 00000020 ????                <3> EMS_reserved	 DW	 ?		     ; EMS segment count
    62                              <3> 
    63                              <3> %IF	BUFFERFLAG
    64 00000022 ??                  <3> EMS_Map_Buff	 DB	 ?  ; map buffer
    65                              <3> %ELSE
    66                              <3> EMS_Map_Buff	DB	12 dup(?)
    67                              <3> %ENDIF
    68                              <3> 
    69                              <3> Buffinfo    ENDS
    70                              <3> 
    71                              <3> 
    72                              <3> 
    73                              <3> 
    74                              <3> 
    75                              <3> 
    76                              <3> 
    77                              <3> 
    94                              <2> 
    95                              <2> %include "vector.mac"
     1                              <3> ;	SCCSID = @(#)vector.asm	1.1 85/04/10
     2                              <3> BREAK <interrupt definitions>
     3                              <3> 
     4                              <3> ;Asmvar	AltVect
     5                              <3> %ifndef AltVect
     6                              <3>  %iassign AltVect 0
     7                              <3> %endif
     8                              <3> 
     9                              <3> INTTAB		EQU	20H
    10                              <3> inttab equ INTTAB	; NASM port equate
    11                              <3> INTBASE 	EQU	4 * inttab
    12                              <3> ENTRYPOINT	EQU	INTBASE+40H
    13                              <3> 
    14                              <3> 	%IF	ALTVECT
    15                              <3> ALTTAB	EQU	0F0H
    16                              <3> ALTBASE EQU	4 * ALTTAB
    17                              <3> 	%ENDIF
    18                              <3> 
    19                              <3> ;
    20                              <3> ; interrupt assignments
    21                              <3> ;
    22                              <3> 	%IFN ALTVECT
    23                              <3> int_abort	    EQU     INTTAB	; abort process
    24                              <3> int_command	    EQU     int_abort+1 ; call MSDOS
    25                              <3> int_terminate	    EQU     int_abort+2 ; int to terminate address
    26                              <3> int_ctrl_c	    EQU     int_abort+3 ; ^c trapper
    27                              <3> int_fatal_abort     EQU     int_abort+4 ; hard disk error
    28                              <3> int_disk_read	    EQU     int_abort+5 ; logical sector disk read
    29                              <3> int_disk_write	    EQU     int_abort+6 ; logical sector disk write
    30                              <3> int_keep_process    EQU     int_abort+7 ; terminate program and stay
    31                              <3> 					; resident
    32                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    33                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    34                              <3> ;									   ;
    35                              <3> int_spooler	    EQU     int_abort+8 ; spooler call
    36                              <3> int_fastcon	    EQU     int_abort+9 ; fast CON interrupt
    37                              <3> int_IBM 	    EQU     int_abort+10; critical section maintenance
    38                              <3> ;									   ;
    39                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    40                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    41                              <3> 	%ELSE
    42                              <3> int_abort	    EQU     INTTAB	; abort process
    43                              <3> int_command	    EQU     int_abort+1 ; call MSDOS
    44                              <3> int_terminate	    EQU     ALTTAB	; int to terminate address
    45                              <3> int_ctrl_c	    EQU     int_terminate+1 ; ^c trapper
    46                              <3> int_fatal_abort     EQU     int_terminate+2 ; hard disk error
    47                              <3> int_disk_read	    EQU     int_abort+5 ; logical sector disk read
    48                              <3> int_disk_write	    EQU     int_abort+6 ; logical sector disk write
    49                              <3> int_keep_process    EQU     int_abort+7 ; terminate program and stay resident
    50                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    51                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    52                              <3> ;									   ;
    53                              <3> int_spooler	    EQU     int_terminate+3 ; spooler call
    54                              <3> int_fastcon	    EQU     int_abort+9 ; fast CON interrupt
    55                              <3> ;									   ;
    56                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    57                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    58                              <3> 	%ENDIF
    59                              <3> 
    60                              <3> addr_int_abort		EQU    4 * int_abort
    61                              <3> addr_int_command	EQU    4 * int_command
    62                              <3> addr_int_terminate	EQU    4 * int_terminate
    63                              <3> addr_int_ctrl_c 	EQU    4 * int_ctrl_c
    64                              <3> addr_int_fatal_abort	EQU    4 * int_fatal_abort
    65                              <3> addr_int_disk_read	EQU    4 * int_disk_read
    66                              <3> addr_int_disk_write	EQU    4 * int_disk_write
    67                              <3> addr_int_keep_process	EQU    4 * int_keep_process
    68                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    69                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    70                              <3> ;									   ;
    71                              <3> addr_int_spooler	EQU    4 * int_spooler
    72                              <3> addr_int_fastcon	EQU    4 * int_fastcon
    73                              <3> addr_int_IBM		EQU    4 * int_IBM
    74                              <3> ;									   ;
    75                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    76                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    96                              <2> 
    97                              <2> %include "mult.mac"
     1                              <3> ;	SCCSID = @(#)mult.asm	1.2 85/04/12
     2                              <3> Break <Critical section and Multiplex channels>
     3                              <3> 
     4                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <3> ;									   ;
     7                              <3> ; Critical section definitions
     8                              <3> ;
     9                              <3> ; These below are subject to leave-all sections
    10                              <3> critDisk    EQU     1			; Disk I/O critical section
    11                              <3> critDevice  EQU     2			; Device I/O critical section
    12                              <3> critShare   EQU     1			; Sharer I/O critical section
    13                              <3> critMem     EQU     1			; memory maintenance critical section
    14                              <3> critNet     EQU     5			; network critical section
    15                              <3> critSFT     EQU     1			; sft table allocation
    16                              <3> critIFS     EQU     6			; ifsfunc critical section
    17                              <3> ; These below are not subject to leave-all sections
    18                              <3> critASSIGN  EQU     8			; Assign has munged a system call
    19                              <3> ;									   ;
    20                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    21                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    22                              <3> 
    23                              <3> ;
    24                              <3> ; The current set of defined multiplex channels is (* means documented):
    25                              <3> ;
    26                              <3> ;   Channel(h)	Issuer		Receiver    Function
    27                              <3> ;      00	server		PSPRINT     print job control
    28                              <3> ;     *01	print/apps	PRINT	    Queueing of files
    29                              <3> ;      02	BIOS		REDIR	    signal open/close of printers
    30                              <3> ;
    31                              <3> ;      05	command 	REDIR	    obtain text of net int 24 message
    32                              <3> ;     *06	server/assign	ASSIGN	    Install check
    33                              <3> ;
    34                              <3> ;      08	external driver IBMBIO	    interface to internal routines
    35                              <3> ;
    36                              <3> ;      10	sharer/server	Sharer	    install check
    37                              <3> ;      11	DOS/server	Redir	    install check/redirection funcs
    38                              <3> ;      12	sharer/redir	DOS	    dos functions and structure maint
    39                              <3> ;      13	MSNET		MSNET	    movement of NCBs
    40                              <3> ;      13	external driver IBMBIO	    Reset_Int_13, allows installation
    41                              <3> ;					    of alternative INT_13 drivers after
    42                              <3> ;					    boot_up
    43                              <3> ;      14 (IBM) DOS		NLSFUNC     down load NLS country info,DOS 3.3
    44                              <3> ;      14 (MS)	APPS		POPUP	    MSDOS 4 popup screen functions
    45                              <3> ;      15	APPS		MSCDEX	    CD-ROM extensions interface
    46                              <3> ;      16	WIN386		WIN386	    Windows communications
    47                              <3> ;      17	Clipboard	WINDOWS     Clipboard interface
    48                              <3> ;     *18	Applications	MS-Manger   Toggle interface to manager
    49                              <3> ;      19	Shell
    50                              <3> ;      1A	Ansi.sys
    51                              <3> ;      1B	Fastopen,Vdisk	 IBMBIO     EMS INT 67H stub handler
    52                              <3> ;
    53                              <3> ;      AC	Graphics
    54                              <3> ;      AD	NLS (toronto)
    55                              <3> ;      AE
    56                              <3> ;      AF	Mode
    57                              <3> ;      B0	GRAFTABL	GRAFTABL
    58                              <3> ;
    59                              <3> 
    60                              <3> 
    61                              <3> ;MUX 00-3F reserverd for IBM
    62                              <3> ;MUX 80-BF reserverd for IBM
    63                              <3> ;MUX 40-7F reserved for Microsoft
    64                              <3> ;MUX C0-FF users
    65                              <3> 
    66                              <3> 
    67                              <3> 
    68                              <3> MultSHARE   EQU     10h 		; sharer
    69                              <3>     ;	1   MFT_enter
    70                              <3>     ;	2   MFTClose
    71                              <3>     ;	3   MFTclU
    72                              <3>     ;	4   MFTCloseP
    73                              <3>     ;	5   MFTCloN
    74                              <3>     ;	6   set_block
    75                              <3>     ;	7   clr_block
    76                              <3>     ;	8   chk_block
    77                              <3>     ;	9   MFT_get
    78                              <3>     ;	10  ShSave
    79                              <3>     ;	11  ShChk
    80                              <3>     ;	12  ShCol
    81                              <3>     ;	13  ShCloseFile
    82                              <3> 
    83                              <3> MultNET     EQU     11h 		; Network support
    84                              <3> MultIFS     EQU     11h 		; Network support
    85                              <3>     ;	1   IFS_RMDIR
    86                              <3>     ;	2   IFS_SEQ_RMDIR
    87                              <3>     ;	3   IFS_MKDIR
    88                              <3>     ;	4   IFS_SEQ_MKDIR
    89                              <3>     ;	5   IFS_CHDIR
    90                              <3>     ;	6   IFS_CLOSE
    91                              <3>     ;	7   IFS_COMMIT
    92                              <3>     ;	8   IFS_READ
    93                              <3>     ;	9   IFS_WRITE
    94                              <3>     ;	10  IFS_LOCK
    95                              <3>     ;	11  IFS_UNLOCK
    96                              <3>     ;	12  IFS_DISK_INFO
    97                              <3>     ;	13  IFS_SET_FILE_ATTRIBUTE
    98                              <3>     ;	14  IFS_SEQ_SET_FILE_ATTRIBUTE
    99                              <3>     ;	15  IFS_GET_FILE_INFO
   100                              <3>     ;	16  IFS_SEQ_GET_FILE_INFO
   101                              <3>     ;	17  IFS_RENAME
   102                              <3>     ;	18  IFS_SEQ_RENAME
   103                              <3>     ;	19  IFS_DELETE
   104                              <3>     ;	20  IFS_SEQ_DELETE
   105                              <3>     ;	21  IFS_OPEN
   106                              <3>     ;	22  IFS_SEQ_OPEN
   107                              <3>     ;	23  IFS_CREATE
   108                              <3>     ;	24  IFS_SEQ_CREATE
   109                              <3>     ;	25  IFS_SEQ_SEARCH_FIRST
   110                              <3>     ;	26  IFS_SEQ_SEARCH_NEXT
   111                              <3>     ;	27  IFS_SEARCH_FIRST
   112                              <3>     ;	28  IFS_SEARCH_NEXT
   113                              <3>     ;	29  IFS_ABORT
   114                              <3>     ;	30  IFS_ASSOPER
   115                              <3>     ;	31  Printer_SET_STRING
   116                              <3>     ;	32  IFSFlushBuf
   117                              <3>     ;	33  IFSBufWrite
   118                              <3>     ;	34  IFSResetEnvironment
   119                              <3>     ;	35  IFSSpoolCheck
   120                              <3>     ;	36  IFSSpoolClose
   121                              <3> 
   122                              <3> MultDOS     EQU     12h 		; DOS call back
   123                              <3>     ;	1   DOS_CLOSE
   124                              <3>     ;	2   RECSET
   125                              <3>     ;	3   Get DOSGROUP
   126                              <3>     ;	4   PATHCHRCMP
   127                              <3>     ;	5   OUT
   128                              <3>     ;	6   NET_I24_ENTRY
   129                              <3>     ;	7   PLACEBUF
   130                              <3>     ;	8   FREE_SFT
   131                              <3>     ;	9   BUFWRITE
   132                              <3>     ;	10  SHARE_VIOLATION
   133                              <3>     ;	11  SHARE_ERROR
   134                              <3>     ;	12  SET_SFT_MODE
   135                              <3>     ;	13  DATE16
   136                              <3>     ;	14  SETVISIT
   137                              <3>     ;	15  SCANPLACE
   138                              <3>     ;	16  SKIPVISIT
   139                              <3>     ;	17  StrCpy
   140                              <3>     ;	18  StrLen
   141                              <3>     ;	19  Ucase
   142                              <3>     ;	20  POINTCOMP
   143                              <3>     ;	21  CHECKFLUSH
   144                              <3>     ;	22  SFFromSFN
   145                              <3>     ;	23  GetCDSFromDrv
   146                              <3>     ;	24  Get_User_Stack
   147                              <3>     ;	25  GetThisDrv
   148                              <3>     ;	26  DriveFromText
   149                              <3>     ;	27  SETYEAR
   150                              <3>     ;	28  DSUM
   151                              <3>     ;	29  DSLIDE
   152                              <3>     ;	30  StrCmp
   153                              <3>     ;	31  initcds
   154                              <3>     ;	32  pjfnfromhandle
   155                              <3>     ;	33  $NameTrans
   156                              <3>     ;	34  CAL_LK
   157                              <3>     ;	35  DEVNAME
   158                              <3>     ;	36  Idle
   159                              <3>     ;	37  DStrLen
   160                              <3>     ;	38  NLS_OPEN	  DOS 3.3
   161                              <3>     ;	39  $CLOSE	  DOS 3.3
   162                              <3>     ;	40  NLS_LSEEK	  DOS 3.3
   163                              <3>     ;	41  $READ	  DOS 3.3
   164                              <3>     ;	42  FastInit	  DOS 4.0
   165                              <3>     ;	43  NLS_IOCTL	  DOS 3.3
   166                              <3>     ;	44  GetDevList	  DOS 3.3
   167                              <3>     ;	45  NLS_GETEXT	  DOS 3.3
   168                              <3>     ;	46  MSG_RETRIEVAL DOS 4.0
   169                              <3>     ;	47  FAKE_VERSION  DOS 4.0
   170                              <3>     ;
   171                              <3> NLSFUNC     EQU     14h 		; NLSFUNC CALL , DOS 3.3
   172                              <3>     ;	0   NLSInstall
   173                              <3>     ;	1   ChgCodePage
   174                              <3>     ;	2   GetExtInfo
   175                              <3>     ;	3   SetCodePage
   176                              <3>     ;	4   GetCntry
   177                              <3>     ;
   178                              <3> ;FASTOPEN is not chained through INT 2F   ; DOS 3.3 F.C.
   179                              <3> ;	  it calls Multdos 42 to set up an entry routine address
   180                              <3>     ;	0   Install status  (reserved)
   181                              <3>     ;	1   Lookup
   182                              <3>     ;	2   Insert
   183                              <3>     ;	3   Delete
   184                              <3>     ;	4   Purge	    (reserved)
    98                              <2> 
    99                              <2> BREAK <Disk map>
   100                              <2> ;  MSDOS partitions the disk into 4 sections:
   101                              <2> ;
   102                              <2> ;  phys sector 0:   +-------------------+
   103                              <2> ;	|	    | boot/reserved	|
   104                              <2> ;	|	    +-------------------+
   105                              <2> ;	|	    |  File allocation	|
   106                              <2> ;	v	    |	   table(s)	|
   107                              <2> ;		    |  (multiple copies |
   108                              <2> ;		    |	  are kept)	|
   109                              <2> ;		    +-------------------+
   110                              <2> ;		    |	  Directory	|
   111                              <2> ;		    +-------------------+
   112                              <2> ;		    |	  File space	|
   113                              <2> ;		    +-------------------+
   114                              <2> ;		    |	Unaddressable	|
   115                              <2> ;		    |  (to end of disk) |
   116                              <2> ;		    +-------------------+
   117                              <2> ;
   118                              <2> ; All partition boundaries are sector boundaries.  The size of the FAT is
   119                              <2> ; adjusted to maximize the file space addressable.
   120                              <2> 
   121                              <2> %include "dirent.mac"
     1                              <3> ;	SCCSID = @(#)dirent.asm 1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)dirent.asm 1.1 85/04/10
     3                              <3> Break <Directory entry>
     4                              <3> 
     5                              <3> ;
     6                              <3> ;	+---------------------------+
     7                              <3> ;	|  (12 BYTE) filename/ext   |	    0	    0
     8                              <3> ;	+---------------------------+
     9                              <3> ;	|     (BYTE) attributes     |	    11	    B
    10                              <3> ;	+---------------------------+
    11                              <3> ;	|    (10 BYTE) reserved     |	    12	    C
    12                              <3> ;	+---------------------------+
    13                              <3> ;	| (WORD) time of last write |	    22	    16
    14                              <3> ;	+---------------------------+
    15                              <3> ;	| (WORD) date of last write |	    24	    18
    16                              <3> ;	+---------------------------+
    17                              <3> ;	|   (WORD) First cluster    |	    26	    1A
    18                              <3> ;	+---------------------------+
    19                              <3> ;	|     (DWORD) file size     |	    28	    1C
    20                              <3> ;	+---------------------------+
    21                              <3> ;
    22                              <3> ;   First byte of filename  = E5 -> free directory entry
    23                              <3> ;			    = 00 -> end of allocated directory
    24                              <3> ;   Time:   Bits 0-4=seconds/2, bits 5-10=minute, 11-15=hour
    25                              <3> ;   Date:   Bits 0-4=day, bits 5-8=month, bits 9-15=year-1980
    26                              <3> ;
    27                              <3> 
    28                              <3> dir_entry   STRUC
    29 00000000 <res Bh>            <3> dir_name    DB	    11 DUP (?)		; file name
    30 0000000B ??                  <3> dir_attr    DB	    ?			; attribute bits
    31 0000000C ????                <3> dir_codepg  dw	    ?			; code page DOS 4.00
    32 0000000E ????                <3> dir_extcluster dw   ?			; extended attribute starting cluster
    33 00000010 ??                  <3> dir_attr2   db	    ?			; reserved
    34 00000011 ??????????          <3> dir_pad     DB	    5  DUP (?)		; reserved for expansion
    35 00000016 ????                <3> dir_time    DW	    ?			; time of last write
    36 00000018 ????                <3> dir_date    DW	    ?			; date of last write
    37 0000001A ????                <3> dir_first   DW	    ?			; first allocation unit of file
    38 0000001C ????                <3> dir_size_l  DW	    ?			; low 16 bits of file size
    39 0000001E ????                <3> dir_size_h  DW	    ?			; high 16 bits of file size
    40                              <3> dir_entry   ENDS
    41                              <3> 
    42                              <3> attr_read_only	    EQU      1h
    43                              <3> attr_hidden	    EQU      2h
    44                              <3> attr_system	    EQU      4h
    45                              <3> attr_volume_id	    EQU      8h
    46                              <3> attr_directory	    EQU     10h
    47                              <3> attr_archive	    EQU     20h
    48                              <3> attr_device	    EQU     40h 	; This is a VERY special bit.
    49                              <3> 					;   NO directory entry on a disk EVER
    50                              <3> 					;   has this bit set. It is set non-zero
    51                              <3> 					;   when a device is found by GETPATH
    52                              <3> 
    53                              <3> attr_all	    EQU     attr_hidden+attr_system+attr_directory
    54                              <3> 					; OR of hard attributes for FINDENTRY
    55                              <3> 
    56                              <3> attr_ignore	    EQU     attr_read_only+attr_archive+attr_device
    57                              <3> 					; ignore this(ese) attribute(s) during
    58                              <3> 					; search first/next
    59                              <3> 
    60                              <3> attr_changeable     EQU     attr_read_only+attr_hidden+attr_system+attr_archive
    61                              <3> 					; changeable via CHMOD
   122                              <2> 
   123                              <2> BREAK <File allocation Table information>
   124                              <2> ;
   125                              <2> ; The File Allocation Table uses a 12-bit entry for each allocation unit on
   126                              <2> ; the disk.  These entries are packed, two for every three bytes.  The contents
   127                              <2> ; of entry number N is found by 1) multiplying N by 1.5; 2) adding the result
   128                              <2> ; to the base address of the Allocation Table; 3) fetching the 16-bit word
   129                              <2> ; at this address; 4) If N was odd (so that N*1.5 was not an integer), shift
   130                              <2> ; the word right four bits; 5) mask to 12 bits (AND with 0FFF hex).  Entry
   131                              <2> ; number zero is used as an end-of-file trap in the OS and is passed to the
   132                              <2> ; BIOS to help determine disk format.  Entry 1 is reserved for future use.
   133                              <2> ; The first available allocation unit is assigned entry number two, and even
   134                              <2> ; though it is the first, is called cluster 2.	Entries greater than 0FF8H
   135                              <2> ; (12-bit fats) or 0FFF8H (16-bit fats) are end of file marks; entries of zero
   136                              <2> ; are unallocated.  Otherwise, the contents of a FAT entry is the number of
   137                              <2> ; the next cluster in the file.
   138                              <2> ;
   139                              <2> ; Clusters with bad sectors are tagged with FF7H.  Any non-zero number would
   140                              <2> ; do because these clusters show as allocated, but are not part of any
   141                              <2> ; allocation chain and thus will never be allocated to a file.	A particular
   142                              <2> ; number is selected so that disk checking programs know what to do (ie.  a
   143                              <2> ; cluster with entry FF7H which is not in a chain is not an error).
   144                              <2> 
   145                              <2> %include "dpb.mac"
     1                              <3> ;	SCCSID = @(#)dpb.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)dpb.asm	1.1 85/04/10
     3                              <3> BREAK <DPB structure>
     4                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <3> ;									   ;
     7                              <3> dpb	STRUC
     8 00000000 ??                  <3> dpb_drive	    DB	    ?		; Logical drive # assoc with DPB (A=0,B=1,...)
     9 00000001 ??                  <3> dpb_UNIT	    DB	    ?		; Driver unit number of DPB
    10 00000002 ????                <3> dpb_sector_size     DW	    ?		; Size of physical sector in bytes
    11 00000004 ??                  <3> dpb_cluster_mask    DB	    ?		; Sectors/cluster - 1
    12 00000005 ??                  <3> dpb_cluster_shift   DB	    ?		; Log2 of sectors/cluster
    13 00000006 ????                <3> dpb_first_FAT	    DW	    ?		; Starting record of FATs
    14 00000008 ??                  <3> dpb_FAT_count	    DB	    ?		; Number of FATs for this drive
    15 00000009 ????                <3> dpb_root_entries    DW	    ?		; Number of directory entries
    16 0000000B ????                <3> dpb_first_sector    DW	    ?		; First sector of first cluster
    17 0000000D ????                <3> dpb_max_cluster     DW	    ?		; Number of clusters on drive + 1
    18 0000000F ????                <3> dpb_FAT_size	    DW	    ?		;;Number of records occupied by FAT
    19 00000011 ????                <3> dpb_dir_sector	    DW	    ?		; Starting record of directory
    20 00000013 ????????            <3> dpb_driver_addr     DD	    ?		; Pointer to driver
    21 00000017 ??                  <3> dpb_media	    DB	    ?		; Media byte
    22 00000018 ??                  <3> dpb_first_access    DB	    ?		; This is initialized to -1 to force a media
    23                              <3> 					; check the first time this DPB is used
    24 00000019 ????????            <3> dpb_next_dpb	    DD	    ?		; Pointer to next Drive parameter block
    25 0000001D ????                <3> dpb_next_free	    DW	    ?		; Cluster # of last allocated cluster
    26 0000001F ????                <3> dpb_free_cnt	    DW	    ?		; Count of free clusters, -1 if unknown
    27                              <3> dpb	ENDS
    28                              <3> 
    29                              <3> DPBSIZ	EQU	dpb_struc_size		; Size of the structure in bytes
    30                              <3> 
    31                              <3> DSKSIZ	equ	dpb_max_cluster 	; Size of disk (temp used during init only)
    32                              <3> ;									   ;
    33                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    34                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   146                              <2> 
   147                              <2> %include "curdir.mac"
     1                              <3> ;	SCCSID = @(#)curdir.asm 1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)curdir.asm 1.1 85/04/10
     3                              <3> BREAK <Current directory list structure>
     4                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <3> ;									   ;
     7                              <3> ; CDS items are used bu the internal routines to store cluster numbers and ;
     8                              <3> ; network identifiers for each logical name.  The ID field is used dually, ;
     9                              <3> ; both as net ID and for a cluster number for local devices.  In the case  ;
    10                              <3> ; of local devices, the cluster number will be -1 if there is a potential  ;
    11                              <3> ; of the disk being changed or if the path must be recracked.  The END	   ;
    12                              <3> ; field is the location of the end of the definition.  No .. is allowed    ;
    13                              <3> ; past this point							   ;
    14                              <3> 
    15                              <3> DIRSTRLEN	EQU	64+3		; Max length in bytes of directory strings
    16                              <3> TEMPLEN 	EQU	DIRSTRLEN*2
    17                              <3> 
    18                              <3> curdir_list	STRUC
    19 00000000 <res 43h>           <3> curdir_text	DB	DIRSTRLEN DUP (?)   ; text of assignment and curdir
    20 00000043 ????                <3> curdir_flags	DW	?		; various flags
    21 00000045 ????????            <3> curdir_devptr	DD	?		; local pointer to DPB or net device
    22 00000049 ????                <3> curdir_ID	DW	?		; cluster of current dir (net ID)
    23 0000004B ????                <3> 		DW	?
    24 0000004D ????                <3> curdir_user_word DW	?
    25 0000004F ????                <3> curdir_end	DW	?		; end of assignment
    26 00000051 ??                  <3> curdir_type	DB	?		; IFS drive (2=ifs, 4=netuse)
    27 00000052 ????????            <3> curdir_ifs_hdr	DD	?		; Ptr to File System Header
    28 00000056 ????                <3> curdir_fsda	DB	2 DUP (?)	; File System Dependent Data Area
    29                              <3> curdir_list	ENDS
    30                              <3> 
    31                              <3> curdirLen	EQU	curdir_list_struc_size	; Needed for screwed up
    32                              <3> 						; ASM87 which doesn't allow
    33                              <3> 						; Size directive as a macro
    34                              <3> 						; argument
    35                              <3> labelsize curdir_netID, dword, curdir_ID
    36                              <3> 
    37                              <3> ;Flag word masks
    38                              <3> curdir_isnet	EQU	1000000000000000B
    39                              <3> curdir_isifs	EQU	1000000000000000B	; DOS 4.00
    40                              <3> curdir_inuse	EQU	0100000000000000B
    41                              <3> curdir_splice	EQU	0010000000000000B
    42                              <3> curdir_local	EQU	0001000000000000B
    43                              <3> ;									   ;
    44                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    45                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   148                              <2> 
   149                              <2> %include "cpmfcb.mac"
     1                              <3> ;       SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
     2                              <3> ;       SCCSID = @(#)cpmfcb.asm 1.1 85/04/10
     3                              <3> ;BREAK <File Control Block definition>
     4                              <3> 
     5                              <3> ;
     6                              <3> ; Field definition for FCBs
     7                              <3> ; The FCB has the following structure:
     8                              <3> ;
     9                              <3> ;       +---------------------------+
    10                              <3> ;       |   Drive indicator(byte)   |
    11                              <3> ;       +---------------------------+
    12                              <3> ;       |    Filename (8 chars)     |
    13                              <3> ;       +---------------------------+
    14                              <3> ;       |    Extension (3 chars)    |
    15                              <3> ;       +---------------------------+
    16                              <3> ;       |   Current Extent(word)    |
    17                              <3> ;       +---------------------------+
    18                              <3> ;       |    Record size (word)     |
    19                              <3> ;       +---------------------------+
    20                              <3> ;       |    File Size (2 words)    |
    21                              <3> ;       +---------------------------+
    22                              <3> ;       |       Date of write       |
    23                              <3> ;       +---------------------------+
    24                              <3> ;       |       Time of write       |
    25                              <3> ;       +---------------------------+
    26                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    27                              <3> ;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
    28                              <3> ;                                                                          ;
    29                              <3> ;       +---------------------------+
    30                              <3> ;       |   8 bytes reserved        |
    31                              <3> ;       +---------------------------+
    32                              <3> ;                                                                          ;
    33                              <3> ;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
    34                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    35                              <3> ;       |    next record number     |
    36                              <3> ;       +---------------------------+
    37                              <3> ;       |   random record number    |
    38                              <3> ;       +---------------------------+
    39                              <3> ;
    40                              <3> 
    41                              <3> sys_fcb     STRUC
    42 00000000 ??                  <3> fcb_drive   DB      ?
    43 00000001 ????????????????    <3> fcb_name    DB      8 DUP (?)
    44 00000009 ??????              <3> fcb_ext     DB      3 DUP (?)
    45 0000000C ????                <3> fcb_EXTENT  DW      ?
    46 0000000E ????                <3> fcb_RECSIZ  DW      ?                   ; Size of record (user settable)
    47 00000010 ????                <3> fcb_FILSIZ  DW      ?                   ; Size of file in bytes; used with the
    48                              <3>                                         ; following word
    49 00000012 ????                <3> fcb_DRVBP   DW      ?                   ; BP for SEARCH FIRST and SEARCH NEXT
    50 00000014 ????                <3> fcb_FDATE   DW      ?                   ; Date of last writing
    51 00000016 ????                <3> fcb_FTIME   DW      ?                   ; Time of last writing
    52                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    53                              <3> ;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
    54                              <3> ;                                                                          ;
    55 00000018 ????????????????    <3> fcb_reserved DB      8 DUP (?)           ; RESERVED
    56                              <3> ;                                                                          ;
    57                              <3> ;            C  A  V  E  A  T     P  R  O  G  R  A  M  M  E  R             ;
    58                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    59 00000020 ??                  <3> fcb_NR      DB      ?                   ; Next record
    60 00000021 ????????            <3> fcb_RR      DB      4 DUP (?)           ; Random record
    61                              <3> sys_fcb     ENDS
    62                              <3> 
    63                              <3> FILDIRENT       equ fcb_FILSIZ            ; Used only by SEARCH FIRST and SEARCH
    64                              <3>                                         ; NEXT
    65                              <3> 
    66                              <3> labelsize fcb_sfn, byte, fcb_reserved
    67                              <3> 
    68                              <3> ; Note that fcb_net_handle, fcb_nsl_drive, fcb_nsld_drive and fcb_l_drive
    69                              <3> ; all must point to the same byte.  Otherwise, the FCBRegen will fail.
    70                              <3> ; NOTE about this byte (fcb_nsl_drive)
    71                              <3> ;   The high two bits of this byte are used as follows to indicate the FCB type
    72                              <3> ;       00 means a local file or device with sharing loaded
    73                              <3> ;       10 means a remote (network) file
    74                              <3> ;       01 means a local file with no sharing loaded
    75                              <3> ;       11 means a local device with no sharing loaded
    76                              <3> 
    77                              <3> ;
    78                              <3> ; Network FCB
    79                              <3> ;
    80                              <3> labelsize fcb_net_drive, byte, fcb_reserved+1
    81                              <3> labelsize fcb_net_handle, word, fcb_reserved+2
    82                              <3> labelsize fcb_netID, dword, fcb_reserved+4
    83                              <3> 
    84                              <3> ;
    85                              <3> ; No sharing local file FCB
    86                              <3> ;
    87                              <3> labelsize fcb_nsl_drive, byte, fcb_reserved+1
    88                              <3> labelsize fcb_nsl_bits, byte, fcb_reserved+2
    89                              <3> labelsize fcb_nsl_firclus, word, fcb_reserved+3
    90                              <3> labelsize fcb_nsl_dirsec, word, fcb_reserved+5
    91                              <3> labelsize fcb_nsl_dirpos, byte, fcb_reserved+7
    92                              <3> 
    93                              <3> ;
    94                              <3> ; No sharing local device FCB
    95                              <3> ;
    96                              <3> labelsize fcb_nsld_drive, byte, fcb_reserved+1
    97                              <3> labelsize fcb_nsld_drvptr, dword, fcb_reserved+2
    98                              <3> 
    99                              <3> ;
   100                              <3> ; Sharing local FCB
   101                              <3> ;
   102                              <3> labelsize fcb_l_drive, byte, fcb_reserved+1
   103                              <3> labelsize fcb_l_firclus, word, fcb_reserved+2
   104                              <3> labelsize fcb_l_mfs, word, fcb_reserved+4
   105                              <3> labelsize fcb_l_attr, byte, fcb_reserved+6
   106                              <3> 
   107                              <3> ;
   108                              <3> ; Bogusness:  the four cases are:
   109                              <3> ;
   110                              <3> ;   local file      00
   111                              <3> ;   local device    40
   112                              <3> ;   local sharing   C0
   113                              <3> ;   network         80
   114                              <3> ;
   115                              <3> ; Since sharing and network collide, we cannot use a test instruction for
   116                              <3> ; deciding whether a network or a share check in involved
   117                              <3> ;
   118                              <3> FCBDEVICE   EQU 040h
   119                              <3> FCBNETWORK  EQU 080h
   120                              <3> FCBSHARE    EQU 0C0h
   121                              <3> 
   122                              <3> ; FCBSPECIAL must be able to mask off both net and share
   123                              <3> FCBSPECIAL  EQU 080h
   124                              <3> FCBMASK     EQU 0C0h
   150                              <2> 
   151                              <2> %include "find.mac"
     1                              <3> ;	SCCSID = @(#)find.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)find.asm	1.1 85/04/10
     3                              <3> Break	<find first/next buffer>
     4                              <3> 
     5                              <3> find_buf    STRUC
     6                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     7                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     8                              <3> ;									   ;
     9 00000000 ??                  <3> find_buf_drive	    DB	?		; drive of search
    10 00000001 <res Bh>            <3> find_buf_name	    DB	11 DUP (?)	; formatted name
    11 0000000C ??                  <3> find_buf_sattr	    DB	?		; attribute of search
    12 0000000D ????                <3> find_buf_LastEnt    DW	?		; LastEnt
    13 0000000F ????                <3> find_buf_DirStart   DW	?		; DirStart
    14 00000011 ????????            <3> find_buf_NetID	    DB	4 DUP (?)	; Reserved for NET
    15                              <3> ;									   ;
    16                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    17                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    18                              <3> 
    19 00000015 ??                  <3> find_buf_attr	    DB	?		; attribute found
    20 00000016 ????                <3> find_buf_time	    DW	?		; time
    21 00000018 ????                <3> find_buf_date	    DW	?		; date
    22 0000001A ????                <3> find_buf_size_l     DW	?		; low(size)
    23 0000001C ????                <3> find_buf_size_h     DW	?		; high(size)
    24 0000001E <res Dh>            <3> find_buf_pname	    DB	13 DUP (?)	; packed name
    25                              <3> find_buf    ENDS
   152                              <2> 
   153                              <2> %include "pdb.mac"
     1                              <3> ;	SCCSID = @(#)pdb.asm	1.1 85/04/10
     2                              <3> BREAK <Process data block>
     3                              <3> 
     4                              <3> ;
     5                              <3> ; Process data block (otherwise known as program header)
     6                              <3> ;
     7                              <3> 
     8                              <3> FilPerProc	    EQU     20
     9                              <3> 
    10                              <3> Process_data_block  STRUC
    11 00000000 ????                <3> PDB_Exit_Call	    DW	    ?		; INT int_abort system terminate
    12 00000002 ????                <3> PDB_block_len	    DW	    ?		; size of execution block
    13 00000004 ??                  <3> 		    DB	    ?
    14 00000005 ??????????          <3> PDB_CPM_Call	    DB	5 DUP (?)	; ancient call to system
    15 0000000A ????????            <3> PDB_Exit	    DD	    ?		; pointer to exit routine
    16 0000000E ????????            <3> PDB_Ctrl_C	    DD	    ?		; pointer to ^C routine
    17 00000012 ????????            <3> PDB_Fatal_abort     DD	    ?		; pointer to fatal error
    18                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    19                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    20                              <3> ;									   ;
    21 00000016 ????                <3> PDB_Parent_PID	    DW	    ?		; PID of parent (terminate PID)
    22 00000018 <res 14h>           <3> PDB_JFN_Table	    DB	FilPerProc DUP (?)
    23                              <3> 					; indices into system table
    24                              <3> ;									   ;
    25                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    26                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    27 0000002C ????                <3> PDB_environ	    DW	    ?		; seg addr of environment
    28                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    29                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    30                              <3> ;									   ;
    31 0000002E ????????            <3> PDB_User_stack	    DD	    ?		; stack of self during system calls
    32 00000032 ????                <3> PDB_JFN_Length	    DW	    ?		; number of handles allowed
    33 00000034 ????????            <3> PDB_JFN_Pointer     DD	    ?		; pointer to JFN table
    34 00000038 ????????            <3> PDB_Next_PDB	    DD	    ?		; pointer to nested PDB's
    35 0000003C <res 14h>           <3> PDB_PAD1	    DB	    14h DUP (?)
    36                              <3> ;									   ;
    37                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    38                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    39 00000050 ??????????          <3> PDB_Call_system     DB	    5 DUP (?)	; portable method of system call
    40                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    41                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    42                              <3> ;									   ;
    43 00000055 ??????????????      <3> PDB_PAD2	    DB	    7h DUP (?)
    44                              <3> ;									   ;
    45                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    46                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    47                              <3> Process_data_block  ENDS
    48                              <3> 
    49                              <3> labelsize PDB_InterCon, byte, PDB_PAD1	; 2/12/KK
    50                              <3> labelsize PDB_Append, byte, PDB_PAD1+1	; 2/12/KK
   154                              <2> 
   155                              <2> %include "exe.mac"
     1                              <3> ;	SCCSID = @(#)exe.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)exe.asm	1.1 85/04/10
     3                              <3> BREAK <EXEC and EXE file structures>
     4                              <3> ;
     5                              <3> ; EXEC arg block - load/go program
     6                              <3> ;
     7                              <3> 
     8                              <3> ;
     9                              <3> ; The following get used as arguments to the EXEC system call.	They indicate
    10                              <3> ; whether or not the program is executed or whether or not a program header
    11                              <3> ; gets created.
    12                              <3> ;
    13                              <3> exec_func_no_execute	EQU 1		; no execute bit
    14                              <3> exec_func_overlay	EQU 2		; overlay bit
    15                              <3> 
    16                              <3> Exec0		STRUC
    17 00000000 ????                <3> Exec0_environ	DW	?		; seg addr of environment
    18 00000002 ????????            <3> Exec0_com_line	DD	?		; pointer to asciz command line
    19 00000006 ????????            <3> Exec0_5C_FCB	DD	?		; default fcb at 5C
    20 0000000A ????????            <3> Exec0_6C_FCB	DD	?		; default fcb at 6C
    21                              <3> Exec0		ENDS
    22                              <3> 
    23                              <3> Exec1		STRUC
    24 00000000 ????                <3> Exec1_environ	DW	?		; seg addr of environment
    25 00000002 ????????            <3> Exec1_com_line	DD	?		; pointer to asciz command line
    26 00000006 ????????            <3> Exec1_5C_FCB	DD	?		; default fcb at 5C
    27 0000000A ????????            <3> Exec1_6C_FCB	DD	?		; default fcb at 6C
    28 0000000E ????                <3> Exec1_SP	DW	?		; stack pointer of program
    29 00000010 ????                <3> Exec1_SS	DW	?		; stack seg register of program
    30 00000012 ????                <3> Exec1_IP	DW	?		; entry point IP
    31 00000014 ????                <3> Exec1_CS	DW	?		; entry point CS
    32                              <3> Exec1		ENDS
    33                              <3> 
    34                              <3> Exec3		STRUC
    35 00000000 ????                <3> Exec3_load_addr DW	?		; seg address of load point
    36 00000002 ????                <3> Exec3_reloc_fac DW	?		; relocation factor
    37                              <3> Exec3		ENDS
    38                              <3> 
    39                              <3> ;
    40                              <3> ; Exit codes in upper byte
    41                              <3> ;
    42                              <3> Exit_terminate	    EQU     0
    43                              <3> Exit_abort	    EQU     0
    44                              <3> Exit_Ctrl_C	    EQU     1
    45                              <3> Exit_Hard_Error     EQU     2
    46                              <3> Exit_Keep_process   EQU     3
    47                              <3> 
    48                              <3> ;
    49                              <3> ; EXE file header
    50                              <3> ;
    51                              <3> 
    52                              <3> EXE_file    STRUC
    53 00000000 ????                <3> exe_signature	DW  ?			; must contain 4D5A  (yay zibo!)
    54 00000002 ????                <3> exe_len_mod_512 DW  ?			; low 9 bits of length
    55 00000004 ????                <3> exe_pages	DW  ?			; number of 512b pages in file
    56 00000006 ????                <3> exe_rle_count	DW  ?			; count of reloc entries
    57 00000008 ????                <3> exe_par_dir	DW  ?			; number of paragraphs before image
    58 0000000A ????                <3> exe_min_BSS	DW  ?			; minimum number of para of BSS
    59 0000000C ????                <3> exe_max_BSS	DW  ?			; max number of para of BSS
    60 0000000E ????                <3> exe_SS		DW  ?			; stack of image
    61 00000010 ????                <3> exe_SP		DW  ?			; SP of image
    62 00000012 ????                <3> exe_chksum	DW  ?			; checksum  of file (ignored)
    63 00000014 ????                <3> exe_IP		DW  ?			; IP of entry
    64 00000016 ????                <3> exe_CS		DW  ?			; CS of entry
    65 00000018 ????                <3> exe_rle_table	DW  ?			; byte offset of reloc table
    66 0000001A ????                <3> exe_iov 	DW  ?			; overlay number (0 for root)
    67 0000001C ????????            <3> exe_sym_tab	DD  ?			; offset of symbol table in file
    68                              <3> EXE_file    ENDS
    69                              <3> 
    70                              <3> exe_valid_signature	EQU 5A4Dh
    71                              <3> exe_valid_old_signature EQU 4D5Ah
    72                              <3> 
    73                              <3> symbol_entry	STRUC
    74 00000000 ????????            <3> sym_value	DD  ?
    75 00000004 ????                <3> sym_type	DW  ?
    76 00000006 ??                  <3> sym_len 	DB  ?
    77 00000007 <res FFh>           <3> sym_name	DB  255 dup (?)
    78                              <3> symbol_entry	ENDS
   156                              <2> 
   157                              <2> %include "sf.mac"
     1                              <3> ;	SCCSID = @(#)sf.asm	1.1 85/04/10
     2                              <3> BREAK <Internal system file table format>
     3                              <3> ;
     4                              <3> ;   AN000   version 4.00   Jan. 1988
     5                              <3> ;   AN003   PTM 3680 --  make NAME offset the same as before (<=3.30)
     6                              <3> ;   AN009   PTM 3839	 reorder SFT for MS WINDOWS
     7                              <3> 
     8                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     9                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    10                              <3> ;									   ;
    11                              <3> ;
    12                              <3> ; system file table
    13                              <3> ;
    14                              <3> 
    15                              <3> SF		STRUC
    16 00000000 ????????            <3> SFLink		DD	?
    17 00000004 ????                <3> SFCount 	DW	?		; number of entries
    18 00000006 ????                <3> SFTable 	DW	?		; beginning of array of the following
    19                              <3> SF		ENDS
    20                              <3> 
    21                              <3> ;
    22                              <3> ; system file table entry
    23                              <3> ;
    24                              <3> 
    25                              <3> sf_entry	STRUC
    26 00000000 ????                <3> sf_ref_count	DW	?		; number of processes sharing entry
    27                              <3> 					;   if FCB then ref count
    28 00000002 ????                <3> sf_mode 	DW	?		; mode of access or high bit on if FCB
    29 00000004 ??                  <3> sf_attr 	DB	?		; attribute of file
    30 00000005 ????                <3> sf_flags	DW	?		;Bits 8-15
    31                              <3> 					; Bit 15 = 1 if remote file
    32                              <3> 					;	 = 0 if local file or device
    33                              <3> 					; Bit 14 = 1 if date/time is not to be
    34                              <3> 					;   set from clock at CLOSE.  Set by
    35                              <3> 					;   FILETIMES and FCB_CLOSE.  Reset by
    36                              <3> 					;   other reseters of the dirty bit
    37                              <3> 					;   (WRITE)
    38                              <3> 					; Bit 13 = Pipe bit (reserved)
    39                              <3> 					;
    40                              <3> 					; Bits 0-7 (old FCB_devid bits)
    41                              <3> 					; If remote file or local file, bit
    42                              <3> 					; 6=0 if dirty Device ID number, bits
    43                              <3> 					; 0-5 if local file.
    44                              <3> 					; bit 7=0 for local file, bit 7
    45                              <3> 					;      =1 for local I/O device
    46                              <3> 					; If local I/O device, bit 6=0 if EOF (input)
    47                              <3> 					;		Bit 5=1 if Raw mode
    48                              <3> 					;		Bit 0=1 if console input device
    49                              <3> 					;		Bit 1=1 if console output device
    50                              <3> 					;		Bit 2=1 if null device
    51                              <3> 					;		Bit 3=1 if clock device
    52 00000007 ????????            <3> sf_devptr	DD	?		; Points to DPB if local file, points
    53                              <3> 					; to device header if local device,
    54                              <3> 					; points to net device header if
    55                              <3> 					; remote
    56 0000000B ????                <3> sf_firclus	DW	?		; First cluster of file (bit 15 = 0)
    57 0000000D ????                <3> sf_time 	DW	?		; Time associated with file
    58 0000000F ????                <3> sf_date 	DW	?		; Date associated with file
    59 00000011 ????????            <3> sf_size 	DD	?		; Size associated with file
    60 00000015 ????????            <3> sf_position	DD	?		; Read/Write pointer or LRU count for FCBs
    61                              <3> ;
    62                              <3> ; Starting here, the next 7 bytes may be used by the file system to store an
    63                              <3> ; ID
    64                              <3> ;
    65 00000019 ????                <3> sf_cluspos	DW	?		; Position of last cluster accessed
    66 0000001B ????????            <3> sf_dirsec	DD	?		; Sector number of directory sector for
    67                              <3> 					; for this file
    68 0000001F ??                  <3> sf_dirpos	DB	?		; Offset of this entry in the above
    69                              <3> ;
    70                              <3> ; End of 7 bytes of file-system specific info.
    71                              <3> ;
    72 00000020 <res Bh>            <3> sf_name 	DB	11 DUP (?)	; 11 character name that is in the
    73                              <3> 					; directory entry.  This is used by
    74                              <3> 					; close to detect file deleted and
    75                              <3> 					; disk changed errors.
    76                              <3> 
    77                              <3> ; SHARING INFO
    78 0000002B ????????            <3> sf_chain	DD	?		; link to next SF
    79 0000002F ????                <3> sf_UID		DW	?
    80 00000031 ????                <3> sf_PID		DW	?
    81 00000033 ????                <3> sf_MFT		DW	?
    82 00000035 ????                <3> sf_lstclus	DW	?		;AN009; Last cluster accessed
    83 00000037 ????????            <3> sf_IFS_HDR	DD	?
    84                              <3> sf_entry	ENDS
    85                              <3> 
    86                              <3> labelsize sf_fsda, byte, sf_cluspos	     ;DOS 4.00
    87                              <3> labelsize sf_serial_ID, word, sf_firclus	     ;DOS 4.00
    88                              <3> labelsize sf_netid, byte, sf_cluspos
    89                              <3> labelsize sf_OpenAge, word, sf_position+2
    90                              <3> labelsize sf_LRU, word, sf_position
    91                              <3> 
    92                              <3> sf_default_number   EQU     5h
    93                              <3> 
    94                              <3> ;
    95                              <3> ; Note that we need to mark an SFT as being busy for OPEN/CREATE.  This is
    96                              <3> ; because an INT 24 may prevent us from 'freeing' it.  We mark this as such
    97                              <3> ; by placing a -1 in the ref_count field.
    98                              <3> ;
    99                              <3> 
   100                              <3> sf_busy EQU -1
   101                              <3> 
   102                              <3> 
   103                              <3> ; mode mask for FCB detection
   104                              <3> sf_isfcb		EQU	1000000000000000B
   105                              <3> 
   106                              <3> ; Flag word masks
   107                              <3> sf_isnet		EQU	1000000000000000B
   108                              <3> sf_close_nodate 	EQU	0100000000000000B
   109                              <3> sf_pipe 		EQU	0010000000000000B
   110                              <3> sf_no_inherit		EQU	0001000000000000B
   111                              <3> sf_net_spool		EQU	0000100000000000B
   112                              <3> Handle_Fail_I24 	EQU	0000000100000000B  ;BIT 8 - DISK FULL I24 ERROR
   113                              <3> 
   114                              <3> ; Local file/device flag masks
   115                              <3> devid_file_clean	EQU	40h	; true if file and not written
   116                              <3> devid_file_mask_drive	EQU	3Fh	; mask for drive number
   117                              <3> 
   118                              <3> devid_device		EQU	80h	; true if a device
   119                              <3> devid_device_EOF	EQU	40h	; true if end of file reached
   120                              <3> devid_device_raw	EQU	20h	; true if in raw mode
   121                              <3> devid_device_special	EQU	10h	; true if special device
   122                              <3> devid_device_clock	EQU	08h	; true if clock device
   123                              <3> devid_device_null	EQU	04h	; true if null device
   124                              <3> devid_device_con_out	EQU	02h	; true if console output
   125                              <3> devid_device_con_in	EQU	01h	; true if consle input
   126                              <3> ;									   ;
   127                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   128                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   129                              <3> 
   130                              <3> ;
   131                              <3> ; structure of devid field as returned by IOCTL is:
   132                              <3> ;
   133                              <3> ;	BIT	7   6	5   4	3   2	1   0
   134                              <3> ;	      |---|---|---|---|---|---|---|---|
   135                              <3> ;	      | I | E | R | S | I | I | I | I |
   136                              <3> ;	      | S | O | A | P | S | S | S | S |
   137                              <3> ;	      | D | F | W | E | C | N | C | C |
   138                              <3> ;	      | E |   |   | C | L | U | O | I |
   139                              <3> ;	      | V |   |   | L | K | L | T | N |
   140                              <3> ;	      |---|---|---|---|---|---|---|---|
   141                              <3> ;	ISDEV = 1 if this channel is a device
   142                              <3> ;	      = 0 if this channel is a disk file
   143                              <3> ;
   144                              <3> ;	If ISDEV = 1
   145                              <3> ;
   146                              <3> ;	      EOF = 0 if End Of File on input
   147                              <3> ;	      RAW = 1 if this device is in Raw mode
   148                              <3> ;		  = 0 if this device is cooked
   149                              <3> ;	      ISCLK = 1 if this device is the clock device
   150                              <3> ;	      ISNUL = 1 if this device is the null device
   151                              <3> ;	      ISCOT = 1 if this device is the console output
   152                              <3> ;	      ISCIN = 1 if this device is the console input
   153                              <3> ;
   154                              <3> ;	If ISDEV = 0
   155                              <3> ;	      EOF = 0 if channel has been written
   156                              <3> ;	      Bits 0-5	are  the  block  device  number  for
   157                              <3> ;		  the channel (0 = A, 1 = B, ...)
   158                              <3> ;
   159                              <3> devid_ISDEV	EQU	80h
   160                              <3> devid_EOF	EQU	40h
   161                              <3> devid_RAW	EQU	20h
   162                              <3> devid_SPECIAL	EQU	10H
   163                              <3> devid_ISCLK	EQU	08h
   164                              <3> devid_ISNUL	EQU	04h
   165                              <3> devid_ISCOT	EQU	02h
   166                              <3> devid_ISCIN	EQU	01h
   167                              <3> 
   168                              <3> devid_block_dev EQU	1Fh		; mask for block device number
   158                              <2> 
   159                              <2> %include "arena.mac"
     1                              <3> ;	SCCSID = @(#)arena.asm	1.1 85/04/09
     2                              <3> ;BREAK <Memory arena structure>
     3                              <3> 
     4                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <3> ;									   ;
     7                              <3> ;
     8                              <3> ; arena item
     9                              <3> ;
    10                              <3> arena	STRUC
    11 00000000 ??                  <3> arena_signature     DB	?		; 4D for valid item, 5A for last item
    12 00000001 ????                <3> arena_owner	    DW	?		; owner of arena item
    13 00000003 ????                <3> arena_size	    DW	?		; size in paragraphs of item
    14 00000005 ??????              <3> arena_reserved	    DB	3 DUP(?)	; reserved
    15 00000008 ????????????????    <3> arena_name	    DB	8 DUP(?)	; owner file name
    16                              <3> arena	ENDS
    17                              <3> 
    18                              <3> ;
    19                              <3> ; CAUTION: The routines in ALLOC.ASM rely on the fact that arena_signature
    20                              <3> ; and arena_owner_system are all equal to zero and are contained in DI.  Change
    21                              <3> ; them and change ALLOC.ASM.
    22                              <3> 
    23                              <3> arena_owner_system  EQU 0		; free block indication
    24                              <3> 
    25                              <3> arena_signature_normal	EQU 4Dh 	; valid signature, not end of arena
    26                              <3> arena_signature_end	EQU 5Ah 	; valid signature, last block in arena
    27                              <3> ;									   ;
    28                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    29                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    30                              <3> 
   160                              <2> 
   161                              <2> %include "intnat.mac"
     1                              <3> ;	SCCSID = @(#)intnat.asm	1.1 85/04/10
     2                              <3> BREAK <International data structure format>
     3                              <3> 
     4                              <3> ;
     5                              <3> ; Current structure of the data returned by the international call
     6                              <3> ;
     7                              <3> internat_block STRUC
     8 00000000 ????                <3> Date_tim_format DW	?		; 0-USA, 1-EUR, 2-JAP
     9 00000002 ??                  <3> Currency_sym	DB	?		; Currency Symbol 5 bytes
    10 00000003 ??                  <3> 		DB	?
    11 00000004 ??                  <3> 		DB	?
    12 00000005 ??                  <3> 		DB	?
    13 00000006 ??                  <3> 		DB	?
    14 00000007 ??                  <3> Thous_sep	DB	?		; Thousands separator 2 bytes
    15 00000008 ??                  <3> 		DB	?
    16 00000009 ??                  <3> Decimal_sep	DB	?		; Decimal separator 2 bytes
    17 0000000A ??                  <3> 		DB	?
    18 0000000B ??                  <3> Date_sep	DB	?		; Date separator 2 bytes
    19 0000000C ??                  <3> 		DB	?
    20 0000000D ??                  <3> Time_sep	DB	?		; Decimal separator 2 bytes
    21 0000000E ??                  <3> 		DB	?
    22 0000000F ??                  <3> Bit_field	DB	?		; Bit values
    23                              <3> 					;   Bit 0 = 0 if currency symbol first
    24                              <3> 					;	  = 1 if currency symbol last
    25                              <3> 					;   Bit 1 = 0 if No space after currency symbol
    26                              <3> 					;	  = 1 if space after currency symbol
    27 00000010 ??                  <3> Currency_cents	DB	?		; Number of places after currency dec point
    28 00000011 ??                  <3> Time_24 	DB	?		; 1 if 24 hour time, 0 if 12 hour time
    29 00000012 ????                <3> Map_call	DW	?		; Address of case mapping call (DWORD)
    30 00000014 ????                <3> 		DW	?		; THIS IS TWO WORDS SO IT CAN BE INITIALIZED
    31                              <3> 					;  in pieces.
    32 00000016 ??                  <3> Data_sep	DB	?		; Data list separator character
    33 00000017 ??                  <3> 		DB	?
    34                              <3> internat_block ENDS
    35                              <3> 
    36                              <3> ;
    37                              <3> ; Max size of the block returned by the INTERNATIONAL call
    38                              <3> ;
    39                              <3> internat_block_max	EQU	32
   162                              <2> 
   163                              <2> %include "mi.mac"
     1                              <3> ;	SCCSID = @(#)mi.asm	1.1 85/04/10
     2                              <3> BREAK <Machine instruction, flag definitions and character types>
     3                              <3> 
     4                              <3> mi_INT		EQU	0CDh
     5                              <3> mi_Long_JMP	EQU	0EAh
     6                              <3> mi_Long_CALL	EQU	09Ah
     7                              <3> mi_Long_RET	EQU	0CBh
     8                              <3> mi_Near_RET	EQU	0C3h
     9                              <3> 
    10                              <3> ;			xxxxoditszxaxpxc
    11                              <3> f_Overflow	EQU	0000100000000000B
    12                              <3> f_Direction	EQU	0000010000000000B
    13                              <3> f_Interrupt	EQU	0000001000000000B
    14                              <3> f_Trace 	EQU	0000000100000000B
    15                              <3> f_Sign		EQU	0000000010000000B
    16                              <3> f_Zero		EQU	0000000001000000B
    17                              <3> f_Aux		EQU	0000000000010000B
    18                              <3> f_Parity	EQU	0000000000000100B
    19                              <3> f_Carry 	EQU	0000000000000001B
   164                              <2> 
   165                              <2> fChk	equ 1
   166                              <2> fDelim	equ 2
   167                              <2> fSpChk	equ 4
   168                              <2> fFCB	equ 8
   169                              <2> 
   170                              <2> %include "filemode.mac"
     1                              <3> ;	SCCSID = @(#)filemode.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)filemode.asm	1.1 85/04/10
     3                              <3> BREAK <Standard I/O assignments>
     4                              <3> 
     5                              <3> stdin	    EQU     0
     6                              <3> stdout	    EQU     1
     7                              <3> stderr	    EQU     2
     8                              <3> stdaux	    EQU     3
     9                              <3> stdprn	    EQU     4
    10                              <3> 
    11                              <3> BREAK <File modes>
    12                              <3> 
    13                              <3> access_mask	EQU 0FH
    14                              <3> open_for_read	EQU 00h
    15                              <3> open_for_write	EQU 01h
    16                              <3> open_for_both	EQU 02h
    17                              <3> 
    18                              <3> sharing_mask	    EQU 0F0H
    19                              <3> sharing_compat	    EQU 000H
    20                              <3> sharing_deny_both   EQU 010H
    21                              <3> sharing_deny_write  EQU 020H
    22                              <3> sharing_deny_read   EQU 030H
    23                              <3> sharing_deny_none   EQU 040H
    24                              <3> sharing_net_FCB     EQU 070h
    25                              <3> sharing_no_inherit  EQU 080H
    26                              <3> 
    27                              <3> BREAK <Extended Open>
    28                              <3> 
    29                              <3> no_code_page_check	  EQU 0100H
    30                              <3> int_24_error		  EQU 2000H
    31                              <3> auto_commit_write	  EQU 4000H
    32                              <3> ext_open_on		  EQU 01H
    33                              <3> ext_file_not_exists	  EQU 04H
    34                              <3> ext_open_I24_off	  EQU 02H
    35                              <3> io_mode_id		  EQU 00000010B
    36                              <3> reserved_bits_mask	  EQU 0FE00H
    37                              <3> exists_mask		  EQU 0FH
    38                              <3> not_exists_mask 	  EQU 0F0H
    39                              <3> action_opened		  EQU  01H
    40                              <3> action_created_opened	  EQU  02H
    41                              <3> action_replaced_opened	  EQU  03H
    42                              <3> 
    43                              <3> ext_exists_open     EQU 01H
    44                              <3> ext_exists_fail     EQU 0H
    45                              <3> ext_nexists_create  EQU 10H
    46                              <3> 
    47                              <3> 
    48                              <3> 
    49                              <3> ext_open_parm	   struc
    50 00000000 ????????            <3> ext_set_list	    dd ?
    51 00000004 ????                <3> ext_num_of_parm     dw ?
    52                              <3> ext_open_parm	   ends
    53                              <3> 
    54                              <3> 
    55                              <3> 
   171                              <2> 
   172                              <2> %include "error.mac"
     1                              <3> ;	SCCSID = @(#)error.asm	1.1 85/04/10
     2                              <3> ;	SCCSID = @(#)error.asm	1.1 85/04/10
     3                              <3> BREAK <Xenix error codes>
     4                              <3> 
     5                              <3> ;
     6                              <3> ; XENIX calls all return error codes through AX.  If an error occurred then
     7                              <3> ; the carry bit will be set and the error code is in AX.  If no error occurred
     8                              <3> ; then the carry bit is reset and AX contains returned info.
     9                              <3> ;
    10                              <3> ; Since the set of error codes is being extended as we extend the operating
    11                              <3> ; system, we have provided a means for applications to ask the system for a
    12                              <3> ; recommended course of action when they receive an error.
    13                              <3> ;
    14                              <3> ; The GetExtendedError system call returns a universal error, an error
    15                              <3> ; location and a recommended course of action.	The universal error code is
    16                              <3> ; a symptom of the error REGARDLESS of the context in which GetExtendedError
    17                              <3> ; is issued.
    18                              <3> ;
    19                              <3> 
    20                              <3> ;
    21                              <3> ; These are the 2.0 error codes
    22                              <3> ;
    23                              <3> error_invalid_function		EQU	1
    24                              <3> error_file_not_found		EQU	2
    25                              <3> error_path_not_found		EQU	3
    26                              <3> error_too_many_open_files	EQU	4
    27                              <3> error_access_denied		EQU	5
    28                              <3> error_invalid_handle		EQU	6
    29                              <3> error_arena_trashed		EQU	7
    30                              <3> error_not_enough_memory 	EQU	8
    31                              <3> error_invalid_block		EQU	9
    32                              <3> error_bad_environment		EQU	10
    33                              <3> error_bad_format		EQU	11
    34                              <3> error_invalid_access		EQU	12
    35                              <3> error_invalid_data		EQU	13
    36                              <3> ;**** reserved			EQU	14	; *****
    37                              <3> error_invalid_drive		EQU	15
    38                              <3> error_current_directory 	EQU	16
    39                              <3> error_not_same_device		EQU	17
    40                              <3> error_no_more_files		EQU	18
    41                              <3> ;
    42                              <3> ; These are the universal int 24 mappings for the old INT 24 set of errors
    43                              <3> ;
    44                              <3> error_write_protect		EQU	19
    45                              <3> error_bad_unit			EQU	20
    46                              <3> error_not_ready 		EQU	21
    47                              <3> error_bad_command		EQU	22
    48                              <3> error_CRC			EQU	23
    49                              <3> error_bad_length		EQU	24
    50                              <3> error_Seek			EQU	25
    51                              <3> error_not_DOS_disk		EQU	26
    52                              <3> error_sector_not_found		EQU	27
    53                              <3> error_out_of_paper		EQU	28
    54                              <3> error_write_fault		EQU	29
    55                              <3> error_read_fault		EQU	30
    56                              <3> error_gen_failure		EQU	31
    57                              <3> ;
    58                              <3> ; These are the new 3.0 error codes reported through INT 24
    59                              <3> ;
    60                              <3> error_sharing_violation 	EQU	32
    61                              <3> error_lock_violation		EQU	33
    62                              <3> error_wrong_disk		EQU	34
    63                              <3> error_FCB_unavailable		EQU	35
    64                              <3> error_sharing_buffer_exceeded	EQU	36
    65                              <3> error_Code_Page_Mismatched	EQU	37    ; DOS 4.00 			;AN000;
    66                              <3> error_handle_EOF		EQU	38    ; DOS 4.00 			;AN000;
    67                              <3> error_handle_Disk_Full		EQU	39    ; DOS 4.00 			;AN000;
    68                              <3> ;
    69                              <3> ; New OEM network-related errors are 50-79
    70                              <3> ;
    71                              <3> error_not_supported		EQU	50
    72                              <3> ;
    73                              <3> ; End of INT 24 reportable errors
    74                              <3> ;
    75                              <3> error_file_exists		EQU	80
    76                              <3> error_DUP_FCB			EQU	81	; *****
    77                              <3> error_cannot_make		EQU	82
    78                              <3> error_FAIL_I24			EQU	83
    79                              <3> ;
    80                              <3> ; New 3.0 network related error codes
    81                              <3> ;
    82                              <3> error_out_of_structures 	EQU	84
    83                              <3> error_Already_assigned		EQU	85
    84                              <3> error_invalid_password		EQU	86
    85                              <3> error_invalid_parameter 	EQU	87
    86                              <3> error_NET_write_fault		EQU	88
    87                              <3> error_sys_comp_not_loaded	EQU	90    ; DOS 4.00				;AN000;
    88                              <3> 
    89                              <3> BREAK <Interrupt 24 error codes>
    90                              <3> 
    91                              <3> error_I24_write_protect 	EQU	0
    92                              <3> error_I24_bad_unit		EQU	1
    93                              <3> error_I24_not_ready		EQU	2
    94                              <3> error_I24_bad_command		EQU	3
    95                              <3> error_I24_CRC			EQU	4
    96                              <3> error_I24_bad_length		EQU	5
    97                              <3> error_I24_Seek			EQU	6
    98                              <3> error_I24_not_DOS_disk		EQU	7
    99                              <3> error_I24_sector_not_found	EQU	8
   100                              <3> error_I24_out_of_paper		EQU	9
   101                              <3> error_I24_write_fault		EQU	0Ah
   102                              <3> error_I24_read_fault		EQU	0Bh
   103                              <3> error_I24_gen_failure		EQU	0Ch
   104                              <3> ; NOTE: Code 0DH is used by MT-DOS.
   105                              <3> error_I24_wrong_disk		EQU	0Fh
   106                              <3> 
   107                              <3> ; THE FOLLOWING ARE MASKS FOR THE AH REGISTER ON Int 24
   108                              <3> 
   109                              <3> Allowed_FAIL			EQU	00001000B
   110                              <3> Allowed_RETRY			EQU	00010000B
   111                              <3> Allowed_IGNORE			EQU	00100000B
   112                              <3> ;NOTE: ABORT is ALWAYS allowed
   113                              <3> 
   114                              <3> I24_operation			EQU	00000001B	;Z if READ,NZ if Write
   115                              <3> I24_area			EQU	00000110B	; 00 if DOS
   116                              <3> 							; 01 if FAT
   117                              <3> 							; 10 if root DIR
   118                              <3> 							; 11 if DATA
   119                              <3> I24_class			EQU	10000000B	;Z if DISK, NZ if FAT or char
   120                              <3> 
   121                              <3> BREAK <GetExtendedError CLASSes ACTIONs LOCUSs>
   122                              <3> 
   123                              <3> ; Values for error CLASS
   124                              <3> 
   125                              <3> errCLASS_OutRes 	EQU	1	; Out of Resource
   126                              <3> errCLASS_TempSit	EQU	2	; Temporary Situation
   127                              <3> errCLASS_Auth		EQU	3	; Permission problem
   128                              <3> errCLASS_Intrn		EQU	4	; Internal System Error
   129                              <3> errCLASS_HrdFail	EQU	5	; Hardware Failure
   130                              <3> errCLASS_SysFail	EQU	6	; System Failure
   131                              <3> errCLASS_Apperr 	EQU	7	; Application Error
   132                              <3> errCLASS_NotFnd 	EQU	8	; Not Found
   133                              <3> errCLASS_BadFmt 	EQU	9	; Bad Format
   134                              <3> errCLASS_Locked 	EQU	10	; Locked
   135                              <3> errCLASS_Media		EQU	11	; Media Failure
   136                              <3> errCLASS_Already	EQU	12	; Collision with Existing Item
   137                              <3> errCLASS_Unk		EQU	13	; Unknown/other
   138                              <3> 
   139                              <3> ; Values for error ACTION
   140                              <3> 
   141                              <3> errACT_Retry		EQU	1	; Retry
   142                              <3> errACT_DlyRet		EQU	2	; Delay Retry, retry after pause
   143                              <3> errACT_User		EQU	3	; Ask user to regive info
   144                              <3> errACT_Abort		EQU	4	; abort with clean up
   145                              <3> errACT_Panic		EQU	5	; abort immediately
   146                              <3> errACT_Ignore		EQU	6	; ignore
   147                              <3> errACT_IntRet		EQU	7	; Retry after User Intervention
   148                              <3> 
   149                              <3> ; Values for error LOCUS
   150                              <3> 
   151                              <3> errLOC_Unk		EQU	1	; No appropriate value
   152                              <3> errLOC_Disk		EQU	2	; Random Access Mass Storage
   153                              <3> errLOC_Net		EQU	3	; Network
   154                              <3> errLOC_SerDev		EQU	4	; Serial Device
   155                              <3> errLOC_Mem		EQU	5	; Memory
   173                              <2> 
   174                              <2> %include "syscall.mac"
     1                              <3> ;	SCCSID = @(#)syscall.asm	1.1 85/04/10
     2                              <3> ;BREAK <system call definitions>
     3                              <3> ;SUBTTL	system call definitions
     4                              <3> ;PAGE
     5                              <3> 
     6                              <3> Abort				EQU 0	;  0	  0
     7                              <3> Std_Con_Input			EQU 1	;  1	  1
     8                              <3> Std_Con_Output			EQU 2	;  2	  2
     9                              <3> Std_Aux_Input			EQU 3	;  3	  3
    10                              <3> Std_Aux_Output			EQU 4	;  4	  4
    11                              <3> Std_Printer_Output		EQU 5	;  5	  5
    12                              <3> Raw_Con_IO			EQU 6	;  6	  6
    13                              <3> Raw_Con_Input			EQU 7	;  7	  7
    14                              <3> Std_Con_Input_No_Echo		EQU 8	;  8	  8
    15                              <3> Std_Con_String_Output		EQU 9	;  9	  9
    16                              <3> Std_Con_String_Input		EQU 10	; 10	  A
    17                              <3> Std_Con_Input_Status		EQU 11	; 11	  B
    18                              <3> Std_Con_Input_Flush		EQU 12	; 12	  C
    19                              <3> Disk_Reset			EQU 13	; 13	  D
    20                              <3> Set_Default_Drive		EQU 14	; 14	  E
    21                              <3> FCB_Open			EQU 15	; 15	  F
    22                              <3> FCB_Close			EQU 16	; 16	 10
    23                              <3> Dir_Search_First		EQU 17	; 17	 11
    24                              <3> Dir_Search_Next 		EQU 18	; 18	 12
    25                              <3> FCB_Delete			EQU 19	; 19	 13
    26                              <3> FCB_Seq_Read			EQU 20	; 20	 14
    27                              <3> FCB_Seq_Write			EQU 21	; 21	 15
    28                              <3> FCB_Create			EQU 22	; 22	 16
    29                              <3> FCB_Rename			EQU 23	; 23	 17
    30                              <3> Get_Default_Drive		EQU 25	; 25	 19
    31                              <3> Set_DMA 			EQU 26	; 26	 1A
    32                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    33                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    34                              <3> ;									   ;
    35                              <3> Get_Default_DPB 		EQU 31	; 31	 1F
    36                              <3> ;									   ;
    37                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    38                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    39                              <3> FCB_Random_Read 		EQU 33	; 33	 21
    40                              <3> FCB_Random_Write		EQU 34	; 34	 22
    41                              <3> Get_FCB_File_Length		EQU 35	; 35	 23
    42                              <3> Get_FCB_Position		EQU 36	; 36	 24
    43                              <3> Set_Interrupt_Vector		EQU 37	; 37	 25
    44                              <3> Create_Process_Data_Block	EQU 38	; 38	 26
    45                              <3> FCB_Random_Read_Block		EQU 39	; 39	 27
    46                              <3> FCB_Random_Write_Block		EQU 40	; 40	 28
    47                              <3> Parse_File_Descriptor		EQU 41	; 41	 29
    48                              <3> Get_Date			EQU 42	; 42	 2A
    49                              <3> Set_Date			EQU 43	; 43	 2B
    50                              <3> Get_Time			EQU 44	; 44	 2C
    51                              <3> Set_Time			EQU 45	; 45	 2D
    52                              <3> Set_Verify_On_Write		EQU 46	; 46	 2E
    53                              <3> ; Extended functionality group
    54                              <3> Get_DMA 			EQU 47	; 47	 2F
    55                              <3> Get_Version			EQU 48	; 48	 30
    56                              <3> Keep_Process			EQU 49	; 49	 31
    57                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    58                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    59                              <3> ;									   ;
    60                              <3> Get_DPB 			EQU 50	; 50	 32
    61                              <3> ;									   ;
    62                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    63                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    64                              <3> Set_CTRL_C_Trapping		EQU 51	; 51	 33
    65                              <3> Get_InDOS_Flag			EQU 52	; 52	 34
    66                              <3> Get_Interrupt_Vector		EQU 53	; 53	 35
    67                              <3> Get_Drive_Freespace		EQU 54	; 54	 36
    68                              <3> Char_Oper			EQU 55	; 55	 37
    69                              <3> International			EQU 56	; 56	 38
    70                              <3> ;   Directory Group
    71                              <3> MKDir				EQU 57	; 57	 39
    72                              <3> RMDir				EQU 58	; 58	 3A
    73                              <3> CHDir				EQU 59	; 59	 3B
    74                              <3> ;   File Group
    75                              <3> Creat				EQU 60	; 60	 3C
    76                              <3> Open				EQU 61	; 61	 3D
    77                              <3> Close				EQU 62	; 62	 3E
    78                              <3> Read				EQU 63	; 63	 3F
    79                              <3> Write				EQU 64	; 64	 40
    80                              <3> Unlink				EQU 65	; 65	 41
    81                              <3> LSeek				EQU 66	; 66	 42
    82                              <3> CHMod				EQU 67	; 67	 43
    83                              <3> IOCtl				EQU 68	; 68	 44
    84                              <3> XDup				EQU 69	; 69	 45
    85                              <3> XDup2				EQU 70	; 70	 46
    86                              <3> Current_Dir			EQU 71	; 71	 47
    87                              <3> ;    Memory Group
    88                              <3> Alloc				EQU 72	; 72	 48
    89                              <3> Dealloc 			EQU 73	; 73	 49
    90                              <3> Setblock			EQU 74	; 74	 4A
    91                              <3> ;    Process Group
    92                              <3> Exec				EQU 75	; 75	 4B
    93                              <3> Exit				EQU 76	; 76	 4C
    94                              <3> WaitProcess			EQU 77	; 77	 4D
    95                              <3> Find_First			EQU 78	; 78	 4E
    96                              <3> ;   Special Group
    97                              <3> Find_Next			EQU 79	; 79	 4F
    98                              <3> ; SPECIAL SYSTEM GROUP
    99                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   100                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   101                              <3> ;									   ;
   102                              <3> Set_Current_PDB 		EQU 80	; 80	 50
   103                              <3> Get_Current_PDB 		EQU 81	; 81	 51
   104                              <3> Get_In_Vars			EQU 82	; 82	 52
   105                              <3> SetDPB				EQU 83	; 83	 53
   106                              <3> ;									   ;
   107                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   108                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   109                              <3> Get_Verify_On_Write		EQU 84	; 84	 54
   110                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   111                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   112                              <3> ;									   ;
   113                              <3> Dup_PDB 			EQU 85	; 85	 55
   114                              <3> ;									   ;
   115                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   116                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   117                              <3> Rename				EQU 86	; 86	 56
   118                              <3> File_Times			EQU 87	; 87	 57
   119                              <3> AllocOper			EQU 88	; 88	 58
   120                              <3> ; Network extention system calls
   121                              <3> GetExtendedError		EQU 89	; 89	 59
   122                              <3> CreateTempFile			EQU 90	; 90	 5A
   123                              <3> CreateNewFile			EQU 91	; 91	 5B
   124                              <3> LockOper			EQU 92	; 92	 5C Lock and Unlock
   125                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   126                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   127                              <3> ;									   ;
   128                              <3> ServerCall			EQU 93	; 93	 5D CommitAll, ServerDOSCall,
   129                              <3> 					;	    CloseByName, CloseUser,
   130                              <3> 					;	    CloseUserProcess,
   131                              <3> 					;	    GetOpenFileList
   132                              <3> ;									   ;
   133                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   134                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   135                              <3> UserOper			EQU 94	; 94	 5E Get and Set
   136                              <3> AssignOper			EQU 95	; 95	 5F On, Off, Get, Set, Cancel
   137                              <3> xNameTrans			EQU 96	; 96	 60
   138                              <3> PathParse			EQU 97	; 97	 61
   139                              <3> GetCurrentPSP			EQU 98	; 98	 62
   140                              <3> Hongeul 			EQU 99	; 99	 63
   141                              <3> ECS_CALL			EQU 99	; 99	 63  ;; DBCS support
   142                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   143                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   144                              <3> ;									   ;
   145                              <3> Set_Printer_Flag		EQU 100 ; 100	 64
   146                              <3> ;									   ;
   147                              <3> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   148                              <3> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   149                              <3> GetExtCntry			EQU 101 ; 101	 65
   150                              <3> GetSetCdPg			EQU 102 ; 102	 66
   151                              <3> ExtHandle			EQU 103 ; 103	 67
   152                              <3> Commit				EQU 104 ; 104	 68
   153                              <3> GetSetMediaID			EQU 105 ; 105	 69
   154                              <3> IFS_IOCTL			EQU 107 ; 107	 6B
   155                              <3> ExtOpen 			EQU 108 ; 108	 6C
   156                              <3> ;
   157                              <3> ;
   158                              <3> Set_Oem_Handler 		EQU 248 ; 248	 F8
   159                              <3> OEM_C1				EQU 249 ; 249	 F9
   160                              <3> OEM_C2				EQU 250 ; 250	 FA
   161                              <3> OEM_C3				EQU 251 ; 251	 FB
   162                              <3> OEM_C4				EQU 252 ; 252	 FC
   163                              <3> OEM_C5				EQU 253 ; 253	 FD
   164                              <3> OEM_C6				EQU 254 ; 254	 FE
   165                              <3> OEM_C7				EQU 255 ; 255	 FF
   175                              <2> 
   176                              <2> ;SUBTTL
   177                              <2> 
    11                              <1> %include "devsym.mac"
     1                              <2> 	%warning out: DEVSYM.INC...
     1          ******************  <2>  warning: out: DEVSYM.INC... [-w+user]
     2                              <2> ;	SCCSID = @(#)DEVSYM.ASM 1.10 85/09/04
     3                              <2> ;	SCCSID = @(#)DEVSYM.ASM 1.10 85/09/04
     4                              <2> 
     5                              <2> ; THE DEVICE TABLE LIST HAS THE FORM:
     6                              <2> SYSDEV	       STRUC
     7 00000000 ????????            <2> SDEVNEXT       DD    ?		    ;POINTER TO NEXT DEVICE HEADER
     8 00000004 ????                <2> SDEVATT        DW    ?		    ;ATTRIBUTES OF THE DEVICE
     9 00000006 ????                <2> SDEVSTRAT      DW    ?		    ;STRATEGY ENTRY POINT
    10 00000008 ????                <2> SDEVINT        DW    ?		    ;INTERRUPT ENTRY POINT
    11 0000000A ????????????????    <2> SDEVNAME       DB    8 DUP (?)	    ;NAME OF DEVICE (ONLY FIRST BYTE USED FOR BLOCK)
    12                              <2> SYSDEV	       ENDS
    13                              <2> 
    14                              <2> ;
    15                              <2> ; ATTRIBUTE BIT MASKS
    16                              <2> ;
    17                              <2> ; CHARACTER DEVICES:
    18                              <2> ;
    19                              <2> ; BIT 15 -> MUST BE 1
    20                              <2> ;     14 -> 1 IF THE DEVICE UNDERSTANDS IOCTL CONTROL STRINGS
    21                              <2> ;     13 -> 1 IF THE DEVICE SUPPORTS OUTPUT-UNTIL-BUSY
    22                              <2> ;     12 -> UNUSED
    23                              <2> ;     11 -> 1 IF THE DEVICE UNDERSTANDS OPEN/CLOSE
    24                              <2> ;     10 -> MUST BE 0
    25                              <2> ;      9 -> MUST BE 0
    26                              <2> ;      8 -> UNUSED
    27                              <2> ;      7 -> UNUSED
    28                              <2> ;      6 -> UNUSED
    29                              <2> ;      5 -> UNUSED
    30                              <2> ;      4 -> 1 IF DEVICE IS RECIPIENT OF INT 29H
    31                              <2> ;      3 -> 1 IF DEVICE IS CLOCK DEVICE
    32                              <2> ;      2 -> 1 IF DEVICE IS NULL DEVICE
    33                              <2> ;      1 -> 1 IF DEVICE IS CONSOLE OUTPUT
    34                              <2> ;      0 -> 1 IF DEVICE IS CONSOLE INPUT
    35                              <2> ;
    36                              <2> ; BLOCK DEVICES:
    37                              <2> ;
    38                              <2> ; BIT 15 -> MUST BE 0
    39                              <2> ;     14 -> 1 IF THE DEVICE UNDERSTANDS IOCTL CONTROL STRINGS
    40                              <2> ;     13 -> 1 IF THE DEVICE DETERMINES MEDIA BY EXAMINING THE FAT ID BYTE.
    41                              <2> ;	    THIS REQUIRES THE FIRST SECTOR OF THE FAT TO *ALWAYS* RESIDE IN
    42                              <2> ;	    THE SAME PLACE.
    43                              <2> ;     12 -> UNUSED
    44                              <2> ;     11 -> 1 IF THE DEVICE UNDERSTANDS OPEN/CLOSE/REMOVABLE MEDIA
    45                              <2> ;     10 -> MUST BE 0
    46                              <2> ;      9 -> MUST BE 0
    47                              <2> ;      8 -> UNUSED
    48                              <2> ;      7 -> UNUSED
    49                              <2> ;      6 -> IF DEVICE HAS SUPPORT FOR GETMAP/SETMAP OF LOGICAL DRIVES.
    50                              <2> ;	    IF THE DEVICE UNDERSTANDS GENERIC IOCTL FUNCTION CALLS.
    51                              <2> ;      5 -> UNUSED
    52                              <2> ;      4 -> UNUSED
    53                              <2> ;      3 -> UNUSED
    54                              <2> ;      2 -> UNUSED
    55                              <2> ;      1 -> UNUSED
    56                              <2> ;      0 -> UNUSED
    57                              <2> ;
    58                              <2> 
    59                              <2> DEVTYP	       EQU   8000H	    ; BIT 15 - 1  IF CHAR, 0 IF BLOCK
    60                              <2> CHARDEV        EQU   8000H
    61                              <2> DEVIOCTL       EQU   4000H	    ; BIT 14 - CONTROL MODE BIT
    62                              <2> ISFATBYDEV     EQU   2000H	    ; BIT 13 - DEVICE USES FAT ID BYTES,
    63                              <2> 				    ;  COMP MEDIA.
    64                              <2> OUTTILBUSY     EQU   2000H	    ; OUTPUT UNTIL BUSY IS ENABLED
    65                              <2> ISNET	       EQU   1000H	    ; BIT 12 - 1 IF A NET DEVICE, 0 IF
    66                              <2> 				    ;  NOT.  CURRENTLY BLOCK ONLY.
    67                              <2> DEVOPCL        EQU   0800H	    ; BIT 11 - 1 IF THIS DEVICE HAS
    68                              <2> 				    ;  OPEN,CLOSE AND REMOVABLE MEDIA
    69                              <2> 				    ;  ENTRY POINTS, 0 IF NOT
    70                              <2> 
    71                              <2> EXTENTBIT      EQU   0400H	    ; BIT 10 - CURRENTLY 0 ON ALL DEVS
    72                              <2> 				    ;  THIS BIT IS RESERVED FOR FUTURE USE
    73                              <2> 				    ;  TO EXTEND THE DEVICE HEADER BEYOND
    74                              <2> 				    ;  ITS CURRENT FORM.
    75                              <2> 
    76                              <2> ; NOTE BIT 9 IS CURRENTLY USED ON IBM SYSTEMS TO INDICATE "DRIVE IS SHARED".
    77                              <2> ;    SEE IOCTL FUNCTION 9. THIS USE IS NOT DOCUMENTED, IT IS USED BY SOME
    78                              <2> ;    OF THE UTILITIES WHICH ARE SUPPOSED TO FAIL ON SHARED DRIVES ON SERVER
    79                              <2> ;    MACHINES (FORMAT,CHKDSK,RECOVER,..).
    80                              <2> 
    81                              <2> DEV320	       EQU   0040H	    ;BIT 6 - FOR BLOCK DEVICES, THIS
    82                              <2> 				    ;DEVICE SUPPORTS SET/GET MAP OF
    83                              <2> 				    ;LOGICAL DRIVES, AND SUPPORTS
    84                              <2> 				    ;GENERIC IOCTL CALLS.
    85                              <2> 				    ;FOR CHARACTER DEVICES, THIS
    86                              <2> 				    ;DEVICE SUPPORTS GENERIC IOCTL.
    87                              <2> 				    ;THIS IS A DOS 3.2 DEVICE DRIVER.
    88                              <2> ISSPEC	       EQU   0010H	    ;BIT 4 - THIS DEVICE IS SPECIAL
    89                              <2> ISCLOCK        EQU   0008H	    ;BIT 3 - THIS DEVICE IS THE CLOCK DEVICE.
    90                              <2> ISNULL	       EQU   0004H	    ;BIT 2 - THIS DEVICE IS THE NULL DEVICE.
    91                              <2> ISCOUT	       EQU   0002H	    ;BIT 1 - THIS DEVICE IS THE CONSOLE OUTPUT.
    92                              <2> ISCIN	       EQU   0001H	    ;BIT 0 - THIS DEVICE IS THE CONSOLE INPUT.
    93                              <2> EXTDRVR        EQU   0002H	    ;BIT 1 - BLOCK DEVICE EXTNDED DRIVER
    94                              <2> 
    95                              <2> ;STATIC REQUEST HEADER
    96                              <2> SRHEAD	       STRUC
    97 00000000 ??                  <2> REQLEN	       DB    ?		    ;LENGTH IN BYTES OF REQUEST BLOCK
    98 00000001 ??                  <2> REQUNIT        DB    ?		    ;DEVICE UNIT NUMBER
    99 00000002 ??                  <2> REQFUNC        DB    ?		    ;TYPE OF REQUEST
   100 00000003 ????                <2> REQSTAT        DW    ?		    ;STATUS WORD
   101 00000005 ????????????????    <2> 	       DB    8 DUP(?)	    ;RESERVED FOR QUEUE LINKS
   102                              <2> SRHEAD	       ENDS
   103                              <2> 
   104                              <2> ;STATUS WORD MASKS
   105                              <2> STERR	       EQU   8000H	    ;BIT 15 - ERROR
   106                              <2> STBUI	       EQU   0200H	    ;BIT 9 - BUISY
   107                              <2> STDON	       EQU   0100H	    ;BIT 8 - DONE
   108                              <2> STECODE        EQU   00FFH	    ;ERROR CODE
   109                              <2> ;						  2/12/KK
   110                              <2> ; Interim  character identifier 		  2/12/KK
   111                              <2> Ddkey		EQU	0000010000000000B	; 2/12/KK
   112                              <2> 
   113                              <2> ;FUNCTION CODES
   114                              <2> DEVINIT        EQU   0		    ;INITIALIZATION
   115                              <2> DINITHL        EQU   26 	    ;SIZE OF INIT HEADER
   116                              <2> DEVMDCH        EQU   1		    ;MEDIA CHECK
   117                              <2> DMEDHL	       EQU   15 	    ;SIZE OF MEDIA CHECK HEADER
   118                              <2> DEVBPB	       EQU   2		    ;GET BPB
   119                              <2> DEVRDIOCTL     EQU   3		    ;IOCTL READ
   120                              <2> DBPBHL	       EQU   22 	    ;SIZE OF GET BPB HEADER
   121                              <2> DEVRD	       EQU   4		    ;READ
   122                              <2> DRDWRHL        EQU   22 	    ;SIZE OF RD/WR HEADER
   123                              <2> DEVRDND        EQU   5		    ;NON DESTRUCTIVE READ NO WAIT (CHARACTER DEVS)
   124                              <2> DRDNDHL        EQU   14 	    ;SIZE OF NON DESTRUCTIVE READ HEADER
   125                              <2> DEVIST	       EQU   6		    ;INPUT STATUS
   126                              <2> DSTATHL        EQU   13 	    ;SIZE OF STATUS HEADER
   127                              <2> DEVIFL	       EQU   7		    ;INPUT FLUSH
   128                              <2> DFLSHL	       EQU   15 	    ;SIZE OF FLUSH HEADER
   129                              <2> DEVWRT	       EQU   8		    ;WRITE
   130                              <2> DEVWRTV        EQU   9		    ;WRITE WITH VERIFY
   131                              <2> DEVOST	       EQU   10 	    ;OUTPUT STATUS
   132                              <2> DEVOFL	       EQU   11 	    ;OUTPUT FLUSH
   133                              <2> DEVWRIOCTL     EQU   12 	    ;IOCTL WRITE
   134                              <2> DEVOPN	       EQU   13 	    ;DEVICE OPEN
   135                              <2> DEVCLS	       EQU   14 	    ;DEVICE CLOSE
   136                              <2> DOPCLHL        EQU   13 	    ;SIZE OF OPEN/CLOSE HEADER
   137                              <2> DEVRMD	       EQU   15 	    ;REMOVABLE MEDIA
   138                              <2> REMHL	       EQU   13 	    ;SIZE OF REMOVABLE MEDIA HEADER
   139                              <2> GENIOCTL       EQU   19
   140                              <2> ; THE NEXT THREE ARE USED IN DOS 4.0
   141                              <2> ;		     20
   142                              <2> ;		     21
   143                              <2> ;		     22
   144                              <2> DEVGETOWN      EQU   23 	    ;GET DEVICE OWNER
   145                              <2> DEVSETOWN      EQU   24 	    ;SET DEVICE OWNER
   146                              <2> QUERYGENIOCTL equ 25		; query generic IOCTL support (MS-DOS v5+)
   147                              <2> OWNHL	       EQU   13 	    ;SIZE OF DEVICE OWNER HEADER
   148                              <2> 
   149                              <2> DEVOUT	       EQU   16 	    ; OUTPUT UNTIL BUSY.
   150                              <2> DEVOUTL        EQU   DEVWRT	    ; LENGTH OF OUTPUT UNTIL BUSY
   151                              <2> 
   152                              <2> ; GENERIC IOCTL REQUEST STRUCTURE
   153                              <2> ;	SEE THE DOS 4.0 DEVICE DRIVER SPEC FOR FURTHER ELABORATION.
   154                              <2> ;
   155                              <2> IOCTL_REQ      STRUC
   156 00000000 <res Dh>            <2> 	       DB    (SRHEAD_struc_size) DUP(?)
   157                              <2> 				    ; GENERIC IOCTL ADDITION.
   158 0000000D ??                  <2> MAJORFUNCTION  DB    ?		    ;FUNCTION CODE
   159 0000000E ??                  <2> MINORFUNCTION  DB    ?		    ;FUNCTION CATEGORY
   160 0000000F ????                <2> REG_SI	       DW    ?
   161 00000011 ????                <2> REG_DI	       DW    ?
   162 00000013 ????????            <2> GENERICIOCTL_PACKET DD ?	    ; POINTER TO DATA BUFFER
   163                              <2> IOCTL_REQ      ENDS
   164                              <2> 
   165                              <2> ;	DEFINITIONS FOR IOCTL_REQ.MINORFUNCTION
   166                              <2> GEN_IOCTL_WRT_TRK   EQU   40H
   167                              <2> GEN_IOCTL_RD_TRK    EQU   60H
   168                              <2> GEN_IOCTL_FN_TST    EQU   20H	    ; USED TO DIFF. BET READS AND WRTS
   169                              <2> 
   170                              <2> ;; 32-bit absolute read/write input list structure
   171                              <2> 
   172                              <2> ABS_32RW	 STRUC
   173 00000000 ????????            <2> SECTOR_RBA	 DD	 ?	    ; relative block address
   174 00000004 ????                <2> ABS_RW_COUNT	 DW	 ?	    ; number of sectors to be transferred
   175 00000006 ????????            <2> BUFFER_ADDR	 DD	 ?	    ; data addrress
   176                              <2> ABS_32RW	 ENDS
   177                              <2> 
   178                              <2> ;; media ID info
   179                              <2> 
   180                              <2> MEDIA_ID_INFO	 STRUC
   181 00000000 ????                <2> MEDIA_level	 DW	 ?	    ; info level
   182 00000002 ????????            <2> MEDIA_Serial	 DD	 ?	    ; serial #
   183 00000006 <res Bh>            <2> MEDIA_Label	 DB	 11 dup (?) ;volume label
   184 00000011 ????????????????    <2> MEDIA_System	 DB	 8  dup (?) ;system type
   185                              <2> MEDIA_ID_INFO	 ENDS
   186                              <2> 
   187                              <2> ;; equates for DOS34_FLAG
   188                              <2> 
   189                              <2> IFS_ABSRW	      EQU   00001H	   ;IFS absolute read/write
   190                              <2> NO_IFS_ABSRW	      EQU   0FFFEH	   ;no IFS absolute read/write
   191                              <2> IFS_DRIVE_RESET       EQU   00002H	   ;IFS drvive reset
   192                              <2> NO_IFS_DRIVE_RESET    EQU   0FFFDH	   ;no IFS drive reset
   193                              <2> FROM_DISK_RESET       EQU   00004H	   ;from disk reset
   194                              <2> NO_FROM_DISK_RESET    EQU   0FFFBH	   ;not from disk reset
   195                              <2> From_String_Output    EQU   00008H	   ;from con string output
   196                              <2> NO_From_String_Output EQU   0FFF7H	   ;not from con string output
   197                              <2> From_DOS_WRITE	      EQU   00010H	   ;from dos_write
   198                              <2> NO_From_DOS_WRITE     EQU   0FFEFH	   ;not from dos_write
   199                              <2> Force_I24_Fail	      EQU   00020H	   ;form IFS CALL BACK
   200                              <2> NO_Force_I24_Fail     EQU   0FFDFH	   ;not form IFS CALL BACK
   201                              <2> Disable_EOF_I24       EQU   00040H	   ;disable EOF int24 for input status
   202                              <2> NO_Disable_EOF_I24    EQU   0FFBFH	   ;disable EOF int24 for input status
   203                              <2> DBCS_VOLID	      EQU   00080H	   ;indicate from volume id
   204                              <2> DBCS_VOLID2	      EQU   00100H	   ;indicate 8th char is DBCS
   205                              <2> CTRL_BREAK_FLAG       EQU   00200H	   ;indicate control break is input
   206                              <2> NO_CTRL_BREAK_FLAG    EQU   0FDFFH	   ;reset control break
   207                              <2> SEARCH_FASTOPEN       EQU   00400H	   ;set fastopen flag for search
   208                              <2> X25_special	      EQU   00800H	   ;flag for X25 driver
    12                              <1> %include "ifssym.mac"
     1                              <2> ;	PAGE	,132;	SCCSID = @(#)ifssym.inc 1.0 87/05/11
     2                              <2> ;******************************************************************************
     3                              <2> ;   IFS Symbol File
     4                              <2> ;
     5                              <2> ; REVISION HISTORY:
     6                              <2> ;	A000	Original version  4.00		  May 1987
     7                              <2> ;	A001	DCR 158 - merge unc info in attach start/status requests      8/87 RGAZZIA
     8                              <2> ;	A002	DCR 187 - ctrl req renumber, make attach type byte	      8/87 RGAZZIA
     9                              <2> ;	A003	PTM 764 - printer attach problems			      8/87 RGAZZIA
    10                              <2> ;	A004	PTM ???? - Write Only locks on Read/Write		     10/27 FEIGENBAUM
    11                              <2> ;	A005	DCR 285 - remove Extended Attribute/Lock support	      1/88 RG
    12                              <2> ;	A006	PTM 2827  error proc					      1/88 RG
    13                              <2> ;	A007	PTM 3334- reset envirn subfunc to eop			      2/88 RMG
    14                              <2> ;	A008	PTM 3745- commit across net problem due to sft flags problem  3/88 RMG
    15                              <2> ;	A009	PTM 3810- new sft unique id in sff			      3/88 RMG
    16                              <2> ;	A010	PTM 4392- ditch sf_iomode,cp				      4/18/88 RMG
    17                              <2> ;
    18                              <2> ;   LOD - 414
    19                              <2> ;
    20                              <2> ;******************************************************************************
    21                              <2> 											 ;AN000;
    22                              <2> ;SUBTTL	IFS Driver Header								 ;AN000;
    23                              <2> ;PAGE											 ;AN000;
    24                              <2> 											 ;AN000;
    25                              <2> IFSHEADER	STRUC									 ;AN000;
    26 00000000 ????????            <2> IFS_NEXT	DD	?	; Next header in list (-1=end)				 ;AN000;
    27 00000004 ????????????????    <2> IFS_NAME	DB	8 dup (?) ; IFS name                                            ;AN000;
    28 0000000C ????                <2> IFS_ATTRIBUTE	DW	?	; Attributes						 ;AN000;
    29 0000000E ????                <2> IFS_VERSION	DW	?	; Request level supported				 ;AN000;
    30 00000010 ????????            <2> IFS_DOSCALL@	DD	?	; DOS interface routine 				 ;AN000;
    31                              <2> 				;   (set by TUPPER before the init call)		 ;AN000;
    32 00000014 ????                <2> IFS_CALL@	DW	?	; Function entry point					 ;AN000;
    33                              <2> IFSHEADER	ENDS									 ;AN000;
    34                              <2> 											 ;AN000;
    35                              <2> ; ifs_attribute equates 								 ;AN000;
    36                              <2> 											 ;AN000;
    37                              <2> IFSDEVICE	EQU	8000H	;  Supports single device/file functions		 ;AN000;
    38                              <2> IFSDISK 	EQU	4000H	;  Supports multi-file functions			 ;AN000;
    39                              <2> IFSUNC		EQU	2000H	;  Support UNC (nameless) connection			 ;AN000;
    40                              <2> IFSREMOTE	EQU	0800H	;  File system is remote				 ;AN000;
    41                              <2> IFSFILTER	EQU	0400H	;  FS will filter (if off, use DOS			 ;AN000;
    42                              <2> 				;    standard, cap & 8.3)				 ;AN000;
    43                              <2> IFSIOCTL	EQU	0002H	;  Supports IOCTL functions				 ;AN000;
    44                              <2> IFSUSESHARE	EQU	0001H	;  Uses DOS share support (vs own share)		 ;AN000;
    45                              <2> 											 ;AN000;
    46                              <2> 											 ;AN000;
    47                              <2> ;SUBTTL	IFSRH - IFS Request Header							 ;AN000;
    48                              <2> ;PAGE											 ;AN000;
    49                              <2> 											 ;AN000;
    50                              <2> ; IFS Request Header									 ;AN000;
    51                              <2> 											 ;AN000;
    52                              <2> IFSRH		STRUC									 ;AN000;
    53 00000000 ????                <2> IFSR_LENGTH	DW    ? 		; Total length of request			 ;AN000;
    54 00000002 ??                  <2> IFSR_FUNCTION	DB    ? 		; Requested function				 ;AN000;
    55 00000003 ????                <2> IFSR_RETCODE	DW    ? 		; Explicit error				 ;AN000;
    56 00000005 ??                  <2> IFSR_RETCLASS	DB    ? 		; Error class					 ;AN000;
    57 00000006 <res 10h>           <2> IFSR_RESV1	DB    16 DUP(?) 	; DOS reserved					 ;AN000;
    58 00000016 <res 32h>           <2> IFSR_FCN_PARMS	DB    50 DUP(?) 	; Additional parameters 			 ;AN000;
    59                              <2> IFSRH		ENDS									 ;AN000;
    60                              <2> 											 ;AN000;
    61                              <2> ; IFSR_FUNCTION codes									 ;AN000;
    62                              <2> ;	Control requests:								 ;AN000;
    63                              <2> IFSINIT        EQU     1								 ;AN000;
    64                              <2> IFSATTSTART    EQU     2								 ;AN000;
    65                              <2> IFSATTSTAT     EQU     3								 ;AC002;
    66                              <2> IFSATTEND      EQU     4								 ;AC002;
    67                              <2> IFSEXECAPI     EQU     5								 ;AC002;
    68                              <2> IFSCRITMSG     EQU     6								 ;AC002;
    69                              <2> IFSUPDATECB    EQU     7								 ;AC002;
    70                              <2> 											 ;AN000;
    71                              <2> ; IFSR_APIFUNC	codes:									 ;AN000;
    72                              <2> ;      Int 21 mapped requests:								 ;AN000;
    73                              <2> IFSDRIVERESET	   EQU	 1								 ;AN000;
    74                              <2> IFSDISKATTR	   EQU	 2								 ;AN000;
    75                              <2> IFSMKDIR	   EQU	 3								 ;AN000;
    76                              <2> IFSRMDIR	   EQU	 4								 ;AN000;
    77                              <2> IFSCHDIR	   EQU	 5								 ;AN000;
    78                              <2> IFSDELFILE	   EQU	 6								 ;AN000;
    79                              <2> IFSRENFILE	   EQU	 7								 ;AN000;
    80                              <2> IFSSEARCHFILE	   EQU	 8								 ;AN000;
    81                              <2> IFSOPENFILE	   EQU	 9								 ;AN000;
    82                              <2> IFSLSEEKFILE	   EQU	10								 ;AN000;
    83                              <2> IFSREADFILE	   EQU	11								 ;AN000;
    84                              <2> IFSWRITEFILE	   EQU	12								 ;AN000;
    85                              <2> IFSLOCKFILE	   EQU	13								 ;AN000;
    86                              <2> IFSCLOSEFILE	   EQU	14								 ;AN000;
    87                              <2> IFSFILEATTR	   EQU	15								 ;AN000;
    88                              <2> IFSDEPIOCTL	   EQU	16								 ;AN000;
    89                              <2> IFSDEVIOCTL	   EQU	17								 ;AN000;
    90                              <2> IFSEOP		   EQU	18								 ;AN000;
    91                              <2> IFSEOCID	   EQU	19								 ;AN000;
    92                              <2> 											 ;AN000;
    93                              <2> ;SUBTTL	Control Request Parameter Macro 						 ;AN000;
    94                              <2> ;PAGE											 ;AN000;
    95                              <2> 
    96                              <2> %if 0	; for fixmem.pl
    97                              <2> labelsize IFSR_ACTION, word, invalidaddress
    98                              <2> labelsize IFSR_ALLOCSIZE, word, invalidaddress
    99                              <2> labelsize IFSR_ALLOCUNITS, word, invalidaddress
   100                              <2> labelsize IFSR_ALLOWED, byte, invalidaddress
   101                              <2> labelsize IFSR_APIFUNC, byte, invalidaddress
   102                              <2> labelsize IFSR_API_PARMS, byte, invalidaddress
   103                              <2> labelsize IFSR_ATTR, word, invalidaddress
   104                              <2> labelsize IFSR_AVAILALLOC, word, invalidaddress
   105                              <2> labelsize IFSR_BUFFER1@, dword, invalidaddress
   106                              <2> labelsize IFSR_BUFFER2@, dword, invalidaddress
   107                              <2> labelsize IFSR_BUFFER@, dword, invalidaddress
   108                              <2> labelsize IFSR_BUFSIZE, word, invalidaddress
   109                              <2> labelsize IFSR_CATEGORY, byte, invalidaddress
   110                              <2> labelsize IFSR_CB@, dword, invalidaddress
   111                              <2> labelsize IFSR_CONTINFO@, dword, invalidaddress
   112                              <2> labelsize IFSR_COUNT, word, invalidaddress
   113                              <2> labelsize IFSR_CP, word, invalidaddress
   114                              <2> labelsize IFSR_CPSW, byte, invalidaddress
   115                              <2> labelsize IFSR_CTLFUNC, byte, invalidaddress
   116                              <2> labelsize IFSR_DATE, word, invalidaddress
   117                              <2> labelsize IFSR_DEVICE_CB@, dword, invalidaddress
   118                              <2> labelsize IFSR_DEVICE_STATUS, byte, invalidaddress
   119                              <2> labelsize IFSR_ERROR_ACTION, byte, invalidaddress
   120                              <2> labelsize IFSR_ERROR_CLASS, byte, invalidaddress
   121                              <2> labelsize IFSR_ERROR_LOCUS, byte, invalidaddress
   122                              <2> labelsize IFSR_FLAG, word, invalidaddress
   123                              <2> labelsize IFSR_FSID, byte, invalidaddress
   124                              <2> labelsize IFSR_FUNC, byte, invalidaddress
   125                              <2> labelsize IFSR_I24_COUNT, byte, invalidaddress
   126                              <2> labelsize IFSR_I24_RESP, byte, invalidaddress
   127                              <2> labelsize IFSR_LK_LENGTH, dword, invalidaddress
   128                              <2> labelsize IFSR_LK_POSITION, dword, invalidaddress
   129                              <2> labelsize IFSR_LSN, word, invalidaddress
   130                              <2> labelsize IFSR_MATCHATTR, word, invalidaddress
   131                              <2> labelsize IFSR_MATCHATTR_47, word, invalidaddress
   132                              <2> labelsize IFSR_MAX_XMITT_SIZE, word, invalidaddress
   133                              <2> labelsize IFSR_MODE_BYTE, byte, invalidaddress
   134                              <2> labelsize IFSR_MODE_WORD, word, invalidaddress
   135                              <2> labelsize IFSR_MSG@, dword, invalidaddress
   136                              <2> labelsize IFSR_MSG_TYPE, byte, invalidaddress
   137                              <2> labelsize IFSR_NAME1@, dword, invalidaddress
   138                              <2> labelsize IFSR_NAME2@, dword, invalidaddress
   139                              <2> labelsize IFSR_NAME@, dword, invalidaddress
   140                              <2> labelsize IFSR_NET_NAME_ID, word, invalidaddress
   141                              <2> labelsize IFSR_OPEN_CB@, dword, invalidaddress
   142                              <2> labelsize IFSR_PARMS@, dword, invalidaddress
   143                              <2> labelsize IFSR_PID, word, invalidaddress
   144                              <2> labelsize IFSR_POSITION, dword, invalidaddress
   145                              <2> labelsize IFSR_RESSIZE, word, invalidaddress
   146                              <2> labelsize IFSR_SECTSIZE, word, invalidaddress
   147                              <2> labelsize IFSR_SIZE, dword, invalidaddress
   148                              <2> labelsize IFSR_SUBFUNC, byte, invalidaddress
   149                              <2> labelsize IFSR_TIME, word, invalidaddress
   150                              <2> labelsize IFSR_TYPE, byte, invalidaddress
   151                              <2> labelsize IFSR_UID, word, invalidaddress
   152                              <2> labelsize IFSR_USER_WORD, word, invalidaddress
   153                              <2> %endif
   154                              <2> 
   155                              <2> 
   156                              <2> ; NASM original macros
   157                              <2> 
   158                              <2> %macro undefine_all_ifsr_labels 0.nolist
   159                              <2> %undef IFSR_ACTION
   160                              <2> %undef IFSR_ALLOCSIZE
   161                              <2> %undef IFSR_ALLOCUNITS
   162                              <2> %undef IFSR_ALLOWED
   163                              <2> %undef IFSR_APIFUNC
   164                              <2> %undef IFSR_API_PARMS
   165                              <2> %undef IFSR_ATTR
   166                              <2> %undef IFSR_AVAILALLOC
   167                              <2> %undef IFSR_BUFFER1@
   168                              <2> %undef IFSR_BUFFER2@
   169                              <2> %undef IFSR_BUFFER@
   170                              <2> %undef IFSR_BUFSIZE
   171                              <2> %undef IFSR_CATEGORY
   172                              <2> %undef IFSR_CB@
   173                              <2> %undef IFSR_CONTINFO@
   174                              <2> %undef IFSR_COUNT
   175                              <2> %undef IFSR_CP
   176                              <2> %undef IFSR_CPSW
   177                              <2> %undef IFSR_CTLFUNC
   178                              <2> %undef IFSR_DATE
   179                              <2> %undef IFSR_DEVICE_CB@
   180                              <2> %undef IFSR_DEVICE_STATUS
   181                              <2> %undef IFSR_ERROR_ACTION
   182                              <2> %undef IFSR_ERROR_CLASS
   183                              <2> %undef IFSR_ERROR_LOCUS
   184                              <2> %undef IFSR_FLAG
   185                              <2> %undef IFSR_FSID
   186                              <2> %undef IFSR_FUNC
   187                              <2> %undef IFSR_I24_COUNT
   188                              <2> %undef IFSR_I24_RESP
   189                              <2> %undef IFSR_LK_LENGTH
   190                              <2> %undef IFSR_LK_POSITION
   191                              <2> %undef IFSR_LSN
   192                              <2> %undef IFSR_MATCHATTR
   193                              <2> %undef IFSR_MATCHATTR_47
   194                              <2> %undef IFSR_MAX_XMITT_SIZE
   195                              <2> %undef IFSR_MODE_BYTE
   196                              <2> %undef IFSR_MODE_WORD
   197                              <2> %undef IFSR_MSG@
   198                              <2> %undef IFSR_MSG_TYPE
   199                              <2> %undef IFSR_NAME1@
   200                              <2> %undef IFSR_NAME2@
   201                              <2> %undef IFSR_NAME@
   202                              <2> %undef IFSR_NET_NAME_ID
   203                              <2> %undef IFSR_OPEN_CB@
   204                              <2> %undef IFSR_PARMS@
   205                              <2> %undef IFSR_PID
   206                              <2> %undef IFSR_POSITION
   207                              <2> %undef IFSR_RESSIZE
   208                              <2> %undef IFSR_SECTSIZE
   209                              <2> %undef IFSR_SIZE
   210                              <2> %undef IFSR_SUBFUNC
   211                              <2> %undef IFSR_TIME
   212                              <2> %undef IFSR_TYPE
   213                              <2> %undef IFSR_UID
   214                              <2> %undef IFSR_USER_WORD
   215                              <2> %endmacro
   216                              <2> 
   217                              <2> %macro IFSR_FCN_DEF 1.nolist
   218                              <2> 	undefine_all_ifsr_labels
   219                              <2> 		    %ifidni  %1, INIT 						 ;AN000;
   220                              <2> labelsize IFSR_PARMS@, dword, IFSR_FCN_PARMS    ; command parameters		 ;AN000;
   221                              <2> labelsize IFSR_RESSIZE, word, IFSR_FCN_PARMS+4  ; driver total size 		 ;AN000;
   222                              <2>  LENGTH_INIT	    EQU IFSR_RESSIZE-IFSRH+2						 ;AN000;
   223                              <2> 											 ;AN000;
   224                              <2> 		    %ELSE								 ;AN000;
   225                              <2> 		    %ifidni  %1, ATTSTART						 ;AN000;
   226                              <2> labelsize IFSR_TYPE, byte, IFSR_FCN_PARMS    ; attach type			 ;AC001;
   227                              <2> labelsize IFSR_PARMS@, dword, IFSR_FCN_PARMS+2  ; command parameters		 ;AN000;
   228                              <2> labelsize IFSR_DEVICE_CB@, dword, IFSR_FCN_PARMS+6  ; CD/DF				 ;AN000;
   229                              <2> labelsize IFSR_USER_WORD, word, IFSR_FCN_PARMS+10 ; for unc deviceless attach 	 ;AN001;
   230                              <2>  LENGTH_ATTSTART    EQU IFSR_USER_WORD-IFSRH+2						 ;AC001;/;AC004;
   231                              <2> 											 ;AN000;
   232                              <2> 		    %ELSE								 ;AN000;
   233                              <2> 		    %ifidni  %1, ATTSTAT						 ;AN000;
   234                              <2> labelsize IFSR_TYPE, byte, IFSR_FCN_PARMS    ; attach type			 ;AC001;
   235                              <2> labelsize IFSR_PARMS@, dword, IFSR_FCN_PARMS+2  ; command parameters		 ;AN000;
   236                              <2> labelsize IFSR_DEVICE_CB@, dword, IFSR_FCN_PARMS+6  ; CD/DF				 ;AN000;
   237                              <2> labelsize IFSR_USER_WORD, word, IFSR_FCN_PARMS+10 ; for unc deviceless attach 	 ;AN001;
   238                              <2> labelsize IFSR_MAX_XMITT_SIZE, word, IFSR_FCN_PARMS+12 ; redir-maximum transmit size	 ;AN001;
   239                              <2> labelsize IFSR_NET_NAME_ID, word, IFSR_FCN_PARMS+14 ; redir-net name id 		 ;AN001;
   240                              <2> labelsize IFSR_LSN, word, IFSR_FCN_PARMS+16 ; redir-low byte=local session #	 ;AN001;
   241                              <2> labelsize IFSR_DEVICE_STATUS, byte, IFSR_FCN_PARMS+18 ; redir-interesting bits		 ;AN001;
   242                              <2>  LENGTH_ATTSTAT     EQU IFSR_DEVICE_STATUS-IFSRH+2					 ;AC001;
   243                              <2> 											 ;AN000;
   244                              <2> 		    %ELSE								 ;AN000;
   245                              <2> 		    %ifidni  %1, ATTEND						 ;AN000;
   246                              <2> labelsize IFSR_DEVICE_CB@, dword, IFSR_FCN_PARMS    ; CD/DF				 ;AN000;
   247                              <2> labelsize IFSR_NAME@, dword, IFSR_FCN_PARMS+4  ; UNC deviceless detach		 ;AN000;
   248                              <2>  LENGTH_ATTEND	    EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   249                              <2> 											 ;AN000;
   250                              <2> 		    %ELSE								 ;AN000;
   251                              <2> 		    %ifidni  %1, EXECAPI						 ;AN000;
   252                              <2> labelsize IFSR_APIFUNC, byte, IFSR_FCN_PARMS    ; API function code 		 ;AN000;
   253                              <2> labelsize IFSR_ERROR_CLASS, byte, IFSR_FCN_PARMS+1  ; DOS extended error class		 ;AN000;
   254                              <2> labelsize IFSR_ERROR_ACTION, byte, IFSR_FCN_PARMS+2  ; DOS extended error action 	 ;AN000;
   255                              <2> labelsize IFSR_ERROR_LOCUS, byte, IFSR_FCN_PARMS+3  ; DOS extended error locus		 ;AN000;
   256                              <2> labelsize IFSR_ALLOWED, byte, IFSR_FCN_PARMS+4  ; DOS extended error locus		 ;AN000;
   257                              <2> labelsize IFSR_I24_COUNT, byte, IFSR_FCN_PARMS+5  ; critical error retry count	 ;AN000;
   258                              <2> 						    ;  0=first time			 ;AN000;
   259                              <2> labelsize IFSR_I24_RESP, byte, IFSR_FCN_PARMS+6  ; critical error response		 ;AN000;
   260                              <2> 						    ;	 0=ignore  1=retry		 ;AN000;
   261                              <2> labelsize IFSR_DEVICE_CB@, dword, IFSR_FCN_PARMS+8  ; device (CD or DF) 		 ;AN000;
   262                              <2> labelsize IFSR_OPEN_CB@, dword, IFSR_FCN_PARMS+12 ; open file instance  (SF)		 ;AN000;
   263                              <2> labelsize IFSR_API_PARMS, byte, IFSR_FCN_PARMS+16					 ;AN000;
   264                              <2> 											 ;AN000;
   265                              <2> 		    %ELSE								 ;AN000;
   266                              <2> 		    %ifidni  %1, CRITMSG						 ;AN000;
   267                              <2> labelsize IFSR_MSG@, dword, IFSR_FCN_PARMS    ; message buffer address		 ;AN000;
   268                              <2> labelsize IFSR_MSG_TYPE, byte, IFSR_FCN_PARMS+4  ; message type			 ;AN000;
   269                              <2> 						 ; 1=message is printed in form 	 ;AN000;
   270                              <2> 						 ;    <message> 			 ;AN000;
   271                              <2> 						 ;    Abort,Retry,Ignore,Fail		 ;AN000;
   272                              <2> 						 ; 0=message is printed in form 	 ;AN000;
   273                              <2> 				 ; <message> error (read/writ)ing (drive/device) XXX ;	 ;AN000;
   274                              <2> 				 ; Abort,Retry,Ignore,Fail				 ;AN000;
   275                              <2> 											 ;AN000;
   276                              <2>  LENGTH_CRITMSG     EQU IFSR_MSG_TYPE-IFSRH+2						 ;AN000;
   277                              <2> 											 ;AN000;
   278                              <2> 		    %ELSE								 ;AN000;
   279                              <2> 		    %ifidni  %1, UPDATECB						 ;AN000;
   280                              <2> labelsize IFSR_CB@, dword, IFSR_FCN_PARMS	; control block address 	 ;AN000;
   281                              <2> labelsize IFSR_TYPE, byte, IFSR_FCN_PARMS+4	; control block type		 ;AN000;
   282                              <2>  IFSOPEN	    EQU   0		  ; open instance (SFT) entry			 ;AN000;
   283                              <2>  IFSCB		    EQU   -1		  ; see control block type field		 ;AN000;
   284                              <2>  LENGTH_UPDATECB    EQU IFSR_TYPE-IFSRH+2						 ;AN000;
   285                              <2> 											 ;AN000;
   286                              <2> 		    %ENDIF								 ;AN000;
   287                              <2> 		    %ENDIF								 ;AN000;
   288                              <2> 		    %ENDIF								 ;AN000;
   289                              <2> 		    %ENDIF								 ;AN000;
   290                              <2> 		    %ENDIF								 ;AN000;
   291                              <2> 		    %ENDIF								 ;AN000;
   292                              <2> 		    %ENDIF								 ;AN000;
   293                              <2> %endmacro
   294                              <2> 											 ;AN000;
   295                              <2> ;SUBTTL	INT 21H Mapped Request Parameter Macro						 ;AN000;
   296                              <2> ;PAGE											 ;AN000;
   297                              <2> 											 ;AN000;
   298                              <2> %macro IFSR_API_DEF 1.nolist								 ;AN000;
   299                              <2> 	undefine_all_ifsr_labels
   300                              <2> 
   301                              <2> 		    %ifidni  %1, DRIVERESET						 ;AN000;
   302                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 0=flush				 ;AN000;
   303                              <2>  LENGTH_DRIVERESET  EQU IFSR_FUNC-IFSRH+2						 ;AN000;
   304                              <2> 											 ;AN000;
   305                              <2> 		    %ELSE								 ;AN000;
   306                              <2> 		    %ifidni  %1, DISKATTR						 ;AN000;
   307                              <2> labelsize IFSR_ALLOCUNITS, word, IFSR_API_PARMS    ; # allocation units		 ;AN000;
   308                              <2> labelsize IFSR_ALLOCSIZE, word, IFSR_API_PARMS+2  ; allocation unit sectors		 ;AN000;
   309                              <2> labelsize IFSR_SECTSIZE, word, IFSR_API_PARMS+4  ; sector size			 ;AN000;
   310                              <2> labelsize IFSR_AVAILALLOC, word, IFSR_API_PARMS+6  ; free allocation units		 ;AN000;
   311                              <2> labelsize IFSR_FSID, byte, IFSR_API_PARMS+8  ; file system media id		 ;AN000;
   312                              <2>  LENGTH_DISKATTR    EQU IFSR_FSID-IFSRH+2						 ;AN000;
   313                              <2> 											 ;AN000;
   314                              <2> 		    %ELSE								 ;AN000;
   315                              <2> 		    %ifidni  %1, MKDIR						 ;AN000;
   316                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS    ; asciiz name to process		 ;AN000;
   317                              <2>  LENGTH_MKDIR	    EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   318                              <2> 											 ;AN000;
   319                              <2> 		    %ELSE								 ;AN000;
   320                              <2> 		    %ifidni  %1, RMDIR						 ;AN000;
   321                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS    ; asciiz name to process		 ;AN000;
   322                              <2>  LENGTH_RMDIR	    EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   323                              <2> 											 ;AN000;
   324                              <2> 		    %ELSE								 ;AN000;
   325                              <2> 		    %ifidni  %1, CHDIR						 ;AN000;
   326                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS    ; asciiz name to process		 ;AN000;
   327                              <2>  LENGTH_CHDIR	    EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   328                              <2> 											 ;AN000;
   329                              <2> 		    %ELSE								 ;AN000;
   330                              <2> 		    %ifidni  %1, DELFILE						 ;AN000;
   331                              <2> labelsize IFSR_MATCHATTR_47, word, IFSR_API_PARMS    ; format 00000000e0a00shr		 ;AN000;
   332                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS+2  ; file to delete			 ;AN000;
   333                              <2>  LENGTH_DELFILE     EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   334                              <2> 											 ;AN000;
   335                              <2> 		    %ELSE								 ;AN000;
   336                              <2> 		    %ifidni  %1, RENFILE						 ;AN000;
   337                              <2> labelsize IFSR_MATCHATTR, word, IFSR_API_PARMS    ; format 00000000e0a00shr		 ;AN000;
   338                              <2> labelsize IFSR_NAME1@, dword, IFSR_API_PARMS+2  ; file to rename			 ;AN000;
   339                              <2> labelsize IFSR_NAME2@, dword, IFSR_API_PARMS+6  ; new file name			 ;AN000;
   340                              <2>  LENGTH_RENFILE     EQU IFSR_NAME2@-IFSRH+4						 ;AN000;
   341                              <2> 											 ;AN000;
   342                              <2> 		    %ELSE								 ;AN000;
   343                              <2> 		    %ifidni  %1, SEARCHFILE						 ;AN000;
   344                              <2> labelsize IFSR_SUBFUNC, byte, IFSR_API_PARMS    ; 1=first, 2=next			 ;AN000;
   345                              <2> labelsize IFSR_CONTINFO@, dword, IFSR_API_PARMS+2  ; continuation info addr		 ;AN000;
   346                              <2> labelsize IFSR_MATCHATTR, word, IFSR_API_PARMS+6  ; format 0000000re0advshr  (1st)	 ;AN000;
   347                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS+8  ; asciiz name to process   (1st)	 ;AN000;
   348                              <2>  LENGTH_SEARCHFILE  EQU IFSR_NAME@-IFSRH+4						 ;AN000;
   349                              <2> 											 ;AN000;
   350                              <2> 		    %ELSE								 ;AN000;
   351                              <2> 		    %ifidni  %1, OPENFILE						 ;AN000;
   352                              <2> labelsize IFSR_MODE_WORD, word, IFSR_API_PARMS    ; open mode 			 ;AN000;
   353                              <2> 						 ;  format: 0WF0000CISSS0AAA		 ;AN000;
   354                              <2> 						 ;  AAA=access code 0=read,1=write	 ;AN000;
   355                              <2> 						 ;		    2=read/write	 ;AN000;
   356                              <2> 						 ;  SSS=sharing mode 0=compatibility	 ;AN000;
   357                              <2> 						 ;	1=deny r/w, 2=deny write	 ;AN000;
   358                              <2> 						 ;	3=deny read, 4=deny none	 ;AN000;
   359                              <2> 						 ;  I 0=pass handle to child, 1=no inheri;AN000;t
   360                              <2> 						 ;  C 0=validate cp, 1=no cp check	 ;AN000;
   361                              <2> 						 ;  F 0=int 24H, 1=return error on	 ;AN000;
   362                              <2> 						 ;  this open & any I/O to this handle	 ;AN000;
   363                              <2> 						 ;  W 0=no commit, 1=auto-commit on	 ;AN000;
   364                              <2> 						 ;		     write		 ;AN000;
   365                              <2> labelsize IFSR_FLAG, word, IFSR_API_PARMS+2  ; function control;  format=CE	 ;AN000;
   366                              <2> 						 ; C=does not exist action		 ;AN000;
   367                              <2> 						 ; 0=fail, 1=create			 ;AN000;
   368                              <2> 						 ; E=exists action			 ;AN000;
   369                              <2> 						 ; 0=fail, 1=open, 2=replace/open	 ;AN000;
   370                              <2> labelsize IFSR_CP, word, IFSR_API_PARMS+4  ; global code page			 ;AN000;
   371                              <2> labelsize IFSR_CPSW, byte, IFSR_API_PARMS+6  ; CPSW flag 			 ;AN000;
   372                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS+8  ; asciiz name to open		 ;AN000;
   373                              <2> labelsize IFSR_PARMS@, dword, IFSR_API_PARMS+12 ; format:
   374                              <2> 						 ;	     DD  EA address
   375                              <2> 						 ;	     DW  #parms
   376                              <2> 						 ;	     DB  IOMODE ID		 ;AN000;
   377                              <2> 						 ;	     DW  IO Mode		 ;AN000;
   378                              <2> labelsize IFSR_MATCHATTR, word, IFSR_API_PARMS+16 ; format 00000000e0advshr		 ;AN000;
   379                              <2> labelsize IFSR_ACTION, word, IFSR_API_PARMS+18					 ;AN000;
   380                              <2>  LENGTH_OPENFILE    EQU IFSR_ACTION-IFSRH+2						 ;AN000;
   381                              <2> 											 ;AN000;
   382                              <2> 		    %ELSE								 ;AN000;
   383                              <2> 		    %ifidni  %1, LSEEKFILE						 ;AN000;
   384                              <2> labelsize IFSR_MODE_BYTE, byte, IFSR_API_PARMS    ; see INT 21H AH=42H		 ;AN000;
   385                              <2> labelsize IFSR_POSITION, dword, IFSR_API_PARMS+2  ; displacement of LSEEK		 ;AN000;
   386                              <2>  LENGTH_LSEEKFILE   EQU IFSR_POSITION-IFSRH+4						 ;AN000;
   387                              <2> 											 ;AN000;
   388                              <2> 		    %ELSE								 ;AN000;
   389                              <2> 		    %ifidni  %1, READFILE						 ;AN000;
   390                              <2> ;IFSR_MODE	    =  BYTE  PTR  IFSR_API_PARMS					 ;AD005;
   391                              <2> labelsize IFSR_COUNT, word, IFSR_API_PARMS+2					 ;AN000;
   392                              <2> labelsize IFSR_BUFFER@, dword, IFSR_API_PARMS+4					 ;AN000;
   393                              <2>  LENGTH_READFILE    EQU IFSR_BUFFER@-IFSRH+4						 ;AN000;
   394                              <2> 											 ;AN000;
   395                              <2> 		    %ELSE								 ;AN000;
   396                              <2> 		    %ifidni  %1, WRITEFILE						 ;AN000;
   397                              <2> ;IFSR_MODE	    =  BYTE  PTR  IFSR_API_PARMS					 ;AD005;
   398                              <2> labelsize IFSR_COUNT, word, IFSR_API_PARMS+2					 ;AN000;
   399                              <2> labelsize IFSR_BUFFER@, dword, IFSR_API_PARMS+4					 ;AN000;
   400                              <2>  LENGTH_WRITEFILE   EQU IFSR_BUFFER@-IFSRH+4						 ;AN000;
   401                              <2> 											 ;AN000;
   402                              <2> 		    %ELSE								 ;AN000;
   403                              <2> 		    %ifidni  %1, LOCKFILE						 ;AN000;
   404                              <2> ;IFSR_MODE	    =  BYTE  PTR  IFSR_API_PARMS    ;  bit 0: 0=lock all operations	 ;AD005;
   405                              <2> 						    ;  1=lock only write operations	 ;AD005;
   406                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 0=LOCK, 1=UNLOCK			 ;AC005;
   407                              <2> ;IFSR_COUNT	    =  WORD  PTR  IFSR_API_PARMS+2					 ;AD005;
   408                              <2> ;IFSR_RANGE@	    =  DWORD PTR  IFSR_API_PARMS+4					 ;AD005;
   409                              <2> labelsize IFSR_LK_POSITION, dword, IFSR_API_PARMS+2					 ;AN005;
   410                              <2> labelsize IFSR_LK_LENGTH, dword, IFSR_API_PARMS+6					 ;AN005;
   411                              <2>  LENGTH_LOCKFILE    EQU IFSR_LK_LENGTH-IFSRH+4						 ;AC005;
   412                              <2> 											 ;AN000;
   413                              <2> 		    %ELSE								 ;AN000;
   414                              <2> 		    %ifidni  %1, CLOSEFILE						 ;AN000;
   415                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 0=CLOSE, 1=COMMIT 		 ;AN000;
   416                              <2>  LENGTH_CLOSEFILE   EQU IFSR_FUNC-IFSRH+2						 ;AN000;
   417                              <2> 											 ;AN000;
   418                              <2> 		    %ELSE								 ;AN000;
   419                              <2> 		    %ifidni  %1, FILEATTR						 ;AN000;
   420                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 0=get, 1=set by handle		 ;AN000;
   421                              <2> 						    ; 2=get, 3=set by name		 ;AN000;
   422                              <2> labelsize IFSR_SUBFUNC, byte, IFSR_API_PARMS+2  ; 0=none,2=EA List, 3-EA names	 ;AN000;
   423                              <2> 						    ; 2,3 used only on IFSR_FUNC=0,1	 ;AN000;
   424                              <2> labelsize IFSR_BUFFER1@, dword, IFSR_API_PARMS+4  ; if IFSR_TYPE=2,3			 ;AN000;
   425                              <2> labelsize IFSR_BUFFER2@, dword, IFSR_API_PARMS+8  ; if IFSR_TYPE=2			 ;AN000;
   426                              <2> labelsize IFSR_COUNT, word, IFSR_API_PARMS+12 ; if IFSR_TYPE=2,3			 ;AN000;
   427                              <2>  ; Following present only if IFSR_FUNC=2,3						 ;AN000;
   428                              <2> labelsize IFSR_MATCHATTR, word, IFSR_API_PARMS+14 ; format 0000000re0advshr		 ;AN000;
   429                              <2> labelsize IFSR_NAME@, dword, IFSR_API_PARMS+16 ; ASCIIZ file name			 ;AN000;
   430                              <2> labelsize IFSR_SIZE, dword, IFSR_API_PARMS+20 ; file size 			 ;AN000;
   431                              <2> labelsize IFSR_DATE, word, IFSR_API_PARMS+24 ; file date 			 ;AN000;
   432                              <2> labelsize IFSR_TIME, word, IFSR_API_PARMS+26 ; file time 			 ;AN000;
   433                              <2> labelsize IFSR_ATTR, word, IFSR_API_PARMS+28 ; format 0000000re0advshr		 ;AN000;
   434                              <2>  LENGTH_FILEATTR    EQU IFSR_ATTR-IFSRH+2						 ;AN000;
   435                              <2> 											 ;AN000;
   436                              <2> 		    %ELSE								 ;AN000;
   437                              <2> 		    %ifidni  %1, DEPIOCTL						 ;AN000;
   438                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 00 Generic IOCTL by device #	 ;AN000;
   439                              <2> 						    ; 01 Generic IOCTL by handle	 ;AN000;
   440                              <2> 						    ; 02 FS IOCTL query OS type 	 ;AN000;
   441                              <2> labelsize IFSR_BUFFER@, dword, IFSR_API_PARMS+2  ; set on queries			 ;AN000;
   442                              <2> labelsize IFSR_BUFSIZE, word, IFSR_API_PARMS+6  ; Buffer size set for IFSR_FUNC=2	 ;AN000;
   443                              <2>  ; FUNC dependent parameters								 ;AN000;
   444                              <2>  ; For generic										 ;AN000;
   445                              <2> labelsize IFSR_CATEGORY, byte, IFSR_API_PARMS+8  ; generic subfunctions		 ;AN000;
   446                              <2> labelsize IFSR_CTLFUNC, byte, IFSR_API_PARMS+9  ; see INT 21H AH=6BH		 ;AN000;
   447                              <2>  LENGTH_DEPIOCTL    EQU IFSR_CTLFUNC-IFSRH+1						 ;AN000;
   448                              <2> 											 ;AN000;
   449                              <2> 		    %ELSE								 ;AN000;
   450                              <2> 		    %ifidni  %1, DEVIOCTL						 ;AN000;
   451                              <2> labelsize IFSR_FUNC, byte, IFSR_API_PARMS    ; 00 Generic IOCTL by device #	 ;AN000;
   452                              <2> 						 ; 01 Generic IOCTL by handle		 ;AN000;
   453                              <2> 						 ; 02 FS IOCTL query OS type		 ;AN000;
   454                              <2> labelsize IFSR_BUFFER@, dword, IFSR_API_PARMS+2  ; set on queries			 ;AN000;
   455                              <2> labelsize IFSR_BUFSIZE, word, IFSR_API_PARMS+6  ; buffer size set for IFSR_FUNC=2	 ;AN000;
   456                              <2>  ; FUNC dependent parameters								 ;AN000;
   457                              <2>  ; For generic										 ;AN000;
   458                              <2> labelsize IFSR_CATEGORY, byte, IFSR_API_PARMS+8  ; generic subfunctions		 ;AN000;
   459                              <2> labelsize IFSR_CTLFUNC, byte, IFSR_API_PARMS+9  ; see INT 21H AH=6BH		 ;AN000;
   460                              <2>  LENGTH_DEVIOCTL    EQU IFSR_CTLFUNC-IFSRH+1						 ;AN000;
   461                              <2> 											 ;AN000;
   462                              <2> 		    %ELSE								 ;AN000;
   463                              <2> 		    %ifidni  %1, EOP							 ;AN000;
   464                              <2> labelsize IFSR_PID, word, IFSR_API_PARMS    ; process ID			 ;AN000;
   465                              <2> labelsize IFSR_SUBFUNC, byte, IFSR_API_PARMS+2  ; 0=NORMAL EXIT, 1=ABORT EXIT	 ;AN000;
   466                              <2>  LENGTH_EOP	    EQU IFSR_SUBFUNC-IFSRH+2						 ;AN000;
   467                              <2> 											 ;AN000;
   468                              <2> 		    %ELSE								 ;AN000;
   469                              <2> 		    %ifidni  %1, EOCID						 ;AN000;
   470                              <2> labelsize IFSR_UID, word, IFSR_API_PARMS    ; process ID			 ;AN000;
   471                              <2>  LENGTH_EOCID	    EQU IFSR_UID-IFSRH+2						 ;AN000;
   472                              <2> 											 ;AN000;
   473                              <2> 		    %ENDIF								 ;AN000;
   474                              <2> 		    %ENDIF								 ;AN000;
   475                              <2> 		    %ENDIF								 ;AN000;
   476                              <2> 		    %ENDIF								 ;AN000;
   477                              <2> 		    %ENDIF								 ;AN000;
   478                              <2> 		    %ENDIF								 ;AN000;
   479                              <2> 		    %ENDIF								 ;AN000;
   480                              <2> 		    %ENDIF								 ;AN000;
   481                              <2> 		    %ENDIF								 ;AN000;
   482                              <2> 		    %ENDIF								 ;AN000;
   483                              <2> 		    %ENDIF								 ;AN000;
   484                              <2> 		    %ENDIF								 ;AN000;
   485                              <2> 		    %ENDIF								 ;AN000;
   486                              <2> 		    %ENDIF								 ;AN000;
   487                              <2> 		    %ENDIF								 ;AN000;
   488                              <2> 		    %ENDIF								 ;AN000;
   489                              <2> 		    %ENDIF								 ;AN000;
   490                              <2> 		    %ENDIF								 ;AN000;
   491                              <2> 		    %ENDIF								 ;AN000;
   492                              <2> %endmacro
   493                              <2> 
   494                              <2> ; end of NASM original macros
   495                              <2> 
   496                              <2> 
   497                              <2> ;SUBTTL	Request Data									 ;AN000;
   498                              <2> ;PAGE											 ;AN000;
   499                              <2> 											 ;AN000;
   500                              <2> ;	     Attach types								 ;AN000;
   501                              <2> ;;;aliasTYPE_ALIAS	EQU	0							 ;AN000;
   502                              <2> TYPE_DEVICE	EQU	1								 ;AN000;
   503                              <2> TYPE_DRIVE	EQU	2								 ;AN000;
   504                              <2> TYPE_NET_DEVICE EQU	3								 ;AN000;
   505                              <2> TYPE_NET_DRIVE	EQU	4								 ;AN000;
   506                              <2> ;	     Attach cmds								 ;AN000;
   507                              <2> GET_MODE	EQU	0								 ;AN000;
   508                              <2> SET_MODE	EQU	1								 ;AN000;
   509                              <2> GET_ASSIGN_LIST EQU	2								 ;AN000;
   510                              <2> DEFINE_MACRO	EQU	3								 ;AN000;
   511                              <2> CANCEL_ATTACH	EQU	4								 ;AN000;
   512                              <2> 											 ;AN000;
   513                              <2> ATTACH_PARMS	STRUC									 ;AN000;
   514 00000000 ????                <2> AP_COUNT	DW	?								 ;AN000;
   515 00000002 ??                  <2> AP_STRING	DB	?								 ;AN000;
   516                              <2> ATTACH_PARMS	ENDS									 ;AN000;
   517                              <2> 											 ;AN000;
   518                              <2> ;	     Critical Error Message types						 ;AN000;
   519                              <2> CRIT_MSG_TYPE_1 	equ	1
   520                              <2> TYPE1		EQU	1								 ;AN000;
   521                              <2> TYPE0		EQU	0								 ;AN000;
   522                              <2> 											 ;AN000;
   523                              <2> ;	     Control Block types							 ;AN000;
   524                              <2> CBTYPE_SFF	EQU	0								 ;AN000;
   525                              <2> CBTYPE_CD	EQU	1								 ;AN000;
   526                              <2> CBTYPE_DF	EQU	2								 ;AN000;
   527                              <2> CBTYPE_DUMMYCD	EQU	3								 ;AN000;
   528                              <2> 											 ;AN000;
   529                              <2> ;	     Drive Reset equates							 ;AN000;
   530                              <2> FUNC_FLUSH		EQU	0							 ;AN000;
   531                              <2> FUNC_FLUSH_INVALIDATE	EQU	1							 ;AN000;
   532                              <2> 											 ;AN000;
   533                              <2> ;	     Search File equates							 ;AN000;
   534                              <2> IFSSEARCH_FIRST EQU	1								 ;AN000;
   535                              <2> IFSSEARCH_NEXT	EQU	2								 ;AN000;
   536                              <2> 											 ;AN000;
   537                              <2> ;	     Open/Create type								 ;AN000;
   538                              <2> TYPE_NONE	EQU	0								 ;AN000;
   539                              <2> NOTEXIST_ACT_FAIL      equ 0						   ;+BAF
   540                              <2> NOTEXIST_ACT_CREATE    equ 1						   ;+BAF
   541                              <2> EXIST_ACT_FAIL	       equ 0						   ;+BAF
   542                              <2> EXIST_ACT_OPEN	       equ 1						   ;+BAF
   543                              <2> EXIST_ACT_REP_OPEN     equ 2						   ;+BAF
   544                              <2> 
   545                              <2> FILE_OPENED	       equ 1
   546                              <2> FILE_CREATED	       equ 2
   547                              <2> FILE_REPLACED	       equ 3
   548                              <2> 											 ;AN000;
   549                              <2> ;	     Read/Write equates 							 ;AN000;
   550                              <2> ;MODE_READ	   EQU	 0								 ;AD005;
   551                              <2> ;MODE_WRITE	   EQU	 0								 ;AD005;
   552                              <2> ;MODE_LOCK_READ    EQU	1								 ;AD005;
   553                              <2> ;MODE_WRITE_UNLOCK EQU	1								 ;AD005;
   554                              <2> ;MODE_WRITE_SFPOS  EQU	  00H								 ;AD005;
   555                              <2> ;MODE_WRITE_SFSIZE EQU	  02H								 ;AD005;
   556                              <2> ;MODE_ADD_MASK	      EQU  00000010B	 ; do I need this???				 ;AD005;
   557                              <2> 											 ;AN000;
   558                              <2> ;	     Lock equates								 ;AN000;
   559                              <2> ;MODE_LOCK_ALL	      EQU  0								 ;AD005;
   560                              <2> ;MODE_LOCK_WRITE      EQU  1								 ;AD005;
   561                              <2> FUNC_LOCK	     EQU  0								 ;AN000;
   562                              <2> FUNC_UNLOCK	     EQU  1								 ;AN000;
   563                              <2> ;MODE_ADD_MASK	      EQU  00000010B							 ;AD005;
   564                              <2> ;MODE_WO_MASK	      EQU  10000000B							 ;AN004; BAF ;AD005;
   565                              <2> ;LOCK_RANGE_STRUC	 STRUC								 ;AD005;
   566                              <2> ;   IFSR_LOCK_POSITION	 DD	 ?							 ;AD005;
   567                              <2> ;   IFSR_LOCK_LENGTH	 DD	 ?							 ;AD005;
   568                              <2> ;LOCK_RANGE_STRUC	 ENDS								 ;AD005;
   569                              <2> 
   570                              <2> 											 ;AN000;
   571                              <2> ;	     Close equates								 ;AN000;
   572                              <2> FUNC_CLOSE	  EQU	0								 ;AN000;
   573                              <2> FUNC_COMMIT	  EQU	1								 ;AN000;
   574                              <2> 											 ;AN000;
   575                              <2> ;	     LSeek equates								 ;AN000;
   576                              <2> MODE2		  EQU	2								 ;AN000;
   577                              <2> 											 ;AN000;
   578                              <2> ;	     File Attribute equates							 ;AN000;
   579                              <2> FUNC_GET_BY_HANDLE	EQU	0							 ;AN000;
   580                              <2> FUNC_SET_BY_HANDLE	EQU	1							 ;AN000;
   581                              <2> FUNC_GET_BY_NAME	EQU	2							 ;AN000;
   582                              <2> FUNC_SET_BY_NAME	EQU	3							 ;AN000;
   583                              <2> SUBFUNC_INLINE		EQU	0							 ;AN000;
   584                              <2> SUBFUNC_EA		EQU	2							 ;AN000;
   585                              <2> SUBFUNC_EA_NAMES	EQU	3							 ;AN000;
   586                              <2> 											 ;AN000;
   587                              <2> ;	     FS Dependent IOCTL 							 ;AN000;
   588                              <2> GEN_IOCTL_BY_DEVNUM	    EQU     0							 ;AN000;
   589                              <2> GEN_IOCTL_BY_HANDLE	    EQU     1							 ;AN000;
   590                              <2> QUERY_OS_TYPE		    EQU     2							 ;AN000;
   591                              <2> CATEGORY_FS		    EQU     0							 ;AN000;
   592                              <2> CATEGORY_REDIR		    EQU     1							 ;AN000;
   593                              <2> PRINTER_SET_STRING	    EQU     2							 ;AN000;
   594                              <2> PRINTER_GET_STRING	    EQU     3							 ;AN000;
   595                              <2> PRINTER_SET_FLAGS	    EQU     4							 ;AN000;
   596                              <2> PRINTER_GET_FLAGS	    EQU     5							 ;AN000;
   597                              <2> CTLFUNC_PRINTER_SET_STRING  EQU   00100001B						 ;AN000;
   598                              <2> CTLFUNC_PRINTER_GET_STRING  EQU   00000001B						 ;AN000;
   599                              <2> CTLFUNC_PRINTER_SET_FLAGS   EQU   00100010B						 ;AN000;
   600                              <2> CTLFUNC_PRINTER_GET_FLAGS   EQU   00000010B						 ;AN000;
   601                              <2> CTLFUNC_DEVECHOCHECK	    EQU   00000011B						 ;AN000;
   602                              <2> CTLFUNC_GET_UNC_ITEM	    EQU   00000100B						 ;AN000;
   603                              <2> CTLFUNC_DEVCLOSE	    EQU   00000101B						 ;AN000;
   604                              <2> CTLFUNC_DEVOPER 	    EQU   00000110B						 ;AN000;
   605                              <2> CTLFUNC_PRINT_ON	    EQU   00100111B						 ;AN000;
   606                              <2> CTLFUNC_PRINT_OFF	    EQU   00000111B						 ;AN000;
   607                              <2> CLOSE_SPOOL_FILES	    EQU     9							 ;AN000;
   608                              <2> LENGTH_DEVECHOCHECK_BUFFER  EQU 1							 ;AN000;
   609                              <2> 											 ;AN000;
   610                              <2> ;	     FS Device IOCTL								 ;AN000;
   611                              <2> READ_DEVICE		    EQU     2							 ;AN000;
   612                              <2> WRITE_DEVICE		    EQU     3							 ;AN000;
   613                              <2> CHAR_GENERIC		    EQU     0CH 						 ;AN000;
   614                              <2> BLOCK_GENERIC		    EQU     0DH 						 ;AN000;
   615                              <2> 											 ;AN000;
   616                              <2> ;	     End of Process equates							 ;AN000;
   617                              <2> EOP_NORMAL	EQU	0								 ;AN000;
   618                              <2> EOP_ABORT	EQU	1								 ;AN000;
   619                              <2> RESET_ENVIRONMENT EQU	2
   620                              <2> 											 ;AN000;
   621                              <2> ;SUBTTL	Request Return Classes/Codes							 ;AN000;
   622                              <2> ;PAGE											 ;AN000;
   623                              <2> 											 ;AN000;
   624                              <2> ;  IFS Request Return Codes							 ;AN000;
   625                              <2> IFSR_NO_ERROR		EQU	0							 ;AN000;
   626                              <2> IFSR_NONSPEC_ERROR	EQU	1							 ;AN000;
   627                              <2> IFSR_NOT_FOUND_ERROR	EQU	2							 ;AN000;
   628                              <2> IFSR_ACCESS_DENIED	EQU	3							 ;AN000;
   629                              <2> IFSR_DEVICE_TYPE_MISMATCH EQU	4							 ;AN000;
   630                              <2> IFSR_NO_SUBFCN_SUPPORT	EQU    -2							 ;AN000;
   631                              <2> IFSR_NO_FCN_SUPPORT	EQU    -1							 ;AN000;
   632                              <2> 											 ;AN000;
   633                              <2> ;  IFS Request Return Classes								 ;AN000;
   634                              <2> IFSR_INT21H_ERROR	EQU	1							 ;AN000;
   635                              <2> IFSR_DRIVER_ERROR	EQU	2							 ;AN000;
   636                              <2> IFSR_INT21H_CRITER	EQU	3							 ;AN000;
   637                              <2> IFSR_DEVICE_ERROR	EQU	4							 ;AN006;
   638                              <2> IFSR_BAD_FORMAT 	EQU    -1							 ;AN000;
   639                              <2> 
   640                              <2> ;
   641                              <2> ;  Int 24H
   642                              <2> NO_RETRY	equ	0
   643                              <2> I24_RESP_IGNORE equ	0
   644                              <2> I24_RESP_RETRY	equ	1
   645                              <2> 
   646                              <2> 											 ;AN000;
   647                              <2> ;  IFS_DOSCALL@ function equates							 ;AN000;
   648                              <2> ;  Block Device Driver Requests 							 ;AN000;
   649                              <2> CALL_INTERRUPT_ROUTINE	EQU	1							 ;AN000;
   650                              <2> READ_SECTORS		EQU	2							 ;AN000;
   651                              <2> WRITE_SECTORS		EQU	3							 ;AN000;
   652                              <2> FIND_SECTOR		EQU	8							 ;AN000;
   653                              <2> MARK_SECTOR_CHANGED	EQU	9							 ;AN000;
   654                              <2> ;  Buffer Cache Requests								 ;AN000;
   655                              <2> WRITE_DOS_BUFFER	EQU	10							 ;AN000;
   656                              <2> READ_DOS_BUFFER 	EQU	11							 ;AN000;
   657                              <2> FREE_DOS_BUFFER 	EQU	12							 ;AN000;
   658                              <2> FLUSH_DOS_BUFFERS	EQU	13							 ;AN000;
   659                              <2> ;  Get DOS Variable									 ;AN000;
   660                              <2> GET_DOS_VALUE		EQU	32							 ;AN000;
   661                              <2> ACTIVE_PROCESS_INFO	EQU	1							 ;AN000;
   662                              <2> CPSW_INFORMATION	EQU	2							 ;AN000;
   663                              <2> BREAK_INFORMATION	EQU	3							 ;AN000;
   664                              <2> VERIFY_INFORMATION	EQU	4							 ;AN000;
   665                              <2> CONFIG_SYS_VALUES	EQU	5							 ;AN000;
   666                              <2>     DOS_VALUE_BUFFER	    STRUC							 ;AN000;
   667 00000000 ????                <2>        VAL_BUF_SIZE    DW      ?							 ;AN000;
   668 00000002 ????                <2>        VAL_BUF_FILES   DW      ?							 ;AN000;
   669 00000004 ????                <2>        VAL_BUF_FCBS    DW      ?							 ;AN000;
   670 00000006 ????                <2> 		       DW      ?							 ;AN000;
   671 00000008 ????                <2>        VAL_BUF_BUFS    DW      ?							 ;AN000;
   672 0000000A ????                <2> 		       DW      ?							 ;AN000;
   673 0000000C ????                <2>        VAL_BUF_LDRV    DW      ?							 ;AN000;
   674 0000000E ????                <2>        VAL_BUF_SSZ     DW      ?							 ;AN000;
   675                              <2>     DOS_VALUE_BUFFER	    ENDS							 ;AN000;
   676                              <2> MACHINE_NAME		EQU	6							 ;AN000;
   677                              <2> COUNTRY_INFO		EQU	7							 ;AN000;
   678                              <2> SHARE_RETRY_COUNT	EQU	8							 ;AN000;
   679                              <2> ;  Get Assign Mode									 ;AN000;
   680                              <2> GET_ASSIGN_MODE 	EQU	33							 ;AN000;
   681                              <2> DEVICE_MACRO	equ	3
   682                              <2> DRIVE_MACRO    equ	4
   683                              <2> PAUSE_MODE_ON	equ	1
   684                              <2> PAUSE_MODE_OFF	equ	0
   685                              <2> ;
   686                              <2> DOS2NET_DATE	equ	34
   687                              <2> NET2DOS_DATE	equ	35
   688                              <2> DOS_STRCMP	equ	36
   689                              <2> DOS_STRCPY	equ	37
   690                              <2> USE_SYSTEM_TIMEDATE  equ	0
   691                              <2> USE_USER_TIMEDATE    equ	1
   692                              <2> ;
   693                              <2> 											 ;AN000;
   694                              <2> 											 ;AN000;
   695                              <2> ;SUBTTL	Pseudo Block Structures: SF, CD, DF						 ;AN000;
   696                              <2> ;PAGE											 ;AN000;
   697                              <2> ; SFF - Pseudo SFT									 ;AN000;
   698                              <2> ;	 This structure is used to pass pertinent SFT information			 ;AN000;
   699                              <2> ;	 to IFS driver. 								 ;AN000;
   700                              <2> 											 ;AN000;
   701                              <2> SFF		 STRUC			  ; Open File Control Block			 ;AN000;
   702 00000000 ????                <2> SFF_TYPE	 DB	?,?		  ; Identifies SFF				 ;AN000;
   703 00000002 ????                <2> SFF_FLAGS	 DW	 ?		  ; Control flags				 ;AN000;
   704                              <2> 					  ;   4000H=don't set date/time on close         ;AN009;
   705                              <2> 					  ;   0080H=device (vs file)			 ;AN009;
   706                              <2> 					  ;   0040H=File clean				 ;AN008;
   707 00000004 ????                <2> SFF_MODE	 DW	 ?		  ; Mode of access.				 ;AN000;
   708                              <2> 					  ;   8000H=FCB (vs handle)[this moved from flags];AC008;
   709 00000006 ????                <2> SFF_RESV1	 DW	 ?		  ; IO mode.					 ;AC023; iomode
   710 00000008 ????                <2> SFF_ATTR	 DW	 ?		  ; File attr.FORMAT : 0000000re0advshr 	 ;AN000;
   711 0000000A ????                <2> SFF_UID 	 DW	 ?		  ; User ID					 ;AN000;
   712 0000000C ????                <2> SFF_PID 	 DW	 ?		  ; Process ID					 ;AN000;
   713 0000000E ????????            <2> SFF_SIZE	 DD	 ?		  ; File size					 ;AN000;
   714 00000012 ????????            <2> SFF_POSITION	 DD	 ?		  ; Read/Write pointer				 ;AN000;
   715 00000016 ????                <2> SFF_TIME	 DW	 ?		  ; File time					 ;AN000;
   716 00000018 ????                <2> SFF_DATE	 DW	 ?		  ; File date					 ;AN000;
   717 0000001A ????????????????    <2> SFF_NAME	 DB	 8 DUP (?)	  ; Name					 ;AN000;
   718 00000022 ??????              <2> SFF_EXT 	 DB	 3 DUP (?)	  ; Extension					 ;AN000;
   719 00000025 ????                <2> SFF_RESV2	 DW	 ?		  ; Code page					 ;AC024; cp
   720 00000027 ????                <2> SFF_SF_ID	 DW	 ?		  ; Unique SFT entry identifier 		 ;AN009;
   721 00000029 <res Ch>            <2> SFF_RESV	 DB	12 DUP(?)	  ; Reserved					 ;AC009;
   722 00000035 ????????????????    <2> SFF_FSDA	 DB	 8 DUP(?)	  ; File System Dependent Data Area		 ;AN000;
   723                              <2> SFF		ENDS									 ;AN000;
   724                              <2> 											 ;AN000;
   725                              <2> ; sff_flags bits
   726                              <2> SFF_Close_NoDate EQU	4000H		  ;   4000H=don't set date/time on close         ;AN009;
   727                              <2> SFF_IsDevice	 EQU	0080H		  ;   0080H=device (vs file)			 ;AN009;
   728                              <2> SFF_FileClean	 EQU	0040H		  ;   0040H=File clean				 ;AN008;
   729                              <2> SFF_Device_Raw	 EQU	0020H		  ;   0020H=Device raw				 ;AN008;
   730                              <2> SFF_Net_Spool	 EQU	0000100000000000B
   731                              <2> ; sff_mode  bits
   732                              <2> SFF_IsFCB	 EQU	8000H		  ;   8000H=FCB (vs handle)[this moved from flags];AC008;
   733                              <2> 
   734                              <2> ; CD  - Pseudo CDS									 ;AN000;
   735                              <2> ;	 This structure is used to pass pertinent CDS information			 ;AN000;
   736                              <2> ;	 to IFS driver. 								 ;AN000;
   737                              <2> 											 ;AN000;
   738                              <2> CD		STRUC									 ;AN000;
   739 00000000 ????                <2> CD_TYPE 	DB	?,?		  ; Identifies CD				 ;AN000;
   740 00000002 ????                <2> CD_END		DW	?		  ; End of assignment in CD_TEXT		 ;AN000;
   741 00000004 <res 43h>           <2> CD_TEXT 	DB	67 DUP (?)	  ; Text of assignment and curdir		 ;AN000;
   742 00000047 ??????????          <2> CD_RESV 	DB	5 DUP(?)	  ; Reserved					 ;AN000;
   743 0000004C ????????????????    <2> CD_FSDA 	DB	8 DUP(?)	  ; File System Dependent Data Area		 ;AN000;
   744                              <2> CD		ENDS									 ;AN000;
   745                              <2> 											 ;AN000;
   746                              <2> ; DF  - Pseudo DFL									 ;AN000;
   747                              <2> ;	 This structure is used to pass pertinent DFL information			 ;AN000;
   748                              <2> ;	 to IFS driver. 								 ;AN000;
   749                              <2> 
   750                              <2> DFL		STRUC									 ;AN000;
   751 00000000 ????                <2> DFL_TYPE 	DB	?,?		  ; Identifies DFL				 ;AN000;
   752 00000002 ????????????????    <2> DFL_DEV_NAME	DB	8 DUP (?)	  ; Device name 				 ;AN000;
   753 0000000A ????????????????    <2> DFL_FSDA 	DB	8 DUP (?)	  ; File System Dependent Data Area		 ;AN000;
   754                              <2> DFL		ENDS									 ;AN000;
   755                              <2> 											 ;AN000;
   756                              <2> ;SUBTTL	Search Continuation Information 						 ;AN000;
   757                              <2> ;PAGE											 ;AN000;
   758                              <2> CONTINFO	STRUC									 ;AN000;
   759 00000000 ????????????????    <2> CI_SEARCH_FN	DB	8 DUP(?)   ; SEARCH FILE NAME					 ;AN000;
   760 00000008 ??????              <2> CI_SEARCH_FN_EXT DB	3 DUP(?)   ; SEARCH FILE EXTENSION				 ;AN000;
   761 0000000B ??                  <2> CI_SEARCH_ATTR	DB	?	   ; SEARCH ATTRIBUTE					 ;AN000;
   762 0000000C ????????????????    <2> CI_FSDA 	DB	8 DUP(?)   ; FSDA						 ;AN000;
   763                              <2> 				   ; Directory entry:					 ;AN000;
   764 00000014 ????????????????    <2> CI_FOUND_FN	DB	8 DUP(?)   ; FOUND FILE NAME					 ;AN000;
   765 0000001C ??????              <2> CI_FOUND_FN_EXT DB	3 DUP(?)   ; FOUND FILE EXTENSION				 ;AN000;
   766 0000001F ??                  <2> CI_FOUND_ATTRL	DB	?	   ; FOUND ATTRIBUTE LOW  ??? DB/DD			 ;AN000;
   767 00000020 ????                <2> CI_CP		DW	?	   ; FILE CODE PAGE (OR 0)				 ;AN000;
   768 00000022 ????                <2> CI_RESV1	DW	?	   ; RESERVED						 ;AN000;
   769 00000024 ??                  <2> CI_FOUND_ATTRH	DB	?	   ; FOUND ATTRIBUTE HIGH				 ;AN000;
   770 00000025 ??????????          <2> CI_RESV2	DB	5  DUP(?)  ; RESERVED						 ;AN000;
   771 0000002A ????                <2> CI_FILE_TIME	DW	?	   ; FILE TIME						 ;AN000;
   772 0000002C ????                <2> CI_FILE_DATE	DW	?	   ; FILE DATE						 ;AN000;
   773 0000002E ????                <2> CI_FSWORD	DW	?	   ; MEANING FILE SYSTEM SPECIFIC			 ;AN000;
   774                              <2> 				   ; (STARTING CLUSTER IN FAT)				 ;AN000;
   775 00000030 ????????            <2> CI_FILE_SIZE	DD	?	   ; FILE SIZE						 ;AN000;
   776                              <2> CONTINFO	ENDS									 ;AN000;
   777                              <2> 
   778                              <2> 
   779                              <2> CATEGORY_PRINTER       EQU	5
   780                              <2> 
   781                              <2> CTLFUNC_SELECT	       EQU	4AH
   782                              <2> CTLFUNC_QUERY_SELECTED EQU	6AH
   783                              <2> CTLFUNC_QUERY_PREPLIST EQU	6BH
   784                              <2> 
   785                              <2> DEV_OPER_BUFFER        STRUC
   786 00000000 ??                  <2>   OPER_FUNC	DB	?
   787 00000001 ??                  <2>   TRUNC_FLAG	DB	?
   788                              <2> DEV_OPER_BUFFER        ENDS
   789                              <2> 
   790                              <2> PACKET		       STRUC	; device ioctl buffer info
   791 00000000 ????                <2>   PACKLEN	DW	?	; length of packet in bytes
   792 00000002 ????                <2>   PACKCPID	DW	?	; code page id
   793                              <2> PACKET		       ENDS
   794                              <2> 
    13                              <1> %include "fastopen.mac"
     1                              <2> ;
     2                              <2> ; EXPORT DATE: 9/11
     3                              <2> ;Equates for FASTOPEN.
     4                              <2> 
     5                              <2> ;FASTOPEN NAME CACHING Subfunctions
     6                              <2> FONC_Look_up	equ	1
     7                              <2> FONC_insert	equ	2
     8                              <2> FONC_delete	equ	3
     9                              <2> FONC_update	equ	4
    10                              <2> FONC_purge	equ	5		;reserved for the future use.
    11                              <2> 
    12                              <2> ;FASTOPEN EXTENT  CACHING Subfunctions
    13                              <2> FSK_Open       equ     11					       ;AN000;
    14                              <2> FSK_Close      equ     12					       ;AN000;
    15                              <2> FSK_Delete     equ     13					       ;AN000;
    16                              <2> FSK_Lookup     equ     14					       ;AN000;
    17                              <2> FSK_Insert     equ     15					       ;AN000;
    18                              <2> FSK_Trunc      equ     16					       ;AN000;
    19                              <2> 
    20                              <2> HeaderSize     equ    8        ; size of file header (8 bytes)	       ;AN000;
    21                              <2> ExtendSize     equ    8        ; size of extend (8 bytes)	       ;AN000;
    22                              <2> Num_Of_Pages   equ    1        ; number of pages		       ;AN000;
    23                              <2> Num_Of_Segs    equ    2        ; number of frame segments	       ;AN000;
    24                              <2> Stayresident  equ    04ch     ; terminate and stay resident function code
    25                              <2> 
    26                              <2> 
    27                              <2> ;Equates used in DOS.
    28                              <2> FastOpen_Set	       equ     00000001B
    29                              <2> FastOpen_Reset	       equ     11111110B
    30                              <2> Lookup_Success	       equ     00000010B
    31                              <2> Lookup_Reset	       equ     11111101B
    32                              <2> Special_Fill_Set       equ     00000100B
    33                              <2> Special_Fill_Reset     equ     11111011B
    34                              <2> No_Lookup	       equ     00001000B
    35                              <2> Set_For_Search	       equ     00010000B	     ;DCR 167
    36                              <2> 
    37                              <2> 
    38                              <2> ;============= FastOpen Data Structures =====================
    39                              <2> 
    40                              <2> Fastopen_Entry	STRUC			;Fastopen Entry pointer in DOS
    41 00000000 ????                <2> Fastopen_Entry_size	dw	?	;size of the following
    42 00000002 ????????            <2> Fastopen_Name_Caching	dd	?
    43                              <2> ;Fastopen_FatChain_Caching dd	  ?	;reserved for future use
    44                              <2> Fastopen_Entry	ENDS
    45                              <2> ;
    46                              <2> 
    47                              <2> 
    48                              <2> CMPCT_DIR_INFO	STRUC			;compact version of Dir Info.
    49 00000000 <res Bh>            <2> CDI_file_name	db	11 dup (?)
    50 0000000B ??                  <2> CDI_file_attr	db	?
    51 0000000C ????                <2> CDI_codepage	dw	?
    52 0000000E ????                <2> CDI_extcluster	dw	?
    53 00000010 ??                  <2> CDI_attr2	db	?
    54 00000011 ????                <2> CDI_time	dw	?
    55 00000013 ????                <2> CDI_date	dw	?
    56 00000015 ????                <2> CDI_cluster	dw	?
    57 00000017 ????????            <2> CDI_filesize	dd	?
    58                              <2> CMPCT_DIR_INFO	ENDS
    59                              <2> ;
    60                              <2> 
    61                              <2> ORIG_DIR_INFO	STRUC
    62 00000000 <res 11h>           <2> ODI_head	db	17 dup (?)
    63 00000011 ??????????          <2> ODI_skip	db	5  dup (?)	;reserved for DOS. FASTOPEN does not
    64 00000016 <res Ah>            <2> ODI_tail	db	10 dup (?)	;  use ODI_skip part.
    65                              <2> ORIG_DIR_INFO	ENDS
    66                              <2> ;
    67                              <2> 
    68                              <2> ODI_head_leng	equ	17
    69                              <2> ODI_skip_leng	equ	5
    70                              <2> ODI_tail_leng	equ	10
    71                              <2> ;
    72                              <2> 
    73                              <2> FASTOPEN_EXTENDED_INFO	STRUC
    74 00000000 ??                  <2> FEI_dirpos	db	?
    75 00000001 ????????            <2> FEI_dirsec	dd	?
    76 00000005 ????                <2> FEI_clusnum	dw	?
    77 00000007 ????                <2> FEI_lastent	dw	?		; for search first
    78 00000009 ????                <2> FEI_dirstart	dw	?		; for search first
    79                              <2> FASTOPEN_EXTENDED_INFO	ENDS
    80                              <2> ;
    81                              <2> 
    82                              <2> NAME_RECORD	STRUC
    83 00000000 ????                <2> nLRU_ptr	dw	?
    84 00000002 ????                <2> nMRU_ptr	dw	?		;reverse of nLRU_ptr
    85 00000004 ????                <2> nChild_ptr	dw	?
    86 00000006 ????                <2> nSibling_ptr	dw	?
    87 00000008 ????                <2> nBackward_ptr	dw	?		;points to preceding node
    88                              <2> Cmpct_Dir_Info_struc_size equ CMPCT_DIR_INFO_struc_size	; NASM port equate
    89 0000000A <res 1Bh>           <2> nCmpct_Dir_Info db	Cmpct_Dir_Info_struc_size dup (?)
    90                              <2> Fastopen_Extended_Info_struc_size equ FASTOPEN_EXTENDED_INFO_struc_size	; NASM port equate
    91 00000025 <res Bh>            <2> nExtended_Info	db	Fastopen_Extended_Info_struc_size dup (?)
    92                              <2> NAME_RECORD	ENDS
    93                              <2> ;
    94                              <2> 
    95                              <2> DRIVE_CACHE_HEADER	STRUC		;drive cache header
    96 00000000 ????                <2> DCH_LRU_ROOT	 dw	 ?		;Header of the LRU chain of this drive
    97 00000002 ????                <2> DCH_MRU_ROOT	 dw	 ?		;offset to the last entry of LRU chain
    98 00000004 ????                <2> DCH_Child_ptr	 dw	 ?		;the first child in Name cache seg.
    99 00000006 ????                <2> DCH_Sibling_ptr  dw	 ?		;points to the next drive cache header
   100 00000008 ??                  <2> DCH_Drive_letter db	?             ;drive letter
   101 00000009 ????                <2> DCH_Num_Entries  dw	 ?		;Number of entries in the Name cache.
   102 0000000B ????                <2> DCH_Name_Buff	 dw	 ?		;pointer to name cahe buffer
   103                              <2> DRIVE_CACHE_HEADER	ENDS
   104                              <2> ;
   105                              <2> 
   106                              <2> 
   107                              <2> 
   108                              <2> 
   109                              <2> 
   110                              <2> ;======== FAST SEEK FUNCTION  DATA  STRUCTURES =======================
   111                              <2> 
   112                              <2> DRIVE_HEADER	STRUC		   ; Drive header structure		;AN000;
   113 00000000 ????                <2> Drive_Number	     dw     ?	   ; drive number			;AN000;
   114 00000002 ????                <2> Extent_Count	     dw     ?	   ; reserved for debugging
   115 00000004 ????                <2> MRU_Hdr_Ptr	     dw     ?	   ; pointer to OPEN Queue
   116 00000006 ????                <2> Free_ptr	     dw     ?	   ; pointer to FREE buffer		;AN000;
   117 00000008 ????                <2> Close_Ptr	     dw     ?	   ; pointer to CLOSE Queue	     ;AN000;
   118 0000000A ????                <2> Buff_Size	     dw     ?	   ; cache buffer size including header ;AN000;
   119 0000000C ????                <2> Free_Size	     dw     ?	   ; size of Free area in bytes
   120 0000000E ????                <2> Next_Drv_Hdr_Ptr     dw     ?	   ; pointer to next drive header
   121                              <2> DRIVE_HEADER   ENDS
   122                              <2> 
   123                              <2> 
   124                              <2> 
   125                              <2> FILE_HEADER	STRUC		   ; File header structure		;AN000;
   126 00000000 ????                <2> FH_Phys_Clus_Num     dw     ?	   ; starting physcial clustnum of file ;AN000;
   127 00000002 ????                <2> FH_Refer_Count	     dw     ?	   ; reference count			;AN000;
   128 00000004 ????                <2> FH_Next_Extn_Ptr     dw     ?	   ; pointer to first extent of the file;AN000;
   129 00000006 ????                <2> FH_Next_Hdr_Ptr      dw     ?	   ; pointer to next file header	;AN000;
   130 00000008 ????                <2> FH_MRU_Extn_Ptr      dw     ?	   ; pointer to  MRU extent
   131 0000000A ????                <2> 		     dw     ?
   132 0000000C ????                <2> 		     dw     ?
   133 0000000E ????                <2> 		     dw     ?
   134                              <2> FILE_HEADER	ENDS							;AN000;
   135                              <2> 
   136                              <2> 
   137                              <2> 
   138                              <2> EXTENT_HEADER	STRUC		   ; extend header structure		;AN000;
   139 00000000 ????                <2> EH_Logic_Clus_Num    dw     ?	   ; starting logical clus num of extent;AN000;
   140 00000002 ????                <2> EH_Phys_Clus_Num     dw     ?	   ; starting physical clus numof  extnt;AN000;
   141 00000004 ????                <2> EH_Count	     dw     ?	   ; range of logical clusnum in the extnt
   142 00000006 ????                <2> EH_Next_Extn_Ptr     dw     ?	   ; pointer to next extent		;AN000;
   143 00000008 ????                <2> EH_Prev_Extn_Ptr     dw     ?	   ; pointer to previous extent  ;AN000;
   144 0000000A ????                <2> EH_Next_LRU_Ptr      dw     ?	   ; pointer to next LRU extent
   145 0000000C ????                <2> EH_Prev_LRU_Ptr      dw     ?	   ; pointer tp previous LRU extent
   146 0000000E ????                <2> 		     dw     ?
   147                              <2> EXTENT_HEADER	ENDS
   148                              <2> 
   149                              <2> 
   150                              <2> 
    14                              <1> %include "fastxxxx.mac"
     1                              <2> ; Fastxxx equates
     2                              <2> FastOpen_ID	   equ	   1
     3                              <2> FastSeek_ID	   equ	   2
     4                              <2> Fast_yes	   equ	   10000000B	 ; fastxxx flag
     5                              <2> 
     6                              <2> ;Structure definitions
     7                              <2> ;
     8                              <2> Fasttable_Entry  struc			 ; Fastxxx  Entry pointer in DOS
     9 00000000 ????                <2> Fast_Entry_Num	    dw	    ?		 ; number of entries
    10 00000002 ????????            <2> FastOpen_Seek	    dd	    ?		 ; fastopen & fastseek entry address
    11                              <2> Fasttable_Entry  ends
    12                              <2> ;
    15                              <1> %include "codesw.mac"
     1                              <2> DOSCODE_HMA_SEGMENT equ 0FFFEh
     2                              <2> 	; address DOSCODE at this segment when in HMA
     3                              <2> DOSCODE_HMA_start_at equ (10000h - DOSCODE_HMA_SEGMENT) * 10h
     4                              <2> 	; offset from DOSCODE offset 0 to address 10_0000h
     5                              <2> DOSCODE_HMA_OFFSET equ DOSCODE_HMA_start_at + 30h
     6                              <2> 	; 50h = 20h ROM-BIOS, 20h VDISK header, 10h HMCB
    16                              <1> %include "lmacros2.mac"
     1                              <2> [list -]
    17                              <1> %include "lstruct.mac"
     1                              <2> [list -]
    13                              <2> [list -]
    18                              <1> ;.cref
    19                              <1> [list +]
    20                              <1> 
    21                              <1> %ifndef Kanji
    22                              <1>  %iassign Kanji 0
    23                              <1> %endif
    24                              <1> %ifndef Debug
    25                              <1>  %iassign Debug 0
    26                              <1> %endif
    27                              <1> 
    28                              <1> section DOSCODECODE
    29                              <1> 
    30                              <1>     I_need  InDos,BYTE			; TRUE => we are in dos, no interrupt
    31                              <1>     I_need  OpenBuf,128 		; temp name buffer
    32                              <1>     I_need  ExtErr,WORD 		; extended error code
    33                              <1>     I_need  User_SS,WORD		; stack segment from user
    34                              <1>     I_need  User_SP,WORD		; stack pointer from user
    35                              <1>     I_need  DskStack,BYTE		; stack segment inside DOS
    36                              <1>     I_need  ThisCDS,DWORD		; Currently referenced CDS pointer
    37                              <1>     I_need  ThisDPB,DWORD		; Currently referenced DPB pointer
    38                              <1>     I_need  Err_Table_21		; allowed return map table for errors
    39                              <1>     I_need  FailErr,BYTE		; TRUE => system call is being failed
    40                              <1>     I_need  ExtErr_Action,BYTE		; recommended action
    41                              <1>     I_need  ExtErr_Class,BYTE		; error classification
    42                              <1>     I_need  ExtErr_Locus,BYTE		; error location
    43                              <1>     I_need  I21_Map_E_Tab,BYTE		; mapping extended error table
    44                              <1>     I_need  User_In_AX,WORD		; initial input user AX
    45                              <1>     I_need  FOO,WORD			; return address for dos 2f dispatch
    46                              <1>     I_need  DTAB,WORD			; dos 2f dispatch table
    47                              <1>     I_need  HIGH_SECTOR,WORD		; >32mb
    48                              <1>     I_need  IFS_DRIVER_ERR,WORD 	; >32mb
    49                              <1>     I_need  FastOpenFlg,BYTE		;
    50                              <1>     I_need  FastSeekFlg,BYTE		;
    51                              <1>     I_need  CURSC_DRIVE,BYTE		;
    52                              <1>     I_need	first_hmcb, word
    53                              <1> 
    54                              <1> section DOSDATACODE	; in DOSDATA
    55                              <1> 
    56                              <1> BREAK <NullDev -- Driver for null device>
    57                              <1> 
    58                              <1> procedure   SNULDEV,FAR
    58          ******************  <1>  warning: proc SNULDEV... [-w+user]
    59                              <1> ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
    60 00000000 26814F030001        <1> 	OR	word [ES:BX + REQSTAT],STDON	; Set done bit
    61                              <1> entry INULDEV
    62 00000006 CB                  <1> 	RET				; MUST NOT BE A RETURN!
    63                              <1> EndProc SNULDEV
    64                              <1> 
    65                              <1> BREAK <AbsDRD, AbsDWRT -- INT int_disk_read, int_disk_write handlers>
    66                              <1> 
    67                              <1> section DOSCODETABLE
    68                              <1> Public MSC001S,MSC001E
    69                              <1> MSC001S label byte
    70                              <1> 	%IF	IBM
    71                              <1> ; Codes returned by BIOS
    72                              <1> DOS_ERRIN:
    73 00000000 02                  <1> 	DB	2			; NO RESPONSE
    74 00000001 06                  <1> 	DB	6			; SEEK FAILURE
    75 00000002 0C                  <1> 	DB	12			; GENERAL ERROR
    76 00000003 04                  <1> 	DB	4			; BAD CRC
    77 00000004 08                  <1> 	DB	8			; SECTOR NOT FOUND
    78 00000005 00                  <1> 	DB	0			; WRITE ATTEMPT ON WRITE-PROTECT DISK
    79                              <1> DOS_ERROUT:
    80                              <1> ; DISK ERRORS RETURNED FROM INT 25 and 26
    81 00000006 80                  <1> 	DB	80H			; NO RESPONSE
    82 00000007 40                  <1> 	DB	40H			; Seek failure
    83 00000008 02                  <1> 	DB	2			; Address Mark not found
    84 00000009 10                  <1> 	DB	10H			; BAD CRC
    85 0000000A 04                  <1> 	DB	4			; SECTOR NOT FOUND
    86 0000000B 03                  <1> 	DB	3			; WRITE ATTEMPT TO WRITE-PROTECT DISK
    87                              <1> 
    88                              <1> DOS_NUMERR	EQU	$-DOS_ERROUT
    89                              <1> 	%ENDIF
    90                              <1> MSC001E label byte
    91                              <1> 
    92                              <1> TABLE	ENDS
    93                              <1> section DOSCODECODE
    94                              <1> 
    95                              <1> ;   AbsSetup - setup for abs disk functions
    96                              <1> 
    97                              <1> Procedure   AbsSetup,NEAR
    97          ******************  <1>  warning: proc AbsSetup... [-w+user]
    98                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:DOSGroup
    99 00000000 FB                  <1> 	STI
   100 00000001 FC                  <1> 	CLD
   101 00000002 1E                  <1> 	PUSH	DS
   102 00000003 161F                <1> 	Context DS
   103 00000005 E8FD00              <1> 	CALL	GETBP_DOS
   104 00000008 7206                <1> 	JC	errdriv 		;PM. error drive			;AN000;
   105 0000000A 26C7461FFFFF        <1> 	MOV	word [ES:BP + dpb_free_cnt],-1 ; do not trust user at all.
   106                              <1> errdriv:
   107 00000010 1F                  <1> 	POP	DS
   108                              <1> ASSUME	DS:NOTHING
   109 00000011 7301C3              <1> 	retc
   110                              <1> 
   111 00000014 36C706[0000]0000    <1> 	MOV	word [ss:HIGH_SECTOR],0 	;>32mb	from API			;AN000;
   112 0000001B E8A504              <1> 	CALL	RW32_CONVERT		;>32mb convert 32bit format to 16bit	;AN000;
   113 0000001E 72F3                <1> 	retc
   114                              <1> 
   115                              <1> %ifndef BUF2
   116                              <1> 	invoke	SET_RQ_SC_PARMS 	;LB. set up SC parms			;AN000;
   117                              <1> %endif
   118 00000020 1E                  <1> 	PUSH	DS
   119 00000021 56                  <1> 	PUSH	SI
   120 00000022 50                  <1> 	PUSH	AX
   121 00000023 161F                <1> 	Context DS
   122                              <1> OPENBUF equ OpenBuf	; NASM port label
   123 00000025 BE[0000]            <1> 	MOV	SI,OFFSET OPENBUF wrt DOSGROUP
   124 00000028 8804                <1> 	MOV	[SI],AL
   125 0000002A 800441              <1> 	ADD	BYTE PTR [SI],"A"
   126 0000002D C744013A00          <1> 	MOV	WORD PTR [SI+1],003AH	; ":",0
   127 00000032 B80003              <1> 	MOV	AX,0300H
   128 00000035 F8                  <1> 	CLC
   129 00000036 CD2A                <1> 	INT	int_IBM 		; Will set carry if shared
   130 00000038 58                  <1> 	POP	AX
   131 00000039 5E                  <1> 	POP	SI
   132 0000003A 1F                  <1> 	POP	DS
   133                              <1> ASSUME	DS:NOTHING
   134 0000003B 73D6                <1> 	retnc
   135 0000003D 36C706[0000]3200    <1> 	MOV	word [ss:ExtErr],error_not_supported
   136 00000044 C3                  <1> 	return
   137                              <1> EndProc AbsSetup
   138                              <1> 
   139                              <1> ; Interrupt 25 handler.  Performs absolute disk read.
   140                              <1> ; Inputs:	AL - 0-based drive number
   141                              <1> ;		DS:BX point to destination buffer
   142                              <1> ;		CX number of logical sectors to read
   143                              <1> ;		DX starting  logical sector number (0-based)
   144                              <1> ; Outputs:	Original flags still on stack
   145                              <1> ;		Carry set
   146                              <1> ;		    AH error from BIOS
   147                              <1> ;		    AL same as low byte of DI from INT 24
   148                              <1> 
   149                              <1> %if _RELOCATEDOSCODE
   150                              <1> relocated _i25_i26
   151 00000045 727E                <1> 	jc relocatedi26
   152                              <1> %endif
   153                              <1> relocated i25
   154                              <1> 	procedure   ABSDRD,FAR
   154          ******************  <1>  warning: proc ABSDRD... [-w+user]
   155                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
   156                              <1> 
   157                              <1> extern doscode_getdosdata
   158                              <1> extern temp_var
   159                              <1> 
   160 00000047 FA                  <1> 	CLI
   161 00000048 1E                  <1> 	push ds
   162 00000049 50                  <1> 	push ax
   163 0000004A E8(0000)            <1> 	call doscode_getdosdata
   164 0000004D 8ED8                <1> 	mov ds, ax
   165                              <1>  assume ds:DOSGROUP
   166                              <1> INDOS equ InDos	; NASM port label
   167 0000004F FE06[0000]          <1> 	inc byte [INDOS]
   168 00000053 58                  <1> 	pop ax
   169 00000054 8F06[0000]          <1> 	pop word [temp_var]		; rescue user ds
   170                              <1> 
   171                              <1> user_SS equ User_SS	; NASM port label
   172 00000058 8C16[0000]          <1> 	MOV	[user_SS],SS
   173                              <1> user_SP equ User_SP	; NASM port label
   174 0000005C 8926[0000]          <1> 	MOV	[user_SP],SP
   175                              <1> DSKSTACK equ DskStack	; NASM port label
   176 00000060 1E                  <1> 	PUSH	ds
   177 00000061 17                  <1> 	POP	SS
   178 00000062 BC[0000]            <1> 	MOV	SP,OFFSET DSKSTACK wrt DOSGROUP
   179                              <1> ASSUME	SS:DOSGROUP
   180 00000065 8E1E[0000]          <1> 	mov ds, word [temp_var]
   181                              <1>  assume ds:nothing
   182 00000069 E8(0000)            <1> 	invoke	Save_World		      ;>32mb save all regs		;AN000;
   183 0000006C 06                  <1> 	PUSH	ES
   184 0000006D E890FF              <1> 	CALL	AbsSetup
   185 00000070 722A                <1> 	JC	ILEAVE
   186                              <1> %ifn IBMCOPYRIGHT
   187                              <1> ; Here is a gross temporary fix to get around a serious design flaw in
   188                              <1> ;  the secondary cache.  The secondary cache does not check for media
   189                              <1> ;  changed (it should).  Hence, you can change disks, do an absolute
   190                              <1> ;  read, and get data from the previous disk.  To get around this,
   191                              <1> ;  we just won't use the secondary cache for absolute disk reads.
   192                              <1> ;                                                      -mw 8/5/88
   193 00000072 E8(0000)            <1> 	EnterCrit   critDisk
   194 00000075 36C606[0000]FF      <1> 	MOV	byte [ss:CURSC_DRIVE],-1	      ; invalidate SC			;AN000;
   195 0000007B E8(0000)            <1> 	LeaveCrit   critDisk
   196                              <1> %endif
   197 0000007E E8(0000)            <1> 	invoke	DSKREAD
   198                              <1> TLEAVE:
   199 00000081 7419                <1> 	JZ	ILEAVE
   200                              <1> 
   201                              <1> 	%IF	IBM
   202                              <1> ; Translate the error code to ancient 1.1 codes
   203 00000083 06                  <1> 	PUSH	ES
   204 00000084 0E                  <1> 	 PUSH	CS			; => DOSCODE
   205 00000085 07                  <1> 	 POP	ES
   206                              <1>  assume es:DOSCODEGROUP
   207 00000086 30E4                <1> 	XOR	AH,AH			; Nul error code
   208 00000088 B90600              <1> 	MOV	CX,DOS_NUMERR		; Number of possible error conditions
   209 0000008B BF[0000]            <1> 	MOV	DI,OFFSET DOS_ERRIN	; Point to error conditions
   210 0000008E F2AE                <1> 	REPNE	SCASB
   211 00000090 7504                <1> 	JNZ	LEAVECODE		; Not found
   212 00000092 268A6505            <1> 	MOV	AH,[ES:DI+DOS_NUMERR-1]	; Get translation
   213                              <1> LEAVECODE:
   214 00000096 07                  <1> 	POP	ES
   215                              <1>  assume es:nothing
   216                              <1> 	%ENDIF
   217 00000097 36A3[0000]          <1> 	MOV	[ss:IFS_DRIVER_ERR],AX	;>32mb save error
   218 0000009B F9                  <1> 	STC
   219                              <1> ILEAVE:					; ! CF has error status
   220 0000009C 07                  <1> 	POP	ES
   221                              <1>  assume es:nothing
   222 0000009D E8(0000)            <1> 	invoke	Restore_World		     ;>32mb				;AN000;
   223                              <1>  assume ds:nothing, es:nothing
   224 000000A0 FA                  <1> 	CLI
   225 000000A1 36A1[0000]          <1> 	MOV	AX,[ss:IFS_DRIVER_ERR]	     ;>32mb restore error		;AN000;
   226 000000A5 1E                  <1> 	push ds
   227 000000A6 56                  <1> 	push si
   228 000000A7 36C536[0000]        <1> 	lds si, [ss:user_SP]		; ds:si -> user stack
   229                              <1>  assume ds:nothing
   230 000000AC 4E                  <1> 	dec si				; ! preserce CF
   231 000000AD 4E                  <1> 	dec si				; make space for a word on the stack
   232 000000AE 8F04                <1> 	pop word [si]			; si
   233 000000B0 4E                  <1> 	dec si
   234 000000B1 4E                  <1> 	dec si				; ! preserve CF
   235 000000B2 8F04                <1> 	pop word [si]			; ds
   236 000000B4 4E                  <1> 	dec si
   237 000000B5 4E                  <1> 	dec si				; ! preserve CF
   238 000000B6 8C14                <1> 	mov word [si], ss		; => DOSDATA
   239 000000B8 1E                  <1> 	push ds
   240 000000B9 17                  <1> 	pop ss
   241 000000BA 89F4                <1> 	mov sp, si	; -> user stack (DOS ds, ds, si, ip, cs, fl)
   242                              <1> ASSUME	SS:NOTHING
   243 000000BC 1F                  <1> 	pop ds
   244                              <1>  assume ds:DOSGROUP
   245 000000BD FE0E[0000]          <1> 	dec byte [INDOS]		; ! preserve CF
   246 000000C1 1F                  <1> 	pop ds				; ds first
   247                              <1>  assume ds:nothing
   248 000000C2 5E                  <1> 	pop si				; then si
   249 000000C3 FB                  <1> 	STI
   250                              <1> 
   251                              <1> entry doscode_retf
   252 000000C4 CB                  <1> 	RET				; This must not be a RETURN!
   253                              <1> EndProc ABSDRD
   254                              <1> 
   255                              <1> ; Interrupt 26 handler.  Performs absolute disk write.
   256                              <1> ; Inputs:	AL - 0-based drive number
   257                              <1> ;		DS:BX point to source buffer
   258                              <1> ;		CX number of logical sectors to write
   259                              <1> ;		DX starting  logical sector number (0-based)
   260                              <1> ; Outputs:	Original flags still on stack
   261                              <1> ;		Carry set
   262                              <1> ;		    AH error from BIOS
   263                              <1> ;		    AL same as low byte of DI from INT 24
   264                              <1> 
   265                              <1> relocated i26
   266                              <1> 	procedure   ABSDWRT,FAR
   266          ******************  <1>  warning: proc ABSDWRT... [-w+user]
   267                              <1> ASSUME	DS:NOTHING,ES:NOTHING,SS:NOTHING
   268                              <1> 
   269 000000C5 FA                  <1> 	CLI
   270 000000C6 1E                  <1> 	push ds
   271 000000C7 50                  <1> 	push ax
   272 000000C8 E8(0000)            <1> 	call doscode_getdosdata
   273 000000CB 8ED8                <1> 	mov ds, ax
   274                              <1>  assume ds:DOSGROUP
   275 000000CD FE06[0000]          <1> 	inc byte [INDOS]
   276 000000D1 58                  <1> 	pop ax
   277 000000D2 8F06[0000]          <1> 	pop word [temp_var]		; rescue user ds
   278                              <1> 
   279 000000D6 8C16[0000]          <1> 	MOV	[user_SS],SS
   280 000000DA 8926[0000]          <1> 	MOV	[user_SP],SP
   281 000000DE 1E                  <1> 	PUSH	ds
   282 000000DF 17                  <1> 	POP	SS
   283 000000E0 BC[0000]            <1> 	MOV	SP,OFFSET DSKSTACK wrt DOSGROUP
   284                              <1> ASSUME	SS:DOSGROUP
   285 000000E3 8E1E[0000]          <1> 	mov ds, word [temp_var]
   286                              <1>  assume ds:nothing
   287 000000E7 E8(0000)            <1> 	invoke	Save_World		      ;>32mb save all regs		;AN000;
   288 000000EA 06                  <1> 	PUSH	ES
   289 000000EB E812FF              <1> 	CALL	AbsSetup
   290 000000EE 72AC                <1> 	JC	ILEAVE
   291                              <1> 
   292 000000F0 E8(0000)            <1> 	EnterCrit   critDisk
   293 000000F3 36C606[0000]FF      <1> 	MOV	byte [ss:CURSC_DRIVE],-1	      ; invalidate SC			;AN000;
   294 000000F9 E80104              <1> 	CALL	Fastxxx_Purge		      ; purge fatopen			;AN000;
   295 000000FC E8(0000)            <1> 	LeaveCrit   critDisk
   296                              <1> 
   297 000000FF E8(0000)            <1> 	invoke	DSKWRITE
   298 00000102 E97CFF              <1> 	JMP	TLEAVE
   299                              <1> EndProc ABSDWRT
   300                              <1> 
   301                              <1> ; Inputs:
   302                              <1> ;	AL = Logical unit number (A = 0)
   303                              <1> ; Function:
   304                              <1> ;	Find Drive Parameter Block
   305                              <1> ; Outputs:
   306                              <1> ;	ES:BP points to DPB
   307                              <1> ;	[THISDPB] = ES:BP
   308                              <1> ;	Carry set if unit number bad or unit is a NET device.
   309                              <1> ;		Later case sets extended error error_I24_not_supported
   310                              <1> ; No other registers altered
   311                              <1> 
   312                              <1> Procedure GETBP_DOS,NEAR
   312          ******************  <1>  warning: proc GETBP_DOS... [-w+user]
   313                              <1> 	DOSAssume   CS,<DS>,"GetBP_DOS"
   314                              <1> 	ASSUME	ES:NOTHING
   315                              <1> 
   316 00000105 50                  <1> 	PUSH	AX
   317 00000106 0401                <1> 	ADD	AL,1			; No increment; need carry flag
   318 00000108 7216                <1> 	JC	SkipGet
   319 0000010A E8(0000)            <1> 	invoke	GetThisDrv
   320 0000010D 7311                <1> 	JNC	SkipGet 		   ;PM. good drive			;AN000;
   321 0000010F 30E4                <1> 	XOR	AH,AH			   ;DCR. ax= error code 		;AN000;
   322                              <1> error_not_dos_disk equ error_not_DOS_disk	; NASM port equate
   323 00000111 83F81A              <1> 	CMP	AX,error_not_dos_disk	   ;DCR. is unknown media ?		;AN000;
   324 00000114 740A                <1> 	JZ	SkipGet 		   ;DCR. yes, let it go 		;AN000;
   325 00000116 F9                  <1> 	STC				   ;DCR.				;AN000;
   326 00000117 A3[0000]            <1> 	MOV	[ExtErr],AX		   ;PM. invalid drive or Non DOS drive	;AN000;
   327 0000011A C706[0000]0102      <1> 	MOV	word [IFS_DRIVER_ERR],0201H	   ;PM. other errors/unknown unit	;AN000;
   328                              <1> SkipGet:
   329 00000120 58                  <1> 	POP	AX
   330 00000121 7301C3              <1> 	retc
   331                              <1> THISCDS equ ThisCDS	; NASM port label
   332 00000124 C42E[0000]          <1> 	LES	BP,[THISCDS]
   333 00000128 26F746430080        <1> 	TEST	word [ES:BP + curdir_flags],curdir_isnet   ; Clears carry
   334 0000012E 7408                <1> 	JZ	GETBP_CDS
   335 00000130 C706[0000]3200      <1> 	MOV	word [ExtErr],error_not_supported
   336 00000136 F9                  <1> 	STC
   337 00000137 C3                  <1> 	return
   338                              <1> 
   339                              <1> GETBP_CDS:
   340 00000138 26C46E45            <1> 	LES	BP,[ES:BP + curdir_devptr]
   341                              <1> 
   342                              <1> 	entry	GOTDPB
   343                              <1> 	DOSAssume   CS,<DS>,"GotDPB"
   344                              <1> ; Load THISDPB from ES:BP
   345                              <1> 
   346                              <1> THISDPB equ ThisDPB	; NASM port label
   347 0000013C 892E[0000]          <1> 	MOV	WORD PTR [THISDPB],BP
   348 00000140 8C06[0200]          <1> 	MOV	WORD PTR [THISDPB+2],ES
   349 00000144 C3                  <1> 	return
   350                              <1> EndProc GetBP_DOS
   351                              <1> 
   352                              <1> BREAK <SYS_RET_OK SYS_RET_ERR CAL_LK ETAB_LK set system call returns>
   353                              <1> 
   354                              <1>  assume nocheck, ss:DOSGROUP
   355                              <1> 
   356                              <1> ;
   357                              <1> ; These are the general system call exit mechanisms.  All internal system
   358                              <1> ; calls will transfer (jump) to one of these at the end.  Their sole purpose
   359                              <1> ; is to set the user's flags and set his AX register for return.
   360                              <1> ;
   361                              <1> 
   362                              <1> procedure   SYS_RETURN,NEAR
   362          ******************  <1>  warning: proc SYS_RETURN... [-w+user]
   363                              <1> 	ASSUME	DS:NOTHING,ES:NOTHING
   364                              <1> entry	SYS_RET_OK
   365 00000145 E8(0000)            <1> 	invoke	FETCHI_CHECK		; TAG checking for FETCHI
   366 00000148 E8(0000)            <1> 	invoke	get_user_stack
   367 0000014B 836416FE            <1> 	AND	word [SI + user_F],~ f_Carry ; turn off user's carry flag
   368 0000014F EB10                <1> 	JMP	SHORT DO_RET		; carry is now clear
   369                              <1> 
   370                              <1> entry	SYS_RET_ERR
   371 00000151 30E4                <1> 	XOR	AH,AH			; hack to allow for smaller error rets
   372 00000153 E86C00              <1> 	invoke	ETAB_LK 		; Make sure code is OK, EXTERR gets set
   373                              <1> ErrorMap equ errorMap	; NASM port label
   374 00000156 E81A00              <1> 	CALL	ErrorMap
   375                              <1> entry	From_GetSet
   376 00000159 E8(0000)            <1> 	invoke	get_user_stack
   377 0000015C 834C1601            <1> 	OR	word [SI + user_F],f_Carry	; signal carry to user
   378 00000160 F9                  <1> 	STC				; also, signal internal error
   379                              <1> DO_RET:
   380 00000161 8904                <1> 	MOV	[SI + user_AX],AX 	; Really only sets AH
   381 00000163 C3                  <1> 	return
   382                              <1> 
   383                              <1> 	entry	FCB_RET_OK
   384                              <1> 	entry	CPMFunc
   385 00000164 30C0                <1> 	XOR	AL,AL
   386 00000166 C3                  <1> 	return
   387                              <1> 
   388                              <1> 	entry	FCB_RET_ERR
   389 00000167 30E4                <1> 	XOR	AH,AH
   390                              <1> exterr equ ExtErr	; NASM port label
   391 00000169 36A3[0000]          <1> 	mov	[ss:exterr],AX
   392 0000016D E80300              <1> 	CALL	ErrorMap
   393 00000170 B0FF                <1> 	MOV	AL,-1
   394 00000172 C3                  <1> 	return
   395                              <1> 
   396                              <1> 	entry	errorMap
   397 00000173 56                  <1> 	PUSH	SI
   398                              <1> ERR_TABLE_21 equ Err_Table_21	; NASM port label
   399 00000174 BE[0000]            <1> 	MOV	SI,OFFSET ERR_TABLE_21 wrt DOSGROUP
   400                              <1> FAILERR equ FailErr	; NASM port label
   401 00000177 36803E[0000]00      <1> 	CMP	byte [ss:FAILERR],0		; Check for SPECIAL case.
   402 0000017D 740A                <1> 	JZ	EXTENDED_NORMAL 	; All is OK.
   403                              <1> EXTERR equ ExtErr	; NASM port label
   404 0000017F 36C706[0000]5300    <1> 	MOV	word [ss:EXTERR],error_FAIL_I24 ; Ooops, this is the REAL reason
   405 00000186 BE[0000]            <1> 	MOV	SI,OFFSET ERR_TABLE_21 wrt DOSGROUP
   406                              <1> EXTENDED_NORMAL:
   407 00000189 E80200              <1> 	invoke	CAL_LK			; Set CLASS,ACTION,LOCUS for EXTERR
   408 0000018C 5E                  <1> 	POP	SI
   409 0000018D C3                  <1> 	return
   410                              <1> 
   411                              <1> EndProc SYS_RETURN
   412                              <1> 
   413                              <1> ; Inputs:
   414                              <1> ;	SI is OFFSET in DOSGROUP of CLASS,ACTION,LOCUS Table to use
   415                              <1> ;		(DS NEED not be DOSGROUP)
   416                              <1> ;	[EXTERR] is set with error
   417                              <1> ; Function:
   418                              <1> ;	Look up and set CLASS ACTION and LOCUS values for GetExtendedError
   419                              <1> ; Outputs:
   420                              <1> ;	[EXTERR_CLASS] set
   421                              <1> ;	[EXTERR_ACTION] set
   422                              <1> ;	[EXTERR_LOCUS] set  (EXCEPT on certain errors as determined by table)
   423                              <1> ; Destroys SI, FLAGS
   424                              <1> 
   425                              <1> 	procedure   CAL_LK,NEAR
   425          ******************  <1>  warning: proc CAL_LK... [-w+user]
   426                              <1> ASSUME	DS:NOTHING,ES:NOTHING
   427                              <1> 
   428 0000018E 1E                  <1> 	PUSH	DS
   429 0000018F 50                  <1> 	PUSH	AX
   430 00000190 53                  <1> 	PUSH	BX
   431 00000191 161F                <1> 	Context DS		; DS:SI -> Table
   432 00000193 8B1E[0000]          <1> 	MOV	BX,[EXTERR]	; Get error in BL
   433                              <1> TABLK1:
   434 00000197 AC                  <1> 	LODSB
   435 00000198 3CFF                <1> 	CMP	AL,0FFH
   436 0000019A 7409                <1> 	JZ	GOT_VALS	; End of table
   437 0000019C 38D8                <1> 	CMP	AL,BL
   438 0000019E 7405                <1> 	JZ	GOT_VALS	; Got entry
   439 000001A0 83C603              <1> 	ADD	SI,3		; Next table entry
   440 000001A3 EBF2                <1> 	JMP	TABLK1
   441                              <1> 
   442                              <1> GOT_VALS:
   443 000001A5 AD                  <1> 	LODSW			; AL is CLASS, AH is ACTION
   444 000001A6 80FCFF              <1> 	CMP	AH,0FFH
   445 000001A9 7404                <1> 	JZ	NO_SET_ACT
   446                              <1> EXTERR_ACTION equ ExtErr_Action	; NASM port label
   447 000001AB 8826[0000]          <1> 	MOV	[EXTERR_ACTION],AH     ; Set ACTION
   448                              <1> NO_SET_ACT:
   449 000001AF 3CFF                <1> 	CMP	AL,0FFH
   450 000001B1 7403                <1> 	JZ	NO_SET_CLS
   451                              <1> EXTERR_CLASS equ ExtErr_Class	; NASM port label
   452 000001B3 A2[0000]            <1> 	MOV	[EXTERR_CLASS],AL      ; Set CLASS
   453                              <1> NO_SET_CLS:
   454 000001B6 AC                  <1> 	LODSB			; Get LOCUS
   455 000001B7 3CFF                <1> 	CMP	AL,0FFH
   456 000001B9 7403                <1> 	JZ	NO_SET_LOC
   457                              <1> EXTERR_LOCUS equ ExtErr_Locus	; NASM port label
   458 000001BB A2[0000]            <1> 	MOV	[EXTERR_LOCUS],AL
   459                              <1> NO_SET_LOC:
   460 000001BE 5B                  <1> 	POP	BX
   461 000001BF 58                  <1> 	POP	AX
   462 000001C0 1F                  <1> 	POP	DS
   463                              <1>  assume ds:nothing
   464 000001C1 C3                  <1> 	return
   465                              <1> EndProc CAL_LK
   466                              <1> 
   467                              <1> ; Inputs:
   468                              <1> ;	AX is error code
   469                              <1> ;	[USER_IN_AX] has AH value of system call involved
   470                              <1> ; Function:
   471                              <1> ;	Make sure error code is appropriate to this call.
   472                              <1> ; Outputs:
   473                              <1> ;	AX MAY be mapped error code
   474                              <1> ;	[EXTERR] = Input AX
   475                              <1> ; Destroys ONLY AX and FLAGS
   476                              <1> 
   477                              <1> 	procedure   ETAB_LK,NEAR
   477          ******************  <1>  warning: proc ETAB_LK... [-w+user]
   478                              <1> ASSUME	DS:NOTHING,ES:NOTHING
   479                              <1> 
   480 000001C2 1E                  <1> 	PUSH	DS
   481 000001C3 56                  <1> 	PUSH	SI
   482 000001C4 51                  <1> 	PUSH	CX
   483 000001C5 53                  <1> 	PUSH	BX
   484 000001C6 161F                <1> 	Context DS
   485 000001C8 A3[0000]            <1> 	MOV	[EXTERR],AX		; Set EXTERR with "real" error
   486                              <1> I21_MAP_E_TAB equ I21_Map_E_Tab	; NASM port label
   487 000001CB BE[0000]            <1> 	MOV	SI,OFFSET I21_MAP_E_TAB
   488 000001CE 88C7                <1> 	MOV	BH,AL			; Real code to BH
   489                              <1> USER_IN_AX equ User_In_AX	; NASM port label
   490 000001D0 8A1E[0100]          <1> 	MOV	BL,BYTE PTR [USER_IN_AX + 1]	; Sys call to BL
   491                              <1> TABLK2:
   492 000001D4 2EAD                <1> 	cs LODSW
   493 000001D6 3CFF                <1> 	CMP	AL,0FFH 		; End of table?
   494 000001D8 740C                <1> 	JZ	NOT_IN_TABLE		; Yes
   495 000001DA 38D8                <1> 	CMP	AL,BL			; Found call?
   496 000001DC 740C                <1> 	JZ	GOT_CALL		; Yes
   497 000001DE 86E0                <1> 	XCHG	AH,AL			; Count to AL
   498 000001E0 30E4                <1> 	XOR	AH,AH			; Make word for add
   499 000001E2 01C6                <1> 	ADD	SI,AX			; Next table entry
   500 000001E4 EBEE                <1> 	JMP	TABLK2
   501                              <1> 
   502                              <1> NOT_IN_TABLE:
   503 000001E6 88F8                <1> 	MOV	AL,BH			; Restore original code
   504 000001E8 EB0C                <1> 	JMP	SHORT NO_MAP
   505                              <1> 
   506                              <1> GOT_CALL:
   507 000001EA 88E1                <1> 	MOV	CL,AH
   508 000001EC 30ED                <1> 	XOR	CH,CH			; Count of valid err codes to CX
   509                              <1> CHECK_CODE:
   510 000001EE 2EAC                <1> 	cs LODSB
   511 000001F0 38F8                <1> 	CMP	AL,BH			; Code OK?
   512 000001F2 7402                <1> 	JZ	NO_MAP			; Yes
   513 000001F4 E2F8                <1> 	LOOP	CHECK_CODE
   514                              <1> NO_MAP:
   515 000001F6 30E4                <1> 	XOR	AH,AH			; AX is now valid code
   516 000001F8 5B                  <1> 	POP	BX
   517 000001F9 59                  <1> 	POP	CX
   518 000001FA 5E                  <1> 	POP	SI
   519 000001FB 1F                  <1> 	POP	DS
   520                              <1>  assume ds:nothing
   521 000001FC C3                  <1> 	return
   522                              <1> 
   523                              <1> EndProc ETAB_LK
   524                              <1> 
   525                              <1> BREAK <DOS 2F Handler and $default NET 2F handler>
   526                              <1> 
   527                              <1> %IF installed
   528                              <1> 
   529                              <1> ;
   530                              <1> ; SetBad sets up info for bad functions
   531                              <1> ;
   532                              <1> Procedure   SetBad,NEAR
   532          ******************  <1>  warning: proc SetBad... [-w+user]
   533                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
   534 000001FD E8(0000)            <1> 	call doscode_getdosdata
   535 00000200 1E                  <1> 	push ds
   536 00000201 8ED8                <1> 	mov ds, ax
   537                              <1>  assume ds:DOSGROUP
   538                              <1> ExtErr_LOCUS equ ExtErr_Locus	; NASM port label
   539                              <1> errLoc_UNK equ errLOC_Unk	; NASM port equate
   540 00000203 C606[0000]01        <1> 	MOV	byte [ExtErr_LOCUS],errLoc_UNK
   541 00000208 1F                  <1> 	pop ds
   542                              <1>  assume ds:nothing
   543                              <1> set_ax_1_CY:
   544 00000209 B80100              <1> 	MOV	AX,error_invalid_function	; ALL NET REQUESTS get inv func
   545 0000020C F9                  <1> 	STC
   546 0000020D C3                  <1> 	ret
   547                              <1> EndProc SetBad
   548                              <1> ;
   549                              <1> ; BadCall is the initial routine for bad function calls
   550                              <1> ;
   551                              <1> relocated badcallentry
   552                              <1> procedure   BadCall,FAR
   552          ******************  <1>  warning: proc BadCall... [-w+user]
   553 0000020E E8ECFF              <1> 	call	SetBad
   554 00000211 CB                  <1> 	ret
   555                              <1> EndProc BadCall
   556                              <1> ;
   557                              <1> ; OKCall always sets carry to off.
   558                              <1> ;
   559                              <1> %if _RELOCATEDOSCODE
   560                              <1> relocated _okcallentry_badcallentry
   561 00000212 72FA                <1> 	jc relocatedbadcallentry
   562                              <1> %endif
   563                              <1> relocated okcallentry
   564                              <1> Procedure   OKCall,FAR
   564          ******************  <1>  warning: proc OKCall... [-w+user]
   565                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
   566 00000214 F8                  <1> 	CLC
   567 00000215 CB                  <1> 	ret
   568                              <1> EndProc OKCall
   569                              <1> 
   570                              <1> ; INT 2F handler works as follows:
   571                              <1> ;   PUSH    AX
   572                              <1> ;   MOV     AX,multiplex:function
   573                              <1> ;   INT     2F
   574                              <1> ;   POP     ...
   575                              <1> ; The handler itself needs to make the AX available for the various routines.
   576                              <1> 
   577                              <1> relocated msdos_i2F
   578                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
   579 00000216 FB                  <1> 	STI
   580                              <1> multNET equ MultNET	; NASM port equate
   581 00000217 80FC11              <1> 	CMP	AH,multNET
   582 0000021A 751C                <1> 	JNZ	INT2FSHR
   583                              <1> TestInstall:			; used for 2F.11, 2F.10, 2F.14
   584 0000021C 84C0                <1> 	test	AL,AL		; (NC)
   585 0000021E 7403                <1> 	JZ	Leave2F		; subfunction 00 --> return NC, ax unmodified
   586                              <1> BadFunc:
   587 00000220 E8DAFF              <1> 	CALL	SetBad		; other subfunction, return CY ax = 1
   588                              <1> 
   589                              <1> entry	Leave13		; for msbio/ms96tpi.nas and msbio/msdisk.nas
   590                              <1> entry	Leave2F
   591 00000223 55                  <1> 	push bp
   592 00000224 89E5                <1> 	mov bp, sp
   593 00000226 50                  <1> 	push ax
   594 00000227 9F                  <1> 	lahf
   595                              <1> ; bp + 0 = saved bp
   596                              <1> ; bp + 2 = ip
   597                              <1> ; bp + 4 = cs
   598                              <1> ; bp + 6 = fl
   599 00000228 886606              <1> 	mov byte [bp + 6], ah
   600 0000022B 58                  <1> 	pop ax
   601 0000022C 5D                  <1> 	pop bp
   602 0000022D CF                  <1> 	iret
   603                              <1> 
   604                              <1> %if _RELOCATEDOSCODE
   605                              <1>  extern relocatedi6C
   606                              <1> relocated _i31_i6C
   607 0000022E 7303E9(0000)        <1> 	jc relocatedi6C
   608                              <1> %endif
   609                              <1> relocated i31
   610 00000233 E8D3FF              <1> 	call set_ax_1_CY
   611 00000236 EBEB                <1> 	jmp Leave2F
   612                              <1> 
   613                              <1> INT2FSHR:
   614                              <1> multSHARE equ MultSHARE	; NASM port equate
   615 00000238 80FC10              <1> 	CMP	AH,multSHARE		; is this a share request
   616 0000023B 74DF                <1> 	JZ	TestInstall		; yes, check for installation
   617                              <1> 
   618                              <1> INT2FNLS:
   619 0000023D 80FC14              <1> 	CMP	AH,NLSFUNC		; is this a DOS 3.3 NLSFUNC request
   620 00000240 74DA                <1> 	JZ	TestInstall		; yes check for installation
   621                              <1> 
   622                              <1> INT2FDOS:
   623                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:NOTHING
   624                              <1> multDOS equ MultDOS	; NASM port equate
   625 00000242 80FC12              <1> 	CMP	AH,multDOS
   626 00000245 7406                <1> 	JZ	DispatchDOS
   627 00000247 80FC4A              <1> 	cmp ah, 4Ah
   628 0000024A 7428                <1> 	je hma_access
   629 0000024C CF                  <1> 	IRET				; This assumes that we are at the head
   630                              <1> 					;  of the list (there is no downlink).
   631                              <1> 
   632                              <1> DispatchDOS:
   633 0000024D 3C61                <1> 	cmp al, 61h
   634 0000024F 7417                <1> 	je get_first_umcb		; (NC)
   635 00000251 2EFF36[0000]        <1> 	PUSH	word [cs:FOO]			; push return address
   636                              <1> DTab equ DTAB	; NASM port label
   637 00000256 2EFF36[0000]        <1> 	PUSH	word [cs:DTab]			; push table address
   638 0000025B 50                  <1> 	PUSH	AX			; push index
   639 0000025C 55                  <1> 	PUSH	BP
   640 0000025D 89E5                <1> 	MOV	BP,SP
   641                              <1> ; stack looks like:
   642                              <1> ;   0	BP
   643                              <1> ;   2	DISPATCH
   644                              <1> ;   4	TABLE
   645                              <1> ;   6	RETURN
   646                              <1> ;   8	LONG-RETURN
   647                              <1> ;   c	FLAGS
   648                              <1> ;   e	AX
   649                              <1> 
   650 0000025F 8B460E              <1> 	MOV	AX,[BP+0Eh]		; get AX value
   651 00000262 5D                  <1> 	POP	BP
   652 00000263 E8(0000)            <1> 	Invoke	TableDispatch
   653 00000266 EBB8                <1> 	JMP	BadFunc 		; return indicates invalid function
   654                              <1> 
   655                              <1> Procedure   INT2F_etcetera,NEAR
   655          ******************  <1>  warning: proc INT2F_etcetera... [-w+user]
   656                              <1> 
   657                              <1> extern first_umcb
   658                              <1> 
   659                              <1> get_first_umcb:		; (NC)
   660 00000268 E8(0000)            <1> 	call doscode_getdosdata
   661 0000026B 1E                  <1> 	push ds
   662 0000026C 8ED8                <1> 	mov ds, ax
   663                              <1>  assume ds:DOSGROUP
   664 0000026E A1[0000]            <1> 	mov ax, [first_umcb]
   665 00000271 1F                  <1> 	pop ds
   666                              <1>  assume ds:nothing
   667 00000272 EBAF                <1> 	jmp Leave2F
   668                              <1> 
   669                              <1> 
   670                              <1> hma_access:
   671                              <1>  assume ds:nothing, es:nothing
   672 00000274 3C01                <1> 	cmp al, 1
   673 00000276 721C                <1> 	jb .iret
   674 00000278 741B                <1> 	je .query
   675 0000027A 3C04                <1> 	cmp al, 4
   676 0000027C 721B                <1> 	jb .access
   677 0000027E 7514                <1> 	jne .iret
   678                              <1> %if _RELOCATEDOSCODE && _DOSCODEHMA
   679                              <1> 	; je .get_first_hmcb
   680                              <1> 
   681                              <1> .get_first_hmcb:
   682 00000280 1E                  <1> 	push ds
   683 00000281 53                  <1> 	push bx
   684 00000282 57                  <1> 	push di
   685 00000283 50                  <1> 	push ax
   686 00000284 E81502              <1> 	call getfirsthmcb
   687                              <1>  assume ds:nothing
   688                              <1> 		; OUT:	ds = FFFFh
   689                              <1> 		;	bx = 0
   690                              <1> 		;	NC if DOS manages the HMA,
   691                              <1> 		;	 ds:di -> first HMCB, allocated to DOS (owner = -2)
   692                              <1> 		;	 A20 is assumed on because our cs is in the HMA
   693                              <1> 		; CHG:	ds, di, bx, ax
   694 00000287 7207                <1> 	jc @F
   695 00000289 31C0                <1> 	xor ax, ax		; ax = 0
   696 0000028B 1E                  <1> 	 push ds
   697 0000028C 07                  <1> 	 pop es			; es:di -> first HMCB
   698                              <1>  assume es:nothing
   699 0000028D 5B                  <1> 	pop bx			; discard ax
   700 0000028E 5B                  <1> 	pop bx			; discard di
   701 0000028F A9                  <1> 	db __TEST_IMM16		; (skip pop twice)
   702                              <1> @@:
   703                              <1> 		; if we are not managing the HMA, return
   704                              <1> 		;  as if the function is not supported
   705 00000290 58                  <1> 	pop ax			; restore ax
   706 00000291 5F                  <1> 	pop di			; restore di
   707 00000292 5B                  <1> 	pop bx			; unconditionally: restore bx, ds, iret
   708 00000293 1F                  <1> 	pop ds
   709                              <1> %endif
   710                              <1>  assume ds:nothing
   711                              <1> .iret:
   712 00000294 CF                  <1> 	iret
   713                              <1> 
   714                              <1> .query:
   715                              <1> %if _RELOCATEDOSCODE && _DOSCODEHMA
   716 00000295 E83F01              <1> 	call find_largest_free_hmcb
   717                              <1> %else
   718                              <1> 	xor bx, bx
   719                              <1> 	mov di, -1
   720                              <1> 	mov es, di
   721                              <1> %endif
   722 00000298 CF                  <1> 	iret
   723                              <1> 
   724                              <1> 
   725                              <1> .access:
   726 00000299 51                  <1> 	push cx
   727 0000029A 52                  <1> 	push dx
   728 0000029B 3C03                <1> 	cmp al, 3		; MS-DOS v7 style access ?
   729 0000029D 7409                <1> 	je .access_new		; yes, dx and cx as passed -->
   730                              <1> 				; MS-DOS v5 style access, allocate like dl=0
   731                              <1> 				;  with owner = int 2Fh caller cs
   732                              <1> .alloc_legacy:
   733 0000029F 31D2                <1> 	xor dx, dx		; = function 0 (allocate low)
   734                              <1> 	lframe 0
   735                              <1> 	lpar word, iret_fl
   736                              <1> 	lpar word, iret_cs
   737                              <1> 	lpar word, iret_ip
   738                              <1> 	lpar word, cx
   739                              <1> 	lpar word, dx
   740 000002A1 5589E5              <1> 	lenter
   741 000002A4 8B4E08              <1> 	mov cx, word [bp + ?iret_cs]
   742                              <1> 				; owner = int 2Fh caller's cs
   743 000002A7 5D                  <1> 	lleave
   744                              <1> .access_new:
   745 000002A8 50                  <1> 	push ax
   746 000002A9 1E                  <1> 	push ds
   747 000002AA 53                  <1> 	push bx			; must be last here ! hma_alloc modifies this
   748                              <1> %if _RELOCATEDOSCODE && _DOSCODEHMA
   749 000002AB 80FA02              <1> 	cmp dl, 2
   750 000002AE 7478                <1> 	je hma_free
   751 000002B0 720C                <1> 	jb hma_alloc
   752                              <1> %endif
   753                              <1> 		; unknown function, return bx = unchanged, es:di = all-1s
   754                              <1> .access_invalid:
   755 000002B2 BFFFFF              <1> 	mov di, -1
   756 000002B5 8EC7                <1> 	mov es, di		; es:di = all-1s
   757                              <1>  assume es:nothing
   758                              <1> .access_return:
   759 000002B7 5B                  <1> 	pop bx			; must be first ! hma_alloc modifies this
   760 000002B8 1F                  <1> 	pop ds
   761                              <1>  assume ds:nothing
   762 000002B9 58                  <1> 	pop ax
   763 000002BA 5A                  <1> 	pop dx
   764 000002BB 59                  <1> 	pop cx
   765 000002BC CF                  <1> 	iret
   766                              <1> 
   767                              <1> 
   768                              <1> %if _RELOCATEDOSCODE && _DOSCODEHMA
   769                              <1> 		; INP:	dl = 0 if to allocate low
   770                              <1> 		;	dl = 1 if to allocate high
   771                              <1> 		;	dl is never >= 2 when branched here
   772                              <1> 		;	ss:sp -> bx, ds, ax, dx, cx on stack
   773                              <1> 		;	 (bx must be first !)
   774                              <1> 		;	cx = owner to set (if 0, use 1)
   775                              <1> 		;	bx = size to allocate (byte granularity)
   776                              <1> 		; OUT:	es:di = all-1s if couldn't allocate,
   777                              <1> 		;	 bx = unmodified
   778                              <1> 		;	es:di -> allocated data block if could allocate,
   779                              <1> 		;	 bx = actually allocated size in bytes,
   780                              <1> 		;	  rounded up to paragraph boundary
   781                              <1> 		; REM:	MS-DOS v7.10 returns bx unchanged if no alloc.
   782                              <1> @@:
   783 000002BD 41                  <1> 	inc cx			; cx = 1, avoid zero owner
   784                              <1> hma_alloc:
   785 000002BE E3FD                <1> 	jcxz @B			; jump back and increment cx if it was zero -->
   786                              <1> 
   787 000002C0 8D470F              <1> 	lea ax, [bx + 15]
   788 000002C3 83E0F0              <1> 	and ax, ~15		; round up to para boundary
   789                              <1> 				; ZR if too large !
   790 000002C6 74EA                <1> 	jz hma_access.access_invalid
   791                              <1> 				; return bx = unchanged, es:di = all-1s
   792 000002C8 E80C01              <1> 	call find_largest_free_hmcb
   793                              <1>  assume es:nothing
   794 000002CB 72EA                <1> 	jc hma_access.access_return
   795                              <1> 				; return bx = unchanged, es:di = all-1s
   796                              <1> 
   797 000002CD 39D8                <1> 	cmp ax, bx		; free block is large enough ?
   798 000002CF 77E1                <1> 	ja hma_access.access_invalid
   799                              <1> 				; no -->
   800 000002D1 1F                  <1> 	pop ds			; discard bx on stack (must be first !)
   801                              <1>  assume ds:nothing
   802 000002D2 50                  <1> 	push ax			; push ax instead (actual allocation size)
   803 000002D3 06                  <1> 	 push es
   804 000002D4 1F                  <1> 	 pop ds			; => HMA, ds:di -> behind HMCB to split
   805                              <1>  assume ds:nothing
   806                              <1> 
   807 000002D5 56                  <1> 	push si
   808 000002D6 BE0000              <1> 	mov si, 0		; ! preserve flags, si = 0
   809                              <1> 		; ds:di -> low HMCB data,
   810                              <1> 		;  size = bx + 16 >= ax + 16
   811                              <1> 		; ax = how much to alloc
   812                              <1> 		; bx = current data size minus 16
   813                              <1> 		; cx = owner to set
   814                              <1> 		; dl = function
   815                              <1> 		; si = 0
   816 000002D9 8975F8              <1> 	mov word [di - HMCB_size + hmcbName], si
   817 000002DC 8975FA              <1> 	mov word [di - HMCB_size + hmcbName + 2], si
   818 000002DF 8975FC              <1> 	mov word [di - HMCB_size + hmcbName + 4], si
   819 000002E2 8975FE              <1> 	mov word [di - HMCB_size + hmcbName + 6], si
   820                              <1> 				; clear the name of low HMCB
   821                              <1> 
   822 000002E5 7505                <1> 	jne .split		; NZ if free > requested
   823 000002E7 894DF2              <1> 	mov word [di - HMCB_size + hmcbOwner], cx
   824                              <1> 				; free == requested, just allocate here
   825                              <1> 				; sign, size, and next already set!
   826 000002EA EB39                <1> 	jmp .full
   827                              <1> 
   828                              <1> .split:
   829 000002EC 83EB10              <1> 	sub bx, HMCB_size
   830 000002EF 29C3                <1> 	sub bx, ax		; bx = current size - 16 - how much to alloc
   831                              <1> 				;  = remainder size
   832 000002F1 84D2                <1> 	test dl, dl
   833 000002F3 7504                <1> 	jnz .high
   834                              <1> .low:
   835 000002F5 93                  <1> 	xchg ax, bx		; bx = how much to alloc (no HMCB size)
   836                              <1> 				; ax = remainder size
   837                              <1> 				; di -> behind HMCB
   838 000002F6 874DF2              <1> 	xchg word [di - HMCB_size + hmcbOwner], cx
   839                              <1> 				; allocate it,
   840                              <1> 				;  and load cx = 0 (owner meaning free)
   841                              <1> .high:
   842                              <1> 		; if branched to .high:
   843                              <1> 		;  bx = remainder size (size for low HMCB)
   844                              <1> 		;  ax = how much to alloc (size for high HMCB)
   845                              <1> 		;  cx = owner to set (owner for high MCB)
   846                              <1> 		;  have to set es:di -> high HMCB data later
   847                              <1> 		; else if fell through from .low:
   848                              <1> 		;  bx = how much to alloc (size for low HMCB)
   849                              <1> 		;  ax = remainder size (size for high HMCB)
   850                              <1> 		;  cx = 0 (owner for high HMCB)
   851                              <1> 		;  es:di -> low HMCB data, to allocate
   852                              <1> 		; common:
   853                              <1> 		;  dl = mode (0 if low, 1 if high)
   854                              <1> 		;  es:di -> behind low HMCB
   855                              <1> 		;  owner of low HMCB set as desired
   856 000002F9 53                  <1> 	 push bx		; push bx
   857 000002FA 8D19                <1> 	lea bx, [di + bx]	; bx -> new (high) HMCB
   858 000002FC FF75F6              <1> 	  push word [di - HMCB_size + hmcbNext]
   859                              <1> 				; get old next
   860 000002FF C7074D53            <1> 	mov word [bx + hmcbSignature], "MS"
   861 00000303 894F02              <1> 	mov word [bx + hmcbOwner], cx
   862                              <1> 				; set owner (0 if low, input cx if high)
   863 00000306 894704              <1> 	mov word [bx + hmcbSize], ax
   864                              <1> 				; set size of high HMCB
   865 00000309 8F4706              <1> 	  pop word [bx + hmcbNext]; set new next
   866 0000030C 897708              <1> 	mov word [bx + hmcbName], si
   867 0000030F 89770A              <1> 	mov word [bx + hmcbName + 2], si
   868 00000312 89770C              <1> 	mov word [bx + hmcbName + 4], si
   869 00000315 89770E              <1> 	mov word [bx + hmcbName + 6], si
   870                              <1> 				; clear the name
   871 00000318 895DF6              <1> 	mov word [di - HMCB_size + hmcbNext], bx
   872                              <1> 				; -> next (created at top of block)
   873 0000031B 8F45F4              <1> 	 pop word [di - HMCB_size + hmcbSize]	; but pop memory
   874                              <1> 				; allocate size of low HMCB
   875 0000031E 84D2                <1> 	test dl, dl
   876 00000320 7403                <1> 	jz @F
   877 00000322 8D7F10              <1> 	lea di, [bx + HMCB_size]; -> top HMCB data
   878                              <1> @@:
   879                              <1> .full:
   880 00000325 5E                  <1> 	pop si
   881                              <1> j_hma_access.access_return:
   882 00000326 EB8F                <1> 	jmp hma_access.access_return
   883                              <1> 
   884                              <1> 
   885                              <1> hma_free:
   886 00000328 57                  <1> 	push di
   887 00000329 E87001              <1> 	call getfirsthmcb
   888                              <1>  assume ds:nothing
   889 0000032C 723D                <1> 	jc .none
   890 0000032E 57                  <1> 	 push di
   891 0000032F 8CC7                <1> 	mov di, es		; => user es
   892 00000331 4B                  <1> 	dec bx			; = -1
   893 00000332 39DF                <1> 	cmp di, bx		; match ?
   894 00000334 5B                  <1> 	 pop bx
   895 00000335 7534                <1> 	jne .none		; no -->
   896 00000337 5F                  <1> 	pop di
   897 00000338 57                  <1> 	push di
   898 00000339 F7C70F00            <1> 	test di, 15		; valid HMCB ?
   899 0000033D 752C                <1> 	jnz .none		; no -->
   900 0000033F 83EF10              <1> 	sub di, HMCB_size	; ds:di -> HMCB to free
   901 00000342 7627                <1> 	jbe .none		; reject too low HMCB !
   902 00000344 813D4D53            <1> 	cmp word [di + hmcbSignature], "MS"
   903 00000348 7521                <1> 	jne .none
   904 0000034A 39DF                <1> 	cmp di, bx		; is first HMCB or below ?
   905                              <1> 				;  (do not allow to free the first HMCB !)
   906 0000034C 761D                <1> 	jbe .none
   907                              <1> 	; MS-DOS v7.10 has a je here to handle this
   908                              <1> .loop:
   909 0000034E F6C30F              <1> 	test bl, 15		; valid HMCB ?
   910 00000351 7518                <1> 	jnz .none		; no -->
   911 00000353 813F4D53            <1> 	cmp word [bx + hmcbSignature], "MS"
   912 00000357 7512                <1> 	jne .none
   913 00000359 8B4706              <1> 	mov ax, word [bx + hmcbNext]
   914 0000035C 39F8                <1> 	cmp ax, di
   915 0000035E 743D                <1> 	je .found_below
   916 00000360 39D8                <1> 	cmp ax, bx		; next > current ?
   917 00000362 7607                <1> 	jbe .none		; no -->
   918 00000364 85C0                <1> 	test ax, ax
   919 00000366 93                  <1> 	xchg bx, ax		; bx -> next HMCB
   920 00000367 75E5                <1> 	jnz .loop
   921 00000369 EB2F                <1> 	jmp .done
   922                              <1> .none:
   923 0000036B 56                  <1> 	push si
   924 0000036C 50                  <1> 	push ax
   925 0000036D BE[0000]            <1> 	mov si, doscode_msg.error_common	; access with cs
   926 00000370 E8(0000)            <1> 	call doscode_disp_msg_cs
   927 00000373 BE[0000]            <1> 	mov si, doscode_msg.hmcb.5
   928 00000376 E8(0000)            <1> 	call doscode_disp_msg_cs
   929 00000379 89D8                <1> 	mov ax, bx
   930 0000037B E8C800              <1> 	call DumpHMCB
   931 0000037E BE[0000]            <1> 	mov si, doscode_msg.hmcb.7
   932 00000381 E8(0000)            <1> 	call doscode_disp_msg_cs
   933 00000384 58                  <1> 	pop ax
   934 00000385 5E                  <1> 	pop si
   935 00000386 5F                  <1> 	pop di
   936 00000387 56                  <1> 	 push si
   937 00000388 50                  <1> 	 push ax
   938 00000389 89F8                <1> 	mov ax, di
   939 0000038B E8B800              <1> 	call DumpHMCB
   940 0000038E BE[0000]            <1> 	mov si, doscode_msg.empty
   941                              <1>  extern flag_no_halt_hmcb_free
   942 00000391 B8[0000]            <1> 	mov ax, flag_no_halt_hmcb_free
   943 00000394 E8(0000)            <1> 	call doscode_halt_query
   944 00000397 58                  <1> 	pop ax
   945 00000398 5E                  <1> 	pop si
   946 00000399 A8                  <1> 	db __TEST_IMM8		; skip pop
   947                              <1> .done:
   948 0000039A 5F                  <1> 	pop di
   949 0000039B EB89                <1> 	jmp j_hma_access.access_return
   950                              <1> 
   951                              <1> .found_below:
   952 0000039D 83650200            <1> 	and word [di + hmcbOwner], 0
   953                              <1> 				; mark input HMCB as free
   954 000003A1 837F0200            <1> 	cmp word [bx + hmcbOwner], 0
   955                              <1> 				; is prior free ?
   956 000003A5 7502                <1> 	jne .merge_di_to_next	; no, merge di and subsequent -->
   957 000003A7 89DF                <1> 	mov di, bx		; yes, set di from bx and merge subsequent
   958                              <1> 				;  (the first iteration will merge input HMCB)
   959                              <1> .merge_di_to_next:
   960 000003A9 8B5D06              <1> 	mov bx, [di + hmcbNext]	; -> next
   961 000003AC 85DB                <1> 	test bx, bx		; any next ?
   962 000003AE 74EA                <1> 	jz .done		; no, all free ones merged -->
   963 000003B0 F6C30F              <1> 	test bl, 15		; validity
   964 000003B3 75B6                <1> 	jnz .none
   965 000003B5 39FB                <1> 	cmp bx, di		; validity
   966 000003B7 76B2                <1> 	jbe .none
   967 000003B9 813F4D53            <1> 	cmp word [bx + hmcbSignature], "MS"
   968                              <1> 				; validity
   969 000003BD 75AC                <1> 	jne .none
   970 000003BF 837F0200            <1> 	cmp word [bx + hmcbOwner], 0
   971                              <1> 				; is next also free ?
   972 000003C3 75D5                <1> 	jne .done		; no, all free ones merged -->
   973 000003C5 8B4704              <1> 	mov ax, [bx + hmcbSize]
   974 000003C8 83C010              <1> 	add ax, HMCB_size	; = size to add to prior HMCB
   975 000003CB 014504              <1> 	add word [di + hmcbSize], ax
   976                              <1> 				; add to first free HMCB in chain
   977 000003CE 014506              <1> 	add word [di + hmcbNext], ax
   978                              <1> 				; add, may carry
   979 000003D1 73D6                <1> 	jnc .merge_di_to_next	; valid next offset -->
   980 000003D3 74D4                <1> 	jz .merge_di_to_next	; valid end of chain indicator -->
   981 000003D5 EB94                <1> 	jmp .none		; error
   982                              <1> 
   983                              <1> 
   984                              <1> 		; OUT:	CY if not managing HMA,
   985                              <1> 		;	or <= 16 bytes free,
   986                              <1> 		;	or HMCB chain corrupted,
   987                              <1> 		;	 es:di = FFFFh:FFFFh
   988                              <1> 		;	 bx = 0
   989                              <1> 		;	NC if found >= 16 bytes free,
   990                              <1> 		;	 es:di -> largest free memory block
   991                              <1> 		;	 bx = size of block available
   992                              <1> 		; REM:	The size returned for MS-DOS v7 is the HMCB memory
   993                              <1> 		;	 block size minus 16 to allow an optimisation when
   994                              <1> 		;	 allocating, which is that a new HMCB is always
   995                              <1> 		;	 created. Unlike that, MS-DOS v5 returns a size
   996                              <1> 		;	 which spans the entire trailing space up to below
   997                              <1> 		;	 FFFFh:10000h. lDOS is now reverted to v5 style,
   998                              <1> 		;	 meaning the full HMCB block size is returned.
   999                              <1> 		;	Unlike v5, the free block may still occur in the
  1000                              <1> 		;	 middle of the HMA (not at the very tail) though.
  1001                              <1> 		; REM:	The returned memory block is the largest free block.
  1002                              <1> 		;	 If multiple free blocks are of the same size,
  1003                              <1> 		;	 the first one is returned.
  1004                              <1> 		; CHG:	-
  1005                              <1> find_largest_free_hmcb:
  1006 000003D7 50                  <1> 	push ax
  1007 000003D8 1E                  <1> 	push ds
  1008 000003D9 51                  <1> 	push cx
  1009 000003DA E8BF00              <1> 	call getfirsthmcb
  1010                              <1>  assume ds:nothing
  1011 000003DD 7231                <1> 	jc .error
  1012 000003DF 31C9                <1> 	xor cx, cx		; init for .error_dump
  1013                              <1> .loop:
  1014 000003E1 F7C70F00            <1> 	test di, 15		; valid HMCB ?
  1015 000003E5 7534                <1> 	jnz .error_dump		; no -->
  1016 000003E7 813D4D53            <1> 	cmp word [di + hmcbSignature], "MS"
  1017 000003EB 752E                <1> 	jne .error_dump		; no -->
  1018 000003ED 837D0200            <1> 	cmp word [di + hmcbOwner], 0
  1019 000003F1 750B                <1> 	jne .next
  1020 000003F3 395D04              <1> 	cmp word [di + hmcbSize], bx
  1021 000003F6 7606                <1> 	jbe .next
  1022 000003F8 8D4510              <1> 	lea ax, [di + HMCB_size]; -> memory block
  1023 000003FB 8B5D04              <1> 	mov bx, word [di + hmcbSize]
  1024                              <1> .next:
  1025 000003FE 8B4D06              <1> 	mov cx, word [di + hmcbNext]
  1026                              <1> 				; cx -> next
  1027 00000401 E308                <1> 	jcxz .end		; was last ? -->
  1028 00000403 39F9                <1> 	cmp cx, di		; valid next offset ?
  1029 00000405 7614                <1> 	jbe .error_dump		; not valid -->
  1030 00000407 87F9                <1> 	xchg di, cx		; di -> next, cx -> prior
  1031 00000409 EBD6                <1> 	jmp .loop		; go loop
  1032                              <1> .end:
  1033 0000040B 97                  <1> 	xchg di, ax		; di -> largest first free HMA memory block
  1034 0000040C 85DB                <1> 	test bx, bx		; (NC)
  1035 0000040E 7505                <1> 	jnz .done
  1036                              <1> .error:
  1037 00000410 31DB                <1> 	xor bx, bx		; bx = 0
  1038 00000412 8CDF                <1> 	mov di, ds		; es:di will be all-1s
  1039 00000414 F9                  <1> 	stc			; signal error
  1040                              <1> .done:
  1041 00000415 1E                  <1> 	 push ds
  1042 00000416 07                  <1> 	 pop es
  1043                              <1>  assume es:nothing
  1044 00000417 59                  <1> 	pop cx
  1045 00000418 1F                  <1> 	pop ds
  1046                              <1>  assume ds:nothing
  1047 00000419 58                  <1> 	pop ax
  1048 0000041A C3                  <1> 	retn
  1049                              <1> 
  1050                              <1> .error_dump:
  1051                              <1>  extern doscode_halt_query
  1052                              <1>  extern doscode_disp_msg_cs
  1053                              <1>  extern doscode_disp_al
  1054                              <1>  extern doscode_disp_al_hex
  1055                              <1>  extern doscode_disp_ax_hex
  1056                              <1>  extern doscode_disp_blank
  1057                              <1>  extern doscode_msg.hmcb.1
  1058                              <1>  extern doscode_msg.hmcb.3
  1059                              <1>  extern doscode_msg.hmcb.4
  1060                              <1>  extern doscode_msg.hmcb.5
  1061                              <1>  extern doscode_msg.hmcb.7
  1062                              <1>  extern doscode_msg.hmcb.first
  1063                              <1>  extern doscode_msg.empty
  1064                              <1>  extern doscode_msg.error_common
  1065                              <1>  extern doscode_msg.crlf
  1066                              <1> 
  1067 0000041B 56                  <1> 	push si
  1068 0000041C 50                  <1> 	push ax
  1069 0000041D BE[0000]            <1> 	mov si, doscode_msg.error_common	; access with cs
  1070 00000420 E8(0000)            <1> 	call doscode_disp_msg_cs
  1071 00000423 BE[0000]            <1> 	mov si, doscode_msg.hmcb.1
  1072 00000426 E8(0000)            <1> 	call doscode_disp_msg_cs
  1073 00000429 89C8                <1> 	mov ax, cx
  1074 0000042B E81800              <1> 	call DumpHMCB
  1075 0000042E BE[0000]            <1> 	mov si, doscode_msg.hmcb.3
  1076 00000431 E8(0000)            <1> 	call doscode_disp_msg_cs
  1077 00000434 89F8                <1> 	mov ax, di
  1078 00000436 E80D00              <1> 	call DumpHMCB
  1079 00000439 BE[0000]            <1> 	mov si, doscode_msg.empty
  1080                              <1>  extern flag_no_halt_hmcb
  1081 0000043C B8[0000]            <1> 	mov ax, flag_no_halt_hmcb
  1082 0000043F E8(0000)            <1> 	call doscode_halt_query
  1083 00000442 58                  <1> 	pop ax
  1084 00000443 5E                  <1> 	pop si
  1085 00000444 EBCA                <1> 	jmp .error
  1086                              <1> 
  1087                              <1> 
  1088                              <1> DumpHMCB:
  1089 00000446 51                  <1> 	push cx
  1090 00000447 E8(0000)            <1> 	call doscode_disp_ax_hex
  1091 0000044A BE[0000]            <1> 	mov si, doscode_msg.hmcb.first
  1092 0000044D 85C0                <1> 	test ax, ax
  1093 0000044F 7446                <1> 	jz .end
  1094 00000451 89C6                <1> 	mov si, ax
  1095 00000453 E8(0000)            <1> 	call doscode_disp_blank
  1096 00000456 AC                  <1> 	lodsb
  1097 00000457 86C4                <1> 	xchg al, ah
  1098 00000459 AC                  <1> 	lodsb
  1099 0000045A 86C4                <1> 	xchg al, ah		; sign
  1100 0000045C E8(0000)            <1> 	call doscode_disp_ax_hex
  1101 0000045F E8(0000)            <1> 	call doscode_disp_blank
  1102 00000462 E8(0000)            <1> 	call doscode_disp_blank
  1103 00000465 B90300              <1> 	mov cx, 3
  1104                              <1> @@:
  1105 00000468 AD                  <1> 	lodsw			; owner, size, next
  1106 00000469 E8(0000)            <1> 	call doscode_disp_ax_hex
  1107 0000046C E8(0000)            <1> 	call doscode_disp_blank
  1108 0000046F E2F7                <1> 	loop @B
  1109 00000471 E8(0000)            <1> 	call doscode_disp_blank
  1110 00000474 B108                <1> 	mov cl, 8
  1111                              <1> @@:
  1112 00000476 AC                  <1> 	lodsb			; name
  1113 00000477 E8(0000)            <1> 	call doscode_disp_al_hex
  1114 0000047A E8(0000)            <1> 	call doscode_disp_blank
  1115 0000047D E2F7                <1> 	loop @B
  1116                              <1> 
  1117 0000047F B108                <1> 	mov cl, 8
  1118 00000481 29CE                <1> 	sub si, cx
  1119 00000483 B022                <1> 	mov al, '"'
  1120 00000485 E8(0000)            <1> 	call doscode_disp_al
  1121                              <1> @@:
  1122 00000488 AC                  <1> 	lodsb			; name
  1123 00000489 40                  <1> 	inc ax			; 7Fh to 80h, 20h to 21h
  1124 0000048A 3C20                <1> 	cmp al, 32		; 80h..FFh..20h ?
  1125 0000048C 7E06                <1> 	jle @F			; yes, non-printable-ASCII, end -->
  1126 0000048E 48                  <1> 	dec ax			; restore
  1127 0000048F E8(0000)            <1> 	call doscode_disp_al
  1128 00000492 E2F4                <1> 	loop @B
  1129                              <1> @@:
  1130 00000494 BE[0000]            <1> 	mov si, doscode_msg.hmcb.4
  1131                              <1> .end:
  1132 00000497 E8(0000)            <1> 	call doscode_disp_msg_cs
  1133 0000049A 59                  <1> 	pop cx
  1134 0000049B C3                  <1> 	retn
  1135                              <1> 
  1136                              <1> 
  1137                              <1> 		; INP:	word [DOSDATA:first_hmcb] set
  1138                              <1> 		;	 and cs == DOSCODE_HMA_SEGMENT
  1139                              <1> 		;	 if DOS manages the HMA
  1140                              <1> 		; OUT:	ds = FFFFh
  1141                              <1> 		;	bx = 0
  1142                              <1> 		;	NC if DOS manages the HMA,
  1143                              <1> 		;	 ds:di -> first HMCB, allocated to DOS (owner = -2)
  1144                              <1> 		;	 A20 is assumed on because our cs is in the HMA
  1145                              <1> 		; CHG:	ds, di, bx, ax
  1146                              <1> getfirsthmcb:
  1147 0000049C E8(0000)            <1> 	call doscode_getdosdata
  1148 0000049F 8ED8                <1> 	mov ds, ax		; => DOSDATA
  1149                              <1>  assume ds:DOSGROUP
  1150 000004A1 8CCF                <1> 	mov di, cs		; => DOSCODE
  1151 000004A3 B8FEFF              <1> 	mov ax, DOSCODE_HMA_SEGMENT
  1152                              <1> 				; expected DOSCODE segment
  1153 000004A6 39C7                <1> 	cmp di, ax		; is it ?
  1154 000004A8 8B3E[0000]          <1> 	mov di, [first_hmcb]	; ds:di -> first HMCB, if any
  1155 000004AC BBFFFF              <1> 	mov bx, -1
  1156 000004AF 8EDB                <1> 	mov ds, bx		; => HMA
  1157                              <1>  assume ds:nothing
  1158 000004B1 43                  <1> 	inc bx			; = 0, preserve CF !
  1159 000004B2 7203                <1> 	jb @F			; if not managing HMA -->
  1160 000004B4 394502              <1> 	cmp word [di + hmcbOwner], ax
  1161                              <1> 				; NC (ae) if valid, CY (b) if invalid
  1162                              <1> @@:
  1163 000004B7 C3                  <1> 	retn			; CY if DOS is not in the HMA
  1164                              <1> %endif
  1165                              <1> 
  1166                              <1> 
  1167                              <1> entry	DosGetGroup
  1168                              <1>  assume ds:nothing
  1169 000004B8 50                  <1> 	push ax
  1170 000004B9 E8(0000)            <1> 	call doscode_getdosdata
  1171 000004BC 8ED8                <1> 	mov ds, ax
  1172                              <1>  assume ds:DOSGROUP
  1173 000004BE 58                  <1> 	pop ax
  1174 000004BF C3                  <1> 	return
  1175                              <1> 
  1176                              <1> 	entry	DOSInstall
  1177                              <1>  assume ds:nothing
  1178 000004C0 B0FF                <1> 	MOV	AL,0FFh
  1179 000004C2 C3                  <1> 	return
  1180                              <1> EndProc INT2F_etcetera
  1181                              <1> 
  1182                              <1> %ENDIF
  1183                              <1> ;Input: same as ABSDRD and ABSDWRT
  1184                              <1> ;	 ES:BP -> DPB
  1185                              <1> ;Functions: convert 32bit absolute RW input parms to 16bit input parms
  1186                              <1> ;Output: carry set when CX != -1 and drive is more than 32mb
  1187                              <1> ;	 carry clear, parms ok
  1188                              <1> ;
  1189                              <1> Procedure   RW32_CONVERT,NEAR
  1189          ******************  <1>  warning: proc RW32_CONVERT... [-w+user]
  1190                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:DOSGROUP
  1191 000004C3 83F9FF              <1> 	CMP	CX,-1			     ;>32mb  new format ?		;AN000;
  1192 000004C6 7423                <1> 	JZ	new32format		     ;>32mb  yes			;AN000;
  1193 000004C8 50                  <1> 	PUSH	AX			     ;>32mb  save ax			;AN000;
  1194 000004C9 52                  <1> 	PUSH	DX			     ;>32mb  save dx			;AN000;
  1195 000004CA 268B460D            <1> 	MOV	AX,[ES:BP + dpb_max_cluster]   ;>32mb  get max cluster #		;AN000;
  1196 000004CE 268A5604            <1> 	MOV	DL,[ES:BP + dpb_cluster_mask]  ;>32mb				;AN000;
  1197                              <1> 		; lDOS note: very suspicious, test intended ?
  1198 000004D2 80FAFE              <1> 	CMP	DL,0FEH 		     ;>32mb  removable ?		;AN000;
  1199 000004D5 7407                <1> 	JZ	letold			     ;>32mb  yes			;AN000;
  1200 000004D7 B600                <1> 	mov dh, 0
  1201 000004D9 42                  <1> 	inc dx				; sectors per cluster
  1202 000004DA F7E2                <1> 	MUL	DX			     ;>32mb  dx:ax= max sector #	;AN000;
  1203 000004DC 85D2                <1> 	test	DX,DX			     ;>32mb  > 32mb ?			;AN000;
  1204                              <1> letold:
  1205 000004DE 5A                  <1> 	POP	DX			     ;>32mb  retore dx			;AN000;
  1206 000004DF 58                  <1> 	POP	AX			     ;>32mb  restore ax 		;AN000;
  1207 000004E0 7419                <1> 	JZ	old_style		     ;>32mb  no 			;AN000;
  1208 000004E2 36C706[0000]0702    <1> 	MOV	word [ss:IFS_DRIVER_ERR],0207H	     ;>32mb  error			;AN000;
  1209 000004E9 F9                  <1> 	STC				     ;>32mb				;AN000;
  1210 000004EA C3                  <1> 	return				     ;>32mb				;AN000;
  1211                              <1> new32format:
  1212 000004EB 8B5702              <1> 	MOV	DX,WORD PTR [BX + SECTOR_RBA+2];>32mb				;AN000;
  1213 000004EE 368916[0000]        <1> 	MOV	[ss:HIGH_SECTOR],DX	     ;>32mb				;AN000;
  1214 000004F3 8B17                <1> 	MOV	DX,WORD PTR [BX + SECTOR_RBA]  ;>32mb				;AN000;
  1215 000004F5 8B4F04              <1> 	MOV	CX,[BX + ABS_RW_COUNT]	     ;>32mb				;AN000;
  1216 000004F8 C55F06              <1> 	LDS	BX,[BX + BUFFER_ADDR]	     ;>32mb				;AN000;
  1217                              <1> old_style:				     ;>32mb				;AN000;
  1218 000004FB F8                  <1> 	CLC				     ;>32mb				;AN000;
  1219 000004FC C3                  <1> 	return				     ;>32mb				;AN000;
  1220                              <1> EndProc RW32_CONVERT
  1221                              <1> 
  1222                              <1> 
  1223                              <1> ;Input: None
  1224                              <1> ;Functions: Purge Fastopen/seek Cache Buffers
  1225                              <1> ;Output: None
  1226                              <1> ;
  1227                              <1> ;
  1228                              <1> Procedure   Fastxxx_Purge,NEAR
  1228          ******************  <1>  warning: proc Fastxxx_Purge... [-w+user]
  1229                              <1>  ASSUME DS:NOTHING,ES:NOTHING,SS:DOSGROUP
  1230 000004FD 50                  <1> 	PUSH	AX			      ; save regs.			;AN000;
  1231 000004FE 56                  <1> 	PUSH	SI								;AN000;
  1232 000004FF 52                  <1> 	PUSH	DX								;AN000;
  1233                              <1> FastSeekflg equ FastSeekFlg	; NASM port label
  1234 00000500 36F606[0000]80      <1> 	TEST	byte [ss:FastSeekflg],Fast_yes	      ; fastseek installed ?		;AN000;
  1235 00000506 7404                <1> 	JZ	topen			      ; no				;AN000;
  1236 00000508 B402                <1> 	MOV	AH,FastSeek_ID		      ; set fastseek id 		;AN000;
  1237 0000050A EB0A                <1> 	JMP	SHORT dofast		      ; 				;AN000;
  1238                              <1> topen:
  1239                              <1> FastOpenflg equ FastOpenFlg	; NASM port label
  1240 0000050C 36F606[0000]80      <1> 	TEST	byte [ss:FastOpenflg],Fast_yes	      ; fastopen installed ?		;AN000;
  1241 00000512 740B                <1> 	JZ	nofast			      ; no				;AN000;
  1242 00000514 B401                <1> 	MOV	AH,FastOpen_ID		      ; set fastseek installed		;AN000;
  1243                              <1> dofast:
  1244 00000516 B005                <1> 	MOV	AL,FONC_purge		      ; purge				;AN000;
  1245 00000518 268A5600            <1> 	MOV	DL,[ES:BP + dpb_drive]	      ; set up drive number		;AN000;
  1246 0000051C E8(0000)            <1> 	invoke	Fast_Dispatch		      ; call fastopen/seek		;AN000;
  1247                              <1> nofast:
  1248 0000051F 5A                  <1> 	POP	DX								;AN000;
  1249 00000520 5E                  <1> 	POP	SI			      ; restore regs			;AN000;
  1250 00000521 58                  <1> 	POP	AX			      ; 				;AN000;
  1251                              <1> 
  1252 00000522 C3                  <1> 	return				      ; exit				;AN000;
  1253                              <1> EndProc Fastxxx_Purge
  1254                              <1> 
  1255                              <1> 
  1256                              <1>  extern amis_intlist, amis_sign
  1257                              <1> 		; INP:	ah = our multiplex number (others don't go here)
  1258                              <1> 		;	al = function number
  1259                              <1> 		;	ss:sp -> iret stack frame
  1260                              <1> relocated i2D, amis
  1261                              <1>  assume ds:nothing, es:nothing, ss:nothing
  1262 00000523 3C00                <1> 	cmp al, 0
  1263 00000525 7413                <1> 	je .installationcheck
  1264                              <1> 		; function 1: private entrypoint, not supported
  1265                              <1> 		; function 2: uninstall, not supported
  1266                              <1> 		; function 3: request pop-up, not supported
  1267 00000527 3C04                <1> 	cmp al, 4
  1268 00000529 741B                <1> 	je .determineinterrupts
  1269                              <1> 		; function 5: get hotkeys, not supported
  1270 0000052B 3C06                <1> 	cmp al, 6
  1271 0000052D 7422                <1> 	je .getdevice
  1272 0000052F 3C10                <1> 	cmp al, 10h
  1273 00000531 7418                <1> 	je .getver
  1274 00000533 3C11                <1> 	cmp al, 11h
  1275 00000535 7424                <1> 	je checkid
  1276 00000537 B000                <1> 	mov al, 0
  1277 00000539 CF                  <1> 	iret
  1278                              <1> 
  1279                              <1> .installationcheck:
  1280 0000053A B0FF                <1> 	mov al, 0FFh
  1281 0000053C B92605              <1> 	mov cx, 500h + 38		; version number
  1282 0000053F BF[A003]            <1> 	mov di, amis_sign + DOSENTRYADJUSTOFFSET
  1283                              <1> .iret_dx_seg:
  1284 00000542 BA[ssss]            <1> 	mov dx, DOSENTRY - DOSENTRYADJUSTSEGMENT
  1285 00000545 CF                  <1> 	iret
  1286                              <1> 
  1287                              <1> .determineinterrupts:
  1288 00000546 BB[A003]            <1> 	mov bx, amis_intlist + DOSENTRYADJUSTOFFSET
  1289 00000549 EBF7                <1> 	jmp .iret_dx_seg
  1290                              <1> 
  1291                              <1> .getver:
  1292 0000054B B0FF                <1> 	mov al, 0FFh
  1293 0000054D B91A05              <1> 	mov cx, 500h + 26
  1294 00000550 CF                  <1> 	iret
  1295                              <1> 
  1296                              <1>  extern CONHEADER
  1297                              <1> .getdevice:
  1298 00000551 B80C00              <1> 	mov ax, 12
  1299                              <1> 		; low byte is number of device headers.
  1300                              <1> 		; (5 * AUX, 4 * PRN, CON, CLOCK, block)
  1301                              <1> 		; ! hardcoded here
  1302                              <1> 		; flags in high byte:
  1303                              <1> 		; 100h = program loaded from config file
  1304                              <1> 		; 200h = device headers not linked to DOS device chain
  1305                              <1> 		; 400h = reentrant devices
  1306                              <1> 		; rest undefined
  1307 00000554 BA[ssss]            <1> 	mov dx, seg CONHEADER + DOSENTRYDEVICEBASE
  1308 00000557 BB[00FF]            <1> 	mov bx, CONHEADER - DOSENTRYDEVICEBASE * 16
  1309 0000055A CF                  <1> 	iret
  1310                              <1> 
  1311                              <1> 
  1312                              <1> 		; INP:	ah = multiplex number
  1313                              <1> 		;	al = 11h
  1314                              <1> 		;	dx:si -> AMIS id structure, consisting of:
  1315                              <1> 		;	 word	reserved, zero
  1316                              <1> 		;	 word	id sequential number
  1317                              <1> 		;	 byte	string length
  1318                              <1> 		;	 N byte	id string
  1319                              <1> 		; OUT:	al = 00h if function not supported
  1320                              <1> 		;	al >= 0F0h if id accepted,
  1321                              <1> 		;	 bx = cx = dx = reserved, 0 for now
  1322                              <1> 		;	else id rejected
  1323                              <1> 		;	 bx = cx = dx = reserved, 0 for now
  1324                              <1> 		;	ah = multiplex number
  1325                              <1> 		; CHG:	al, bx, cx, dx, si, di
  1326                              <1> 		;	preserves: ah, ds, es, bp
  1327                              <1> checkid:
  1328 0000055B 1E                  <1> 	push ds
  1329 0000055C 06                  <1> 	push es
  1330 0000055D 50                  <1> 	push ax			; ! ax must be last in the stack frame
  1331 0000055E 8EDA                <1> 	mov ds, dx
  1332                              <1>  assume ds:nothing
  1333 00000560 8B4402              <1> 	mov ax, [si + aidSequential]
  1334                              <1> 				; ax = sequential number
  1335 00000563 8D7404              <1> 	lea si, [si + aidString]
  1336                              <1> 				; ds:si -> requested AMIS id string
  1337 00000566 0E                  <1> 	 push cs
  1338 00000567 07                  <1> 	 pop es
  1339                              <1>  assume es:DOSCODEGROUP
  1340 00000568 BB[0C00]            <1> 	mov bx, idtable		; es:bx -> our table
  1341                              <1> .loop:
  1342 0000056B 268B3F              <1> 	mov di, [es:bx + idtString]
  1343                              <1> 				; es:di -> counted string
  1344 0000056E 31C9                <1> 	xor cx, cx
  1345 00000570 8A0C                <1> 	mov cl, byte [si]	; cx = length
  1346 00000572 41                  <1> 	inc cx			; = length including count byte
  1347 00000573 56                  <1> 	push si
  1348 00000574 F3A6                <1> 	repe cmpsb		; text match ?
  1349 00000576 5E                  <1> 	pop si			; restore -> id string
  1350 00000577 750E                <1> 	jne .next		; no -->
  1351 00000579 8D7F02              <1> 	lea di, [bx + idtMinimumSeq]
  1352 0000057C AF                  <1> 	scasw			; compare ax, idtMinimumSeq
  1353 0000057D 721D                <1> 	jb .below_pop
  1354 0000057F AF                  <1> 	scasw			; compare ax, idtMaximumSeq
  1355 00000580 58                  <1> 	pop ax
  1356 00000581 771E                <1> 	ja .above
  1357 00000583 B0F0                <1> 	mov al, 0F0h		; accepted
  1358 00000585 EB0C                <1> 	jmp .ret
  1359                              <1> 
  1360                              <1> .next:
  1361 00000587 83C306              <1> 	add bx, IDTABLE_size	; -> next table entry
  1362 0000058A 81FB[0801]          <1> 	cmp bx, idtable.end	; was last ?
  1363 0000058E 72DB                <1> 	jb .loop		; no, try next -->
  1364                              <1> .notfound:
  1365 00000590 58                  <1> 	pop ax
  1366 00000591 B0E0                <1> 	mov al, 0E0h		; id not found
  1367                              <1> .ret:
  1368 00000593 31DB                <1> 	xor bx, bx
  1369 00000595 31D2                <1> 	xor dx, dx
  1370 00000597 31C9                <1> 	xor cx, cx		; clear reserved registers
  1371 00000599 07                  <1> 	pop es
  1372 0000059A 1F                  <1> 	pop ds			; restore segregs from the stack frame
  1373                              <1>  assume ds:nothing, es:nothing
  1374 0000059B CF                  <1> 	iret			; bye
  1375                              <1> 
  1376                              <1> .below_pop:
  1377 0000059C 58                  <1> 	pop ax
  1378 0000059D B0E1                <1> 	mov al, 0E1h		; id is below accepted
  1379 0000059F EBF2                <1> 	jmp .ret
  1380                              <1> 
  1381                              <1> .above:
  1382                              <1> 		; no pop ax here
  1383 000005A1 B0E2                <1> 	mov al, 0E2h		; id is above accepted
  1384 000005A3 EBEE                <1> 	jmp .ret
  1385                              <1> 
  1386                              <1> section DOSCODETABLE
  1387                              <1> 
  1388                              <1> 	struc AMISID
  1389 00000000 ????                <1> aidReserved:	resw 1
  1390 00000002 ????                <1> aidSequential:	resw 1
  1391 00000004 ??                  <1> aidString:	resb 1
  1392                              <1> 	endstruc
  1393                              <1> 
  1394                              <1> %include "idtable.asm"
     1                              <2> 
     2                              <2> ; Public Domain
     3                              <2> 
     4                              <2> 
     5                              <2> 	struc IDTABLE
     6 00000000 ????                <2> idtString:	resw 1
     7 00000002 ????                <2> idtMinimumSeq:	resw 1
     8 00000004 ????                <2> idtMaximumSeq:	resw 1
     9                              <2> 	endstruc
    10                              <2> 
    11                              <2> %imacro idtableentry 1-*
    12                              <2>  %rep %0
    13                              <2> 	istruc IDTABLE
    14                              <2> at idtString,		dw %%message_%[NUMBER]
    15                              <2> at idtMinimumSeq,	dw MINIMUMSEQUENTIAL
    16                              <2> at idtMaximumSeq,	dw MAXIMUMSEQUENTIAL
    17                              <2>   %ifstr %1
    18                              <2>    %define %%string %1
    19                              <2>   %else
    20                              <2>    %defstr %%string %1
    21                              <2>   %endif
    22                              <2>   %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <2>   %assign NUMBER NUMBER + 1
    24                              <2>   %rotate 1
    25                              <2>  %endrep
    26                              <2> %endmacro
    27                              <2> 
    28                              <2> %assign NUMBER 0
    29                              <2> %define IDSTRINGS db ""
    30                              <2> %define MINIMUMSEQUENTIAL 0
    31                              <2> %define MAXIMUMSEQUENTIAL 00FFh
    32                              <2> 
    33                              <2> %imacro dumpidstrings 1-*.nolist
    34                              <2>  %rep %0
    35                              <2> 	%1
    36                              <2>   %rotate 1
    37                              <2>  %endrep
    38                              <2> %endmacro
    39                              <2> 
    40                              <2> 	even
    41                              <2> idtable:
    42                              <2> idtableentry sharer, command, format
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 0000000C [0801]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000000E 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000010 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000012 [0F01]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000014 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000016 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000018 [1701]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000001A 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000001C FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    43                              <2> idtableentry ansi, append, assign, attrib, backup, chkdsk, command, comp
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 0000001E [1E01]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000020 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000022 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000024 [2301]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000026 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000028 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000002A [2A01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000002C 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000002E FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000030 [3101]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000032 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000034 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000036 [3801]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000038 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000003A FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000003C [3F01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000003E 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000040 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000042 [4601]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000044 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000046 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000048 [4E01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000004A 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000004C FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    44                              <2> idtableentry "debug", diskcomp, diskcopy, display, driver.sys, edlin, exe2bin, fastopen
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 0000004E [5301]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000050 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000052 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000054 [5901]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000056 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000058 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000005A [6201]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000005C 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000005E FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000060 [6B01]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000062 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000064 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000066 [7301]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000068 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000006A FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000006C [7E01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000006E 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000070 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000072 [8401]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000074 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000076 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000078 [8C01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000007A 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000007C FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    45                              <2> idtableentry fdisk, filesys, find, graftabl, graphics, ifsfunc, join, keyb
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 0000007E [9501]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000080 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000082 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000084 [9B01]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000086 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000088 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000008A [A301]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000008C 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000008E FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000090 [A801]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000092 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000094 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000096 [B101]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000098 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 0000009A FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 0000009C [BA01]              <4> at idtString, dw %%message_%[NUMBER]
    15 0000009E 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000A0 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000A2 [C201]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000A4 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000A6 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000A8 [C701]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000AA 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000AC FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    46                              <2> idtableentry label, mem, mode, more, nlsfunc, print, printer, recover
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 000000AE [CC01]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000B0 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000B2 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000B4 [D201]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000B6 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000B8 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000BA [D601]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000BC 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000BE FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000C0 [DB01]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000C2 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000C4 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000C6 [E001]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000C8 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000CA FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000CC [E801]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000CE 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000D0 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000D2 [EE01]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000D4 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000D6 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000D8 [F601]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000DA 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000DC FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    47                              <2> idtableentry replace, restore, sort, subst, tree, vdisk, xcopy
    12                              <3>  %rep %0
    13                              <3>  istruc IDTABLE
    14                              <3> at idtString, dw %%message_%[NUMBER]
    15                              <3> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16                              <3> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <3>  %ifstr %1
    18                              <3>  %define %%string %1
    19                              <3>  %else
    20                              <3>  %defstr %%string %1
    21                              <3>  %endif
    22                              <3>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <3>  %assign NUMBER NUMBER + 1
    24                              <3>  %rotate 1
    25                              <3>  %endrep
    13                              <4>  istruc IDTABLE
    14 000000DE [FE01]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000E0 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000E2 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000E4 [0602]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000E6 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000E8 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000EA [0E02]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000EC 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000EE FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000F0 [1302]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000F2 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000F4 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000F6 [1902]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000F8 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 000000FA FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 000000FC [1E02]              <4> at idtString, dw %%message_%[NUMBER]
    15 000000FE 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000100 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    13                              <4>  istruc IDTABLE
    14 00000102 [2402]              <4> at idtString, dw %%message_%[NUMBER]
    15 00000104 0000                <4> at idtMinimumSeq, dw MINIMUMSEQUENTIAL
    16 00000106 FF00                <4> at idtMaximumSeq, dw MAXIMUMSEQUENTIAL
    17                              <4>  %ifstr %1
    18                              <4>  %define %%string %1
    19                              <4>  %else
    20                              <4>  %defstr %%string %1
    21                              <4>  %endif
    22                              <4>  %xdefine IDSTRINGS IDSTRINGS, %%message_%[NUMBER]:, {counted %%string}
    23                              <4>  %assign NUMBER NUMBER + 1
    24                              <4>  %rotate 1
    48                              <2> .end:
    49                              <2> 
    50                              <2> idtmsg:
    51 00000108 067368617265720763- <2> dumpidstrings IDSTRINGS
    51 00000111 6F6D6D616E6406666F- <2>
    51 0000011A 726D617404616E7369- <2>
    51 00000123 06617070656E640661- <2>
    51 0000012C 737369676E06617474- <2>
    51 00000135 726962066261636B75- <2>
    51 0000013E 700663686B64736B07- <2>
    51 00000147 636F6D6D616E640463- <2>
    51 00000150 6F6D70056465627567- <2>
    51 00000159 086469736B636F6D70- <2>
    51 00000162 086469736B636F7079- <2>
    51 0000016B 07646973706C61790A- <2>
    51 00000174 6472697665722E7379- <2>
    51 0000017D 730565646C696E0765- <2>
    51 00000186 78653262696E086661- <2>
    51 0000018F 73746F70656E056664- <2>
    51 00000198 69736B0766696C6573- <2>
    51 000001A1 79730466696E640867- <2>
    51 000001AA 7261667461626C0867- <2>
    51 000001B3 726170686963730769- <2>
    51 000001BC 667366756E63046A6F- <2>
    51 000001C5 696E046B657962056C- <2>
    51 000001CE 6162656C036D656D04- <2>
    51 000001D7 6D6F6465046D6F7265- <2>
    51 000001E0 076E6C7366756E6305- <2>
    51 000001E9 7072696E7407707269- <2>
    51 000001F2 6E746572077265636F- <2>
    51 000001FB 766572077265706C61- <2>
    51 00000204 636507726573746F72- <2>
    51 0000020D 6504736F7274057375- <2>
    51 00000216 627374047472656505- <2>
    51 0000021F 766469736B0578636F- <2>
    51 00000228 7079                <2>
    17                                  ;=== Pop trace listing source
    18                                  	END
