     1                                  %include "nobits.mac"
     1                              <1> %imacro stripparens 2.nolist
     2                              <1> %defstr %%param %2
     3                              <1> %rep 16
     4                              <1>  %substr %%opening %%param 1
     5                              <1>  %ifidn %%opening, '('
     6                              <1>   %substr %%param %%param 2,-1
     7                              <1>  %endif
     8                              <1> %endrep
     9                              <1> %rep 16
    10                              <1>  %strlen %%length %%param
    11                              <1>  %substr %%closing %%param %%length
    12                              <1>  %ifidn %%closing, ')'
    13                              <1>   %substr %%param %%param 1,-2
    14                              <1>  %endif
    15                              <1> %endrep
    16                              <1> %deftok %%token %%param
    17                              <1> %1 %%token
    18                              <1> %endmacro
    19                              <1> 
    20                              <1> %imacro db 1-*.nolist
    21                              <1>  %rep %0
    22                              <1>   %define %%param %1
    23                              <1>   %define %%multi
    24                              <1>   %defstr %%string %%param
    25                              <1>   %strlen %%stringlength %%string
    26                              <1>   %assign %%index 1
    27                              <1>   %rep %%stringlength
    28                              <1>    %substr %%checkblank %%string %%index
    29                              <1>    %ifidni %%checkblank, '"'
    30                              <1>    %elifidni %%checkblank, "'"
    31                              <1>    %else
    32                              <1>     %deftok %%checkblank %%checkblank
    33                              <1>     %ifempty %%checkblank
    34                              <1>      %substr %%dup %%string %%index + 1,4
    35                              <1>      %deftok %%dup %%dup
    36                              <1>      %assign %%isdup 0
    37                              <1>      %ifidni %%dup, dup
    38                              <1>       %assign %%isdup 1
    39                              <1>      %elifidni %%dup, dup(
    40                              <1>       %assign %%isdup 1
    41                              <1>      %endif
    42                              <1>      %if %%isdup
    43                              <1>       %substr %%multi %%string 1, %%index - 1
    44                              <1>       %deftok %%multi %%multi
    45                              <1>       %substr %%string %%string %%index + 5, -1
    46                              <1>       %deftok %%token %%string
    47                              <1>       %undef %%param
    48                              <1>       stripparens %define %%param, %%token
    49                              <1>       %assign %%length 1
    50                              <1>       %ifstr %%param
    51                              <1>        %strlen %%length %%param
    52                              <1>       %endif
    53                              <1>       %rep %%length * %%multi
    54                              <1> 	db ?
    55                              <1>       %endrep
    56                              <1>       %exitrep
    57                              <1>      %endif
    58                              <1>     %endif
    59                              <1>    %endif
    60                              <1>    %assign %%index %%index + 1
    61                              <1>   %endrep
    62                              <1>   %ifempty %%multi
    63                              <1>    %assign %%length 1
    64                              <1>    %ifstr %%param
    65                              <1>     %strlen %%length %%param
    66                              <1>    %endif
    67                              <1>    %rep %%length
    68                              <1> 	db ?
    69                              <1>    %endrep
    70                              <1>   %endif
    71                              <1>   %rotate 1
    72                              <1>  %endrep
    73                              <1> %endmacro
    74                              <1> 
    75                              <1> %imacro dw 1-*.nolist
    76                              <1>  %rep %0
    77                              <1>   %define %%param %1
    78                              <1>   %define %%multi
    79                              <1>   %defstr %%string %%param
    80                              <1>   %strlen %%stringlength %%string
    81                              <1>   %assign %%index 1
    82                              <1>   %rep %%stringlength
    83                              <1>    %substr %%checkblank %%string %%index
    84                              <1>    %ifidni %%checkblank, '"'
    85                              <1>    %elifidni %%checkblank, "'"
    86                              <1>    %else
    87                              <1>     %deftok %%checkblank %%checkblank
    88                              <1>     %ifempty %%checkblank
    89                              <1>      %substr %%dup %%string %%index + 1,4
    90                              <1>      %deftok %%dup %%dup
    91                              <1>      %assign %%isdup 0
    92                              <1>      %ifidni %%dup, dup
    93                              <1>       %assign %%isdup 1
    94                              <1>      %elifidni %%dup, dup(
    95                              <1>       %assign %%isdup 1
    96                              <1>      %endif
    97                              <1>      %if %%isdup
    98                              <1>       %substr %%multi %%string 1, %%index - 1
    99                              <1>       %deftok %%multi %%multi
   100                              <1>       %substr %%string %%string %%index + 5, -1
   101                              <1>       %deftok %%token %%string
   102                              <1>       %undef %%param
   103                              <1>       stripparens %define %%param, %%token
   104                              <1>       %assign %%length 1
   105                              <1>       %ifstr %%param
   106                              <1>        %strlen %%length %%param
   107                              <1>        %assign %%length (%%length + 1) / 2
   108                              <1>       %endif
   109                              <1>       %rep %%length * %%multi
   110                              <1> 	dw ?
   111                              <1>       %endrep
   112                              <1>       %exitrep
   113                              <1>      %endif
   114                              <1>     %endif
   115                              <1>    %endif
   116                              <1>    %assign %%index %%index + 1
   117                              <1>   %endrep
   118                              <1>   %ifempty %%multi
   119                              <1>    %assign %%length 1
   120                              <1>    %ifstr %%param
   121                              <1>     %strlen %%length %%param
   122                              <1>     %assign %%length (%%length + 1) / 2
   123                              <1>    %endif
   124                              <1>    %rep %%length
   125                              <1> 	dw ?
   126                              <1>    %endrep
   127                              <1>   %endif
   128                              <1>   %rotate 1
   129                              <1>  %endrep
   130                              <1> %endmacro
   131                              <1> 
   132                              <1> %imacro dd 1-*.nolist
   133                              <1>  %rep %0
   134                              <1>   %define %%param %1
   135                              <1>   %define %%multi
   136                              <1>   %defstr %%string %%param
   137                              <1>   %strlen %%stringlength %%string
   138                              <1>   %assign %%index 1
   139                              <1>   %rep %%stringlength
   140                              <1>    %substr %%checkblank %%string %%index
   141                              <1>    %ifidni %%checkblank, '"'
   142                              <1>    %elifidni %%checkblank, "'"
   143                              <1>    %else
   144                              <1>     %deftok %%checkblank %%checkblank
   145                              <1>     %ifempty %%checkblank
   146                              <1>      %substr %%dup %%string %%index + 1,4
   147                              <1>      %deftok %%dup %%dup
   148                              <1>      %assign %%isdup 0
   149                              <1>      %ifidni %%dup, dup
   150                              <1>       %assign %%isdup 1
   151                              <1>      %elifidni %%dup, dup(
   152                              <1>       %assign %%isdup 1
   153                              <1>      %endif
   154                              <1>      %if %%isdup
   155                              <1>       %substr %%multi %%string 1, %%index - 1
   156                              <1>       %deftok %%multi %%multi
   157                              <1>       %substr %%string %%string %%index + 5, -1
   158                              <1>       %deftok %%token %%string
   159                              <1>       %undef %%param
   160                              <1>       stripparens %define %%param, %%token
   161                              <1>       %assign %%length 1
   162                              <1>       %ifstr %%param
   163                              <1>        %strlen %%length %%param
   164                              <1>        %assign %%length (%%length + 3) / 4
   165                              <1>       %endif
   166                              <1>       %rep %%length * %%multi
   167                              <1> 	dd ?
   168                              <1>       %endrep
   169                              <1>       %exitrep
   170                              <1>      %endif
   171                              <1>     %endif
   172                              <1>    %endif
   173                              <1>    %assign %%index %%index + 1
   174                              <1>   %endrep
   175                              <1>   %ifempty %%multi
   176                              <1>    %assign %%length 1
   177                              <1>    %ifstr %%param
   178                              <1>     %strlen %%length %%param
   179                              <1>     %assign %%length (%%length + 3) / 4
   180                              <1>    %endif
   181                              <1>    %rep %%length
   182                              <1> 	dd ?
   183                              <1>    %endrep
   184                              <1>   %endif
   185                              <1>   %rotate 1
   186                              <1>  %endrep
   187                              <1> %endmacro
   188                              <1> 
   189                              <1> %unimacro align 1-2+.nolist nop
   190                              <1> %unimacro alignb 1-2+.nolist
   191                              <1> 
   192                              <1> %imacro align 1-2+.nolist
   193                              <1>         sectalign %1
   194                              <1>         resb (((%1) - (($-$$) % (%1))) % (%1))
   195                              <1> %endmacro
   196                              <1> 
   197                              <1> %imacro alignb 1-2+.nolist
   198                              <1>         sectalign %1
   199                              <1>         resb (((%1) - (($-$$) % (%1))) % (%1))
   200                              <1> %endmacro
   201                              <1> 
   202                              <1> %unimacro istruc 1.nolist
   203                              <1> %unimacro at 1-2+.nolist
   204                              <1> %unimacro iend 0.nolist
   205                              <1> 
   206                              <1> %imacro istruc 1.nolist
   207                              <1>     %push
   208                              <1>         %define %$strucname %1
   209                              <1>         %$strucstart:
   210                              <1> %endmacro
   211                              <1> 
   212                              <1> %imacro at 1-2+.nolist
   213                              <1>     %defstr %$member %1
   214                              <1>     %substr %$member1 %$member 1
   215                              <1>     %ifidn %$member1, '.'
   216                              <1>         resb (%$strucname%1-%$strucname)-($-%$strucstart)
   217                              <1>     %else
   218                              <1>         resb (%1-%$strucname)-($-%$strucstart)
   219                              <1>     %endif
   220                              <1>     %2
   221                              <1> %endmacro
   222                              <1> 
   223                              <1> %imacro iend 0.nolist
   224                              <1>         resb %{$strucname}_size-($-%$strucstart)
   225                              <1>     %pop
   226                              <1> %endmacro
     2                                  %define DONOBITS
     3                                  %include "msdata.nas"
     1                              <1> ;	SCCSID = @(#)ibmdata.asm	1.1 85/04/10
     2                              <1> ;
     3                              <1> ; DATA Segment for DOS.
     4                              <1> ;
     5                              <1> 
     6                              <1> ;page 255,132
     7                              <1> 
     8                              <1> [list -]
     8          ******************  <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
    11                              <1> ;=== Push trace listing source: mssw.nas
    12                              <1> %include "mssw.nas" ; NASM included file
     1                              <2> ;	SCCSID = @(#)ibmsw.asm	1.1 85/04/10
     2                              <2> 
     3                              <2> %include "version.mac"
     1                              <3> ; Some modules really want TRUE to be 0FFH.  Best to let them have their way.
     2                              <3> 	TRUE	   EQU	   0FFFFh
     3                              <3> 	TRUEBYTE   EQU     0FFh
     4                              <3> 	FALSE	   EQU	   0
     5                              <3> 
     6                              <3> ;
     7                              <3> ; Use the following switches to control cmacros.inc
     8                              <3> ;
     9                              <3> ?PLM       equ       0
    10                              <3> ?WIN       equ       0
    11                              <3> 
    12                              <3> memS       EQU     1			; Small model
    13                              <3> ;
    14                              <3> ; Use the switches below to produce the standard Microsoft version or the IBM
    15                              <3> ; version of the operating system
    16                              <3> ;
    17                              <3> ; The below chart will indicate how to set the switches to build the various
    18                              <3> ; versions
    19                              <3> ;
    20                              <3> ;                     IBMVER          IBMCOPYRIGHT
    21                              <3> ; --------------------------------------------------------
    22                              <3> ;  IBM Version   |     TRUE              TRUE
    23                              <3> ; --------------------------------------------------------
    24                              <3> ;  MS Version    |     FALSE             FALSE
    25                              <3> ; --------------------------------------------------------
    26                              <3> ;  Clone Version |     TRUE              FALSE
    27                              <3> ;
    28                              <3> IBMVER     EQU     TRUE
    29                              <3> IBMCOPYRIGHT EQU   FALSE
    30                              <3> 
    31                              <3> BUFFERFLAG	EQU	~ IBMCOPYRIGHT
    32                              <3> 
    33                              <3> %ifndef	MSVER	
    34                              <3> MSVER      EQU     ~ IBMVER
    35                              <3> %endif
    36                              <3> IBM	   EQU	   IBMVER
    37                              <3> ;
    38                              <3> ;
    39                              <3> 	%IF IBMVER
    40                              <3> 	    %IF IBMCOPYRIGHT
    41                              <3>               %warning out: ... IBM version build switch on ...
    42                              <3> 	    %ELSE
    43                              <3> 	      %warning out: ... CLONE version build switch on ...
    43          ******************  <3>  warning: out: ... CLONE version build switch on ... [-w+user]
    44                              <3> 	    %ENDIF
    45                              <3> 	%ELSE
    46                              <3> 	    %IFN IBMCOPYRIGHT
    47                              <3> 	      %warning out: ... MS version build switch on ...
    48                              <3> 	    %ELSE
    49                              <3> 	      %warning out: !!!!!!!!!  VERSION SWITCHES SET INCORECTLY  !!!!!!!!!
    50                              <3> 	      %warning out: !!!!!!!!! CHECK SETTINGS IN INC\VERSION.INC !!!!!!!!!
    51                              <3> 	    %ENDIF
    52                              <3> 	%ENDIF   
    53                              <3> ;
    54                              <3> ;
    55                              <3> ;***************************************************************************
    56                              <3> ;*          The following switches are for DBCS or SBCS support            *
    57                              <3> ;*                                                                         *
    58                              <3> ;*                     Set INTERNAT EQU TRUE FOR DBCS                      *
    59                              <3> ;*                     Set INTERNAT EQU FALSE FOR SBCS                     *
    60                              <3> ;*                                                                         *
    61                              <3> ;***************************************************************************
    62                              <3> ;
    63                              <3> IBMJAPVER  EQU	   FALSE		;If TRUE set KANJI true also
    64                              <3> 
    65                              <3> ;
    66                              <3> ; Switch INTERNAT for DBCS support
    67                              <3> ;
    68                              <3> INTERNAT   EQU	   FALSE
    69                              <3> ;
    70                              <3> 	%IF INTERNAT
    71                              <3> %ifndef KANJI
    72                              <3> KANJI	   EQU	   TRUE
    73                              <3> %endif
    74                              <3> IBMJAPAN   EQU	   TRUE
    75                              <3> 	%ELSE
    76                              <3> %ifndef KANJI
    77                              <3> KANJI	   EQU	   FALSE
    78                              <3> %endif
    79                              <3> IBMJAPAN   EQU	   FALSE
    80                              <3> 	%ENDIF
    81                              <3> 
    82                              <3> %ifndef altvect				; avoid jerking off vector.inc
    83                              <3> ALTVECT    EQU	   FALSE		;Switch to build ALTVECT version
    84                              <3> %endif
    85                              <3> 
    86                              <3> ;
    87                              <3> ; Country code switches
    88                              <3> ; The default contry code is assumed as USA.
    89                              <3> ;
    90                              <3> 	%IF INTERNAT
    91                              <3>  KOREA	   EQU	   TRUE
    92                              <3>  JAPAN	   EQU	   FALSE
    93                              <3> 	%ELSE
    94                              <3>  KOREA	   EQU	   FALSE
    95                              <3>  JAPAN	   EQU	   FALSE
    96                              <3> 	%ENDIF
    97                              <3> ;
    98                              <3> 		%IF INTERNAT
    99                              <3> %warning out: Internat(ECS) version build switch on
   100                              <3> 		%ENDIF
     4                              <2> 
     5                              <2> ibmver equ IBMVER	; NASM port equate
     6                              <2> IBM		EQU	ibmver
     7                              <2> WANG		EQU	FALSE
     8                              <2> 
     9                              <2> ; Set this switch to cause DOS to move itself to the end of memory
    10                              <2> HIGHMEM EQU	FALSE
    11                              <2> 
    12                              <2> ; Turn on switch below to allow testing disk code with DEBUG. It sets
    13                              <2> ; up a different stack for disk I/O (functions > 11) than that used for
    14                              <2> ; character I/O which effectively makes the DOS re-entrant.
    15                              <2> 
    16                              <2> 	%IF	IBM
    17                              <2> ESCCH	EQU	0			; character to begin escape seq.
    18                              <2> CANCEL	EQU	27			;Cancel with escape
    19                              <2> TOGLPRN EQU	TRUE			;One key toggles printer echo
    20                              <2> ZEROEXT EQU	TRUE
    21                              <2> 	%ELSE
    22                              <2> ESCCH	EQU	1BH
    23                              <2> CANCEL	EQU	"X"-"@" 		;Cancel with Ctrl-X
    24                              <2> TOGLPRN EQU	FALSE			;Separate keys for printer echo on
    25                              <2> 					;and off
    26                              <2> ZEROEXT EQU	TRUE
    27                              <2> 	%ENDIF
    28                              <2> 
    13                              <1> ;=== Pop trace listing source
    14                              <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
    15                              <1> debug equ FALSE                           ; No dossym (too big)
    16                              <1> %include "dosmac.mac"
     1                              <2> ;	SCCSID = @(#)dosmac.asm	1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)dosmac.asm	1.1 85/04/10
     3                              <2> ;
     4                              <2> ; Macro file for MSDOS.
     5                              <2> ;
     6                              <2> 
     7                              <2> %ifndef __DOSMAC_MAC__
     8                              <2>  %assign __DOSMAC_MAC__ 1
     9                              <2> 
    10                              <2> TRUE    EQU 0FFFFh
    11                              <2> FALSE   EQU 0
    12                              <2> 
    13                              <2> 
    14                              <2> ; NASM original macros (comment for fixmem.pl)
    15                              <2> 
    16                              <2> ;SUBTTL BREAK a listing into pages and give new subtitles
    17                              <2> ;PAGE
    18                              <2> %imacro BREAK 0-1+.nolist
    19                              <2> 	;SUBTTL  subtitle
    20                              <2> 	;PAGE
    21                              <2> %endmacro
    22                              <2> ;.xcref  break
    23                              <2> 
    24                              <2> BREAK   <ASMVAR - handle assembly variables once and for all>
    25                              <2> 
    26                              <2> %if 0
    27                              <2> AsmVars Macro   varlist
    28                              <2> IRP     var,<varlist>
    29                              <2> AsmVar  var
    30                              <2> ENDM
    31                              <2> ENDM
    32                              <2> 
    33                              <2> AsmVar  Macro   var
    34                              <2> IFNDEF  var
    35                              <2> var = FALSE
    36                              <2> ENDIF
    37                              <2> ENDM
    38                              <2> %endif
    39                              <2> 
    40                              <2> BREAK <I_NEED: declare a variable external, if necessary, and allocate a size>
    41                              <2> 
    42                              <2> ;
    43                              <2> ; declare a variable external and allocate a size
    44                              <2> ;
    45                              <2> ;AsmVar  InstalledData
    46                              <2> %ifndef InstalledData
    47                              <2>  %define InstalledData 0
    48                              <2> %endif
    49                              <2> 
    50                              <2> %imacro I_NEED 1-2.nolist
    51                              <2> %ifn InstalledData
    52                              <2> 	[section DATA]
    53                              <2>     %IFIDNi   %2, WORD
    54                              <2> 	EXTRN   %1:WORD
    55                              <2>     %ELSE
    56                              <2> 	%IFIDNi   %2, DWORD
    57                              <2> 	EXTRN   %1:DWORD
    58                              <2> 	%ELSE
    59                              <2> 	EXTRN   %1:BYTE
    60                              <2> 	%ENDIF
    61                              <2>     %ENDIF
    62                              <2> 	__SECT__
    63                              <2> %ENDIF
    64                              <2> %endmacro
    65                              <2> 	;.xcref I_need
    66                              <2> 
    67                              <2> ;
    68                              <2> ; call a procedure that may be external.  The call will be short.
    69                              <2> ;
    70                              <2> %imacro invoke 1.nolist
    71                              <2> ;.xcref
    72                              <2> 	EXTRN   %1:NEAR
    73                              <2> ;.cref
    74                              <2> 	CALL    %1
    75                              <2> %endmacro
    76                              <2> ;.xcref  invoke
    77                              <2> 
    78                              <2> ;PAGE
    79                              <2> ;
    80                              <2> ; jump to a label that may be external.  The jump will be near.
    81                              <2> ;
    82                              <2> %imacro transfer 1.nolist
    83                              <2> ;.xcref
    84                              <2> 	EXTRN   %1:NEAR
    85                              <2> ;.cref
    86                              <2> 	JUMP    %1
    87                              <2> %endmacro
    88                              <2> ;.xcref  transfer
    89                              <2> 
    90                              <2> ;
    91                              <2> ; get a short address in a word
    92                              <2> ;
    93                              <2> %imacro short_addr 1.nolist
    94                              <2>     %ifnidn %1, ?
    95                              <2> 	EXTRN   %1:NEAR
    96                              <2> 	DW  OFFSET %1
    97                              <2>     %ELSE
    98                              <2> 	DW  ?
    99                              <2>     %ENDIF
   100                              <2> %endmacro
   101                              <2> ;.xcref  short_addr
   102                              <2> 
   103                              <2> ;
   104                              <2> ; get a long address in a dword
   105                              <2> ;
   106                              <2> %imacro long_addr 1.nolist
   107                              <2> 	EXTRN   %1:NEAR
   108                              <2> 	DD  %1
   109                              <2> %endmacro
   110                              <2> ;.xcref  long_addr
   111                              <2> 
   112                              <2> ;
   113                              <2> ; declare a PROC near or far but PUBLIC nonetheless
   114                              <2> ;
   115                              <2> ;.xcref ?frame
   116                              <2> ;.xcref ?aframe
   117                              <2> ;.xcref ?stackdepth
   118                              <2> ;.xcref ?initstack
   119                              <2> %assign ?frame           0                     ; initial
   120                              <2> %assign ?aframe          0                     ; initial
   121                              <2> %assign ?stackdepth      0                     ; initial stack size
   122                              <2> %assign ?initstack       0                     ; initial stack size
   123                              <2> 
   124                              <2> %imacro procedure 1-2.nolist
   125                              <2> 	%assign ?frame     0
   126                              <2> 	%assign ?aframe    2                   ;; remember the pushed BP
   127                              <2> 	%warning proc %1...
   128                              <2> %1    PROC    %2
   129                              <2> 	PUBLIC  %1
   130                              <2> 	%assign ?initstack     ?stackdepth     ;; beginning of procedure
   131                              <2> %endmacro
   132                              <2> ;.xcref  procedure
   133                              <2> 
   134                              <2> ;
   135                              <2> ; end a procedure and check that stack depth is preserved
   136                              <2> ;
   137                              <2> %imacro EndProc 1-2.nolist
   138                              <2> 	%ifnidni   %2, NoCheck        ;; check the stack size
   139                              <2> 	%if ?initstack != ?stackdepth    ;; is it different?
   140                              <2> 	%warning    ***** Possible stack size error in %1 *****
   141                              <2> 	%endif
   142                              <2> 	%endif
   143                              <2> %1    ENDP
   144                              <2> %endmacro
   145                              <2> ;.xcref  endproc
   146                              <2> ;PAGE
   147                              <2> ;
   148                              <2> ; define a data item to be public and of an appropriate size/type
   149                              <2> ;
   150                              <2> 
   151                              <2> %imacro stripangles 2.nolist
   152                              <2> %defstr %%param %2
   153                              <2> %rep 16
   154                              <2>  %substr %%opening %%param 1
   155                              <2>  %ifidn %%opening, '<'
   156                              <2>   %substr %%param %%param 2,-1
   157                              <2>  %endif
   158                              <2> %endrep
   159                              <2> %rep 16
   160                              <2>  %strlen %%length %%param
   161                              <2>  %substr %%closing %%param %%length
   162                              <2>  %ifidn %%closing, '>'
   163                              <2>   %substr %%param %%param 1,-2
   164                              <2>  %endif
   165                              <2> %endrep
   166                              <2> %deftok %%token %%param
   167                              <2> %1 %%token
   168                              <2> %endmacro
   169                              <2> 
   170                              <2> %imacro I_AM 2-*.nolist
   171                              <2> ;I_AM    MACRO   name,size,init
   172                              <2> %xdefine %%name %1
   173                              <2> ;; declare the type of the object
   174                              <2>     %IFIDNi %2, WORD
   175                              <2> %1    LABEL WORD
   176                              <2> 	%assign I_AM_SIZE      1
   177                              <2> 	%assign I_AM_LEN       2
   178                              <2>     %ELSE
   179                              <2> 	%IFIDNi %2, DWORD
   180                              <2> %1    LABEL DWORD
   181                              <2> 	%assign I_AM_SIZE      2
   182                              <2> 	%assign I_AM_LEN       2
   183                              <2> 	%ELSE
   184                              <2> 	    %IFIDNi %2, BYTE
   185                              <2> %1    LABEL BYTE
   186                              <2> 	%assign I_AM_SIZE      1
   187                              <2> 	%assign I_AM_LEN       1
   188                              <2> 	    %ELSE
   189                              <2> %1    LABEL BYTE
   190                              <2> %undef I_AM_SIZE
   191                              <2> 	stripangles %assign I_AM_SIZE, %2
   192                              <2> 	%assign I_AM_LEN       1
   193                              <2> 	    %ENDIF
   194                              <2> 	%ENDIF
   195                              <2>     %ENDIF
   196                              <2> ;; declare the object public
   197                              <2> 	PUBLIC  %%name
   198                              <2> ;; if no initialize then allocate blank storage
   199                              <2>     %IF %0 == 2
   200                              <2> 	DB  I_AM_SIZE*I_AM_LEN DUP (?)
   201                              <2>     %ELSE
   202                              <2> %ifn InstalledData
   203                              <2>  %rotate 2
   204                              <2>  %rep %0 - 2
   205                              <2> 	    %IF I_AM_LEN == 1
   206                              <2> 		stripangles db, %1
   207                              <2> 	    %ELSE
   208                              <2> 		stripangles dw, %1
   209                              <2> 	    %ENDIF
   210                              <2> 	    %assign I_AM_SIZE I_AM_SIZE - 1
   211                              <2> 	    %rotate 1
   212                              <2>  %endrep
   213                              <2> 	%IF I_AM_SIZE != 0
   214                              <2> 	    %error    ***** initialization of %%name not complete *****
   215                              <2> 	%ENDIF
   216                              <2> %ELSE
   217                              <2> 	DB  I_AM_SIZE*I_AM_LEN DUP (?)
   218                              <2> %ENDIF
   219                              <2>     %ENDIF
   220                              <2> %endmacro
   221                              <2> 
   222                              <2> %imacro I_AM_NOBITS 2-*.nolist
   223                              <2> ;I_AM    MACRO   name,size,init
   224                              <2> %xdefine %%name %1
   225                              <2> ;; declare the type of the object
   226                              <2>     %IFIDNi %2, WORD
   227                              <2> %1    LABEL WORD
   228                              <2> 	%assign I_AM_SIZE      1
   229                              <2> 	%assign I_AM_LEN       2
   230                              <2>     %ELSE
   231                              <2> 	%IFIDNi %2, DWORD
   232                              <2> %1    LABEL DWORD
   233                              <2> 	%assign I_AM_SIZE      2
   234                              <2> 	%assign I_AM_LEN       2
   235                              <2> 	%ELSE
   236                              <2> 	    %IFIDNi %2, BYTE
   237                              <2> %1    LABEL BYTE
   238                              <2> 	%assign I_AM_SIZE      1
   239                              <2> 	%assign I_AM_LEN       1
   240                              <2> 	    %ELSE
   241                              <2> %1    LABEL BYTE
   242                              <2> %undef I_AM_SIZE
   243                              <2> 	stripangles %assign I_AM_SIZE, %2
   244                              <2> 	%assign I_AM_LEN       1
   245                              <2> 	    %ENDIF
   246                              <2> 	%ENDIF
   247                              <2>     %ENDIF
   248                              <2> ;; declare the object public
   249                              <2> 	PUBLIC  %%name
   250                              <2> ;; if no initialize then allocate blank storage
   251                              <2>     %IF %0 == 2
   252                              <2> 	resb  I_AM_SIZE*I_AM_LEN
   253                              <2>     %ELSE
   254                              <2> %ifn InstalledData
   255                              <2>  %rotate 2
   256                              <2>  %rep %0 - 2
   257                              <2> 	    %IF I_AM_LEN == 1
   258                              <2> 		resb 1
   259                              <2> 	    %ELSE
   260                              <2> 		resw 1
   261                              <2> 	    %ENDIF
   262                              <2> 	    %assign I_AM_SIZE I_AM_SIZE - 1
   263                              <2> 	    %rotate 1
   264                              <2>  %endrep
   265                              <2> 	%IF I_AM_SIZE != 0
   266                              <2> 	    %error    ***** initialization of %%name not complete *****
   267                              <2> 	%ENDIF
   268                              <2> %ELSE
   269                              <2> 	resb  I_AM_SIZE*I_AM_LEN
   270                              <2> %ENDIF
   271                              <2>     %ENDIF
   272                              <2> %endmacro
   273                              <2> 
   274                              <2> ;.xcref  I_AM
   275                              <2> ;.xcref  I_AM_SIZE
   276                              <2> ;.xcref  I_AM_LEN
   277                              <2> %assign I_AM_SIZE 0
   278                              <2> %assign I_AM_LEN  0
   279                              <2> 
   280                              <2> ;PAGE
   281                              <2> 
   282                              <2> ;
   283                              <2> ; define an entry in a procedure
   284                              <2> ;
   285                              <2> %imacro entry 1-2.nolist
   286                              <2> %1:
   287                              <2> 	PUBLIC  %1
   288                              <2> %endmacro
   289                              <2> ;.xcref  entry
   290                              <2> 
   291                              <2> BREAK <ERROR - store an error code then jump to a label>
   292                              <2> 
   293                              <2> %imacro error 1.nolist
   294                              <2> ;.xcref
   295                              <2> 	MOV AL, %1
   296                              <2> 	transfer    SYS_RET_ERR
   297                              <2> ;.cref
   298                              <2> %endmacro
   299                              <2> ;.xcref  error
   300                              <2> 
   301                              <2> BREAK <JUMP - real jump that links up shortwise>
   302                              <2> ;
   303                              <2> ; given a label <lbl> either 2 byte jump to another label <lbl>_J
   304                              <2> ; if it is near enough or 3 byte jump to <lbl>
   305                              <2> ;
   306                              <2> 
   307                              <2> %imacro jump 1.nolist
   308                              <2> ;.xcref
   309                              <2> 
   310                              <2>     %ifndef %1_J                       ;; is this the first invocation
   311                              <2> %%a:      JMP %1
   312                              <2>     %ELSE
   313                              <2> 	%IF (%1_J >= $) || ($-%1_J > 126)
   314                              <2> %%a:      JMP %1                         ;; is the jump too far away?
   315                              <2> 	%ELSE
   316                              <2> %%a:      JMP %1_J                      ;; do the short one...
   317                              <2> 	%ENDIF
   318                              <2>     %ENDIF
   319                              <2>     %ixdefine %1_j %%a
   320                              <2> ;.cref
   321                              <2> %endmacro
   322                              <2> ;.xcref  jump
   323                              <2> 
   324                              <2> BREAK <RETURN - return from a function>
   325                              <2> 
   326                              <2> %imacro return 0.nolist
   327                              <2> %%a:
   328                              <2> 	RET
   329                              <2> %xdefine ret_l %%a
   330                              <2> %endmacro
   331                              <2> ;.xcref  return
   332                              <2> 
   333                              <2> BREAK <CONDRET - conditional return>
   334                              <2> 
   335                              <2> %imacro condret 2.nolist
   336                              <2> %assign %%exit 0
   337                              <2>     %ifdef   ret_l                       ;; if ret_l is defined
   338                              <2> 	%if (($ - ret_l) <= 126) && ($ > ret_l)
   339                              <2> 					;;     if ret_l is near enough then
   340                              <2> 	    %%a:  j%1    ret_l           ;;         a: j<CC> to ret_l
   341                              <2> 	    %xdefine ret_%1 %%a                 ;;         define ret_<CC> to be a:
   342                              <2> 	    %assign %%exit 1
   343                              <2> 	%endif
   344                              <2>     %endif
   345                              <2>     %ifn %%exit
   346                              <2>     %ifdef   ret_%1                     ;; if ret_<CC> defined
   347                              <2> 	%if (($ - ret_%1) <= 126) && ($ > ret_%1)
   348                              <2> 					;;     if ret_<CC> is near enough
   349                              <2> 	    %%a:  j%1    ret_%1         ;;         a: j<CC> to ret_<CC>
   350                              <2> 	    %xdefine ret_%1 %%a                 ;;         define ret_<CC> to be a:
   351                              <2> 	    %assign %%exit 1
   352                              <2> 	%endif
   353                              <2>     %endif
   354                              <2>     %endif
   355                              <2>     %ifn %%exit
   356                              <2>     j%2   %%a                           ;; j<NCC> a:
   357                              <2>     return                              ;; return
   358                              <2>     %%a:                                  ;; a:
   359                              <2>     %xdefine ret_%1 ret_l                     ;; define ret_<CC> to be ret_l
   360                              <2>     %endif
   361                              <2> %endmacro
   362                              <2> ;.xcref  condret
   363                              <2> 
   364                              <2> BREAK <RETZ - return if zero, links up shortwise if necessary>
   365                              <2> 
   366                              <2> %imacro retz 0.nolist
   367                              <2>     condret z,nz
   368                              <2> %endmacro
   369                              <2> ;.xcref  retz
   370                              <2> 
   371                              <2> BREAK <RETNZ - return if not zero, links up shortwise if necessary>
   372                              <2> 
   373                              <2> %imacro retnz 0.nolist
   374                              <2>     condret nz,z
   375                              <2> %endmacro
   376                              <2> ;.xcref  retnz
   377                              <2> 
   378                              <2> BREAK <RETC - return if carry set, links up shortwise if necessary>
   379                              <2> 
   380                              <2> %imacro retc 0.nolist
   381                              <2>     condret c,nc
   382                              <2> %endmacro
   383                              <2> ;.xcref  retc
   384                              <2> 
   385                              <2> BREAK <RETNC - return if not carry, links up shortwise if necessary>
   386                              <2> 
   387                              <2> %imacro retnc 0.nolist
   388                              <2>     condret nc,c
   389                              <2> %endmacro
   390                              <2> ;.xcref  retnc
   391                              <2> 
   392                              <2> BREAK <CONTEXT - set the DOS context to a particular register>
   393                              <2> 
   394                              <2> %imacro context 1.nolist
   395                              <2> 	PUSH    SS
   396                              <2> 	stripangles POP, %1
   397                              <2> 	; ASSUME  %1:DOSGROUP
   398                              <2> %endmacro
   399                              <2> ;.xcref  context
   400                              <2> 
   401                              <2> BREAK <SaveReg - save a set of registers>
   402                              <2> 
   403                              <2> %imacro SaveReg 0-*.nolist                 ;; push those registers
   404                              <2>  %rep %0
   405                              <2> 	%assign ?stackdepth ?stackdepth + 1
   406                              <2> 	stripangles push, %1
   407                              <2> 	%rotate 1
   408                              <2>  %endrep
   409                              <2> %endmacro
   410                              <2> ;.xcref  SaveReg
   411                              <2> 
   412                              <2> BREAK <RestoreReg - unsave some registers>
   413                              <2> 
   414                              <2> %imacro RestoreReg 0-*.nolist             ;; pop those registers
   415                              <2>  %rep %0
   416                              <2> 	%assign ?stackdepth ?stackdepth - 1
   417                              <2> 	stripangles pop, %1
   418                              <2> 	%rotate 1
   419                              <2>  %endrep
   420                              <2> %endmacro
   421                              <2> ;.xcref  RestoreReg
   422                              <2> 
   423                              <2> BREAK <Critical section macros>
   424                              <2> 
   425                              <2> %imacro EnterCrit 1.nolist
   426                              <2> 	Invoke  E%1
   427                              <2> %endmacro
   428                              <2> 
   429                              <2> %imacro LeaveCrit 1.nolist
   430                              <2> 	Invoke  L%1
   431                              <2> %endmacro
   432                              <2> 
   433                              <2> Break   <message - display a message>
   434                              <2> 
   435                              <2> ;AsmVars <ShareF,Cargs,Redirector>
   436                              <2> %ifndef ShareF
   437                              <2>  %idefine ShareF 0
   438                              <2> %endif
   439                              <2> %ifndef Cargs
   440                              <2>  %idefine Cargs 0
   441                              <2> %endif
   442                              <2> %ifndef Redirector
   443                              <2>  %idefine Redirector 0
   444                              <2> %endif
   445                              <2> %ifndef debug
   446                              <2>  %idefine debug 0
   447                              <2> %endif
   448                              <2> 
   449                              <2> %if debug
   450                              <2> %imacro fmt 3-*.nolist
   451                              <2> ;fmt     MACRO   typ,lev,fmts,args
   452                              <2> ;local   a,b,c
   453                              <2> 	PUSHF
   454                              <2> %IFNempty %1
   455                              <2> 	TEST    word [BugTyp],%1
   456                              <2> 	JZ      %%c
   457                              <2> 	CMP     word [BugLev],%2
   458                              <2> 	JB      %%c
   459                              <2> %ENDIF
   460                              <2> 	PUSH    AX
   461                              <2> 	PUSH    BP
   462                              <2> 	MOV     BP,SP
   463                              <2> %If (! sharef) && (! redirector)
   464                              <2> 	[section Table]
   465                              <2> %%a:       db      %3,0
   466                              <2> 	__SECT__
   467                              <2> 	MOV     AX,OFFSET %%a wrt DOSGROUP
   468                              <2> %else
   469                              <2> 	jmp     short %%b
   470                              <2> %%a:       db      %3,0
   471                              <2> %if sharef
   472                              <2> %%b:      mov     ax,offset %%a wrt share
   473                              <2> %else
   474                              <2> %%b:      mov     ax,offset %%a wrt netwrk
   475                              <2> %endif
   476                              <2> %endif
   477                              <2> 	PUSH    AX
   478                              <2> %iassign cargs 2
   479                              <2> %rotate 3
   480                              <2> %rep %0 - 3
   481                              <2>  %ifidni ax, %1
   482                              <2> 	MOV     AX,[BP+2]
   483                              <2>  %ELSE
   484                              <2> 	MOV     AX, %1
   485                              <2>  %ENDIF
   486                              <2> 	PUSH    AX
   487                              <2>  %iassign cargs cargs + 2
   488                              <2>  %rotate 1
   489                              <2> %endrep
   490                              <2> 	invoke  PFMT
   491                              <2> 	ADD     SP, Cargs
   492                              <2> 	POP     BP
   493                              <2> 	POP     AX
   494                              <2> %%c:
   495                              <2> 	POPF
   496                              <2> %endmacro
   497                              <2> %else
   498                              <2> %imacro fmt 3-*.nolist
   499                              <2> %endmacro
   500                              <2> %endif
   501                              <2> 
   502                              <2> Break   <DOSAssume - validate assumes>
   503                              <2> 
   504                              <2> ;AsmVar  Debug,$temp
   505                              <2> 
   506                              <2> %imacro detectstripangles 4.nolist
   507                              <2> %defstr %%param %4
   508                              <2> %assign ?%2 0
   509                              <2> %assign ?%3 0
   510                              <2> %rep 16
   511                              <2>  %substr %%opening %%param 1
   512                              <2>  %ifidn %%opening, '<'
   513                              <2>   %substr %%param %%param 2,-1
   514                              <2>   %assign ?%2 ?%2 + 1
   515                              <2>  %endif
   516                              <2> %endrep
   517                              <2> %rep 16
   518                              <2>  %strlen %%length %%param
   519                              <2>  %substr %%closing %%param %%length
   520                              <2>  %ifidn %%closing, '>'
   521                              <2>   %substr %%param %%param 1,-2
   522                              <2>   %assign ?%3 ?%3 + 1
   523                              <2>  %endif
   524                              <2> %endrep
   525                              <2> %deftok %%token %%param
   526                              <2> %define ?%1 %%token
   527                              <2> %endmacro
   528                              <2> 
   529                              <2> 
   530                              <2> %IF debug
   531                              <2> %imacro DOSAssume 3-*.nolist
   532                              <2> ;DOSAssume   Macro   reg,reglist,message
   533                              <2>  %ifidni %1, CS
   534                              <2>   %assign %%temp 1
   535                              <2>  %else
   536                              <2>   %ifidni %1, SS
   537                              <2>    %assign %%temp 0
   538                              <2>   %else
   539                              <2>    %error ***** Invalid DOS register %1 in DOSAssume *****
   540                              <2>   %endif
   541                              <2>  %endif
   542                              <2>  %rotate 1
   543                              <2>  %assign %%level 0
   544                              <2>  %assign %%amount %0 - 1
   545                              <2>  %rep 16
   546                              <2>   detectstripangles %%token, %%opening, %%closing, %1
   547                              <2>   %assign %%level %%level + ? %+ %%opening
   548                              <2>   %assign %%level %%level - ? %+ %%closing
   549                              <2>   %ifidni ? %+ %%token, DS
   550                              <2>    %assign %%temp %%temp | 2
   551                              <2>   %else
   552                              <2>    %ifidni ? %+ %%token, ES
   553                              <2>     %assign %%temp %%temp | 4
   554                              <2>    %else
   555                              <2>     %error ***** Invalid register reg in DOSAssume *****
   556                              <2>    %endif
   557                              <2>   %endif
   558                              <2>   %assign %%amount %%amount - 1
   559                              <2>   %rotate 1
   560                              <2>   %if %%level <= 0
   561                              <2>    %exitrep
   562                              <2>   %endif
   563                              <2>  %endrep
   564                              <2> 
   565                              <2> 	PUSH    AX
   566                              <2> 	MOV     AX, %%temp
   567                              <2> 	PUSH    AX
   568                              <2> %IF SHAREF
   569                              <2> 	MOV     AX,OFFSET %%a
   570                              <2> %ELSE
   571                              <2> 	MOV     AX,OFFSET %%a wrt DOSGroup
   572                              <2> %ENDIF
   573                              <2> 	PUSH    AX
   574                              <2> 	Invoke  SegCheck
   575                              <2> 	POP     AX
   576                              <2> %IFN SHAREF
   577                              <2> 	[section Table]
   578                              <2> %ELSE
   579                              <2> 	JMP     SHORT %%b
   580                              <2> %ENDIF
   581                              <2> %%a:
   582                              <2>  %rep %%amount
   583                              <2>         DB      %1
   584                              <2>   %rotate 1
   585                              <2>  %endrep
   586                              <2> 	db 0
   587                              <2> %IFN SHAREF
   588                              <2> 	__SECT__
   589                              <2> %ELSE
   590                              <2> %%b:
   591                              <2> %ENDIF
   592                              <2> ;IRP r,<reglist>
   593                              <2> ;    ASSUME  r:DOSGroup
   594                              <2> ;ENDM
   595                              <2> %endmacro
   596                              <2> %ELSE
   597                              <2> %imacro DOSAssume 3-*.nolist
   598                              <2> ;DOSAssume   Macro   reg,reglist,message
   599                              <2> ;IRP r,<reglist>
   600                              <2> ;    ASSUME  r:DOSGroup
   601                              <2> ;ENDM
   602                              <2> %endmacro
   603                              <2> %ENDIF
   604                              <2> 
   605                              <2> BREAK   <ASSERT - make assertions about registers>
   606                              <2> 
   607                              <2> %if 0
   608                              <2> ;IF DEBUG
   609                              <2> Assert  MACRO   kind, objs, message
   610                              <2> 	LOCAL   a,b
   611                              <2>     IFIDN   <kind>,<Z>
   612                              <2> 	CMP     objs,0
   613                              <2> 	JZ      a
   614                              <2> 	fmt <>,<>,<message>
   615                              <2> a:
   616                              <2>     ELSE
   617                              <2> 	IFIDN   <kind>,<NZ>
   618                              <2> 	CMP     objs,0
   619                              <2> 	JNZ     a
   620                              <2> 	fmt <>,<>,<message>
   621                              <2> a:
   622                              <2> 	ELSE
   623                              <2>     PUSH    AX
   624                              <2> 	    IRP obj,<objs>
   625                              <2> 	PUSH    obj
   626                              <2> 	    ENDM
   627                              <2> 	    IF SHAREF
   628                              <2>     MOV     AX,OFFSET b
   629                              <2> 	    ELSE
   630                              <2>     MOV     AX,OFFSET DOSGroup:b
   631                              <2> 	    ENDIF
   632                              <2>     PUSH    AX
   633                              <2> 	    IFIDN   <kind>,<ISBUF>
   634                              <2> 	Invoke  BUFCheck
   635                              <2> 	    ENDIF
   636                              <2> 	    IFIDN   <kind>,<ISSFT>
   637                              <2> 	Invoke  SFTCheck
   638                              <2> 	    ENDIF
   639                              <2> 	    IFIDN   <kind>,<ISDPB>
   640                              <2> 	Invoke  DPBCheck
   641                              <2> 	    ENDIF
   642                              <2>     POP     AX
   643                              <2> 	    IF SHAREF
   644                              <2>     JMP SHORT a
   645                              <2> b   DB  Message,0
   646                              <2> a:
   647                              <2> 	    ELSE
   648                              <2> Table   segment
   649                              <2> b   db  Message,0
   650                              <2> Table   ends
   651                              <2> 	    ENDIF
   652                              <2> 	ENDIF
   653                              <2>     ENDIF
   654                              <2> ENDM
   655                              <2> %ELSE
   656                              <2> %imacro Assert 0-*.nolist
   657                              <2> %endmacro
   658                              <2> %ENDIF
   659                              <2> 
   660                              <2> %ifndef Installed
   661                              <2>  %idefine Installed 1
   662                              <2> %endif
   663                              <2> 
   664                              <2> Break   <CallInstall - hook to installable pieces>
   665                              <2> 
   666                              <2> %imacro CallInstall 3-*.nolist
   667                              <2> ;CallInstall MACRO   name,mpx,fn,save,restore
   668                              <2> %define %%name %1
   669                              <2> %assign %%mpx %2
   670                              <2> %assign %%fn %3
   671                              <2> %IF Installed
   672                              <2>  %rotate 3
   673                              <2>  %assign %%level 0
   674                              <2>  %assign %%amountsaved 0
   675                              <2>  %rep %0 - 3
   676                              <2>   %ifnempty %1
   677                              <2>    detectstripangles %%token, %%opening, %%closing, %1
   678                              <2>    %assign %%level %%level + ? %+ %%opening
   679                              <2>    %assign %%level %%level - ? %+ %%closing
   680                              <2>    SaveReg ? %+ %%token
   681                              <2>   %endif
   682                              <2>   %assign %%amountsaved %%amountsaved + 1
   683                              <2>   %rotate 1
   684                              <2>   %if %%level <= 0
   685                              <2>    %exitrep
   686                              <2>   %endif
   687                              <2>  %endrep
   688                              <2> 	MOV     AX,(%%mpx << 8) + %%fn
   689                              <2> 	INT     2Fh
   690                              <2>  %assign %%level 0
   691                              <2>  %assign %%amountrestored 0
   692                              <2>  %rep %0 - 3 - %%amountsaved
   693                              <2>   %ifnempty %1
   694                              <2>    detectstripangles %%token, %%opening, %%closing, %1
   695                              <2>    %assign %%level %%level + ? %+ %%opening
   696                              <2>    %assign %%level %%level - ? %+ %%closing
   697                              <2>    RestoreReg ? %+ %%token
   698                              <2>   %endif
   699                              <2>   %assign %%amountrestored %%amountrestored + 1
   700                              <2>   %rotate 1
   701                              <2>   %if %%level <= 0
   702                              <2>    %exitrep
   703                              <2>   %endif
   704                              <2>  %endrep
   705                              <2>  %if %%level > 0 || %0 != 3 + %%amountsaved + %%amountrestored
   706                              <2>   %error Wrong amount saved or restored
   707                              <2>  %endif
   708                              <2> %ELSE
   709                              <2> 	Invoke  %%name
   710                              <2> %ENDIF
   711                              <2> %endmacro
   712                              <2> 
   713                              <2> Break   <Stack frame manipulators>
   714                              <2> 
   715                              <2> %imacro localvar 2.nolist
   716                              <2> %ifidni %2, BYTE
   717                              <2>  %assign ?frame ?frame + 1
   718                              <2>  %assign %%a ?frame
   719                              <2>  labelsize %1, byte, bp - %%a
   720                              <2> %else
   721                              <2>  %ifidni %2, WORD
   722                              <2>   %assign ?frame ?frame + 2
   723                              <2>   %assign %%a ?frame
   724                              <2>   labelsize %1, word, bp - %%a
   725                              <2>  %else
   726                              <2>   %ifidni %2, DWORD
   727                              <2>    %assign ?frame ?frame + 4
   728                              <2>    %assign %%a ?frame
   729                              <2>    labelsize %1 %+ l, word, bp - %%a
   730                              <2>    labelsize %1 %+ h, word, bp - %%a + 2
   731                              <2>    labelsize %1, dword, bp - %%a
   732                              <2>   %else
   733                              <2>    %assign ?frame ?frame + %2
   734                              <2>    %assign %%a ?frame
   735                              <2>    labelsize %1, byte, bp - %%a
   736                              <2>   %endif
   737                              <2>  %endif
   738                              <2> %endif
   739                              <2> %endmacro
   740                              <2> 
   741                              <2> %imacro enter 0.nolist
   742                              <2> 	push    bp
   743                              <2> 	mov     bp,sp
   744                              <2> 	sub     sp,?frame
   745                              <2> %endmacro
   746                              <2> 
   747                              <2> %imacro leave 0.nolist
   748                              <2> 	mov     sp,bp
   749                              <2> 	pop     bp
   750                              <2> %endmacro
   751                              <2> 
   752                              <2> 
   753                              <2> %imacro argvar 2.nolist
   754                              <2> %ifidni %2, BYTE
   755                              <2>  %assign %%a ?aframe
   756                              <2>  %assign ?aframe ?aframe + 1
   757                              <2>  labelsize %1, byte, bp + %%a
   758                              <2> %else
   759                              <2>  %ifidni %2, WORD
   760                              <2>   %assign %%a ?aframe
   761                              <2>   %assign ?aframe ?aframe + 2
   762                              <2>   labelsize %1, word, bp + %%a
   763                              <2>  %else
   764                              <2>   %ifidni %2, DWORD
   765                              <2>    %assign %%a ?aframe
   766                              <2>    %assign ?aframe ?aframe + 4
   767                              <2>    labelsize %1 %+ l, word, bp + %%a
   768                              <2>    labelsize %1 %+ h, word, bp + %%a + 2
   769                              <2>    labelsize %1, dword, bp + %%a
   770                              <2>   %else
   771                              <2>    %assign %%a ?aframe
   772                              <2>    %assign ?aframe ?aframe + %2
   773                              <2>    labelsize %1, byte, bp + %%a
   774                              <2>   %endif
   775                              <2>  %endif
   776                              <2> %endif
   777                              <2> %endmacro
   778                              <2> 
   779                              <2> BREAK   <errnz - generate compilation errors>
   780                              <2> 
   781                              <2> %imacro errnz 1.nolist
   782                              <2> detectstripangles %%token, %%opening, %%closing, %1
   783                              <2> %if ? %+ %%token
   784                              <2>     %error %1 <> 0
   785                              <2> %endif
   786                              <2> %endmacro
   787                              <2> 
   788                              <2> %endif
    17                              <1> %include "sf.mac"
     1                              <2> ;	SCCSID = @(#)sf.asm	1.1 85/04/10
     2                              <2> BREAK <Internal system file table format>
     3                              <2> ;
     4                              <2> ;   AN000   version 4.00   Jan. 1988
     5                              <2> ;   AN003   PTM 3680 --  make NAME offset the same as before (<=3.30)
     6                              <2> ;   AN009   PTM 3839	 reorder SFT for MS WINDOWS
     7                              <2> 
     8                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     9                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    10                              <2> ;									   ;
    11                              <2> ;
    12                              <2> ; system file table
    13                              <2> ;
    14                              <2> 
    15                              <2> SF		STRUC
    16 00000000 ????????            <2> SFLink		DD	?
    17 00000004 ????                <2> SFCount 	DW	?		; number of entries
    18 00000006 ????                <2> SFTable 	DW	?		; beginning of array of the following
    19                              <2> SF		ENDS
    20                              <2> 
    21                              <2> ;
    22                              <2> ; system file table entry
    23                              <2> ;
    24                              <2> 
    25                              <2> sf_entry	STRUC
    26 00000000 ????                <2> sf_ref_count	DW	?		; number of processes sharing entry
    27                              <2> 					;   if FCB then ref count
    28 00000002 ????                <2> sf_mode 	DW	?		; mode of access or high bit on if FCB
    29 00000004 ??                  <2> sf_attr 	DB	?		; attribute of file
    30 00000005 ????                <2> sf_flags	DW	?		;Bits 8-15
    31                              <2> 					; Bit 15 = 1 if remote file
    32                              <2> 					;	 = 0 if local file or device
    33                              <2> 					; Bit 14 = 1 if date/time is not to be
    34                              <2> 					;   set from clock at CLOSE.  Set by
    35                              <2> 					;   FILETIMES and FCB_CLOSE.  Reset by
    36                              <2> 					;   other reseters of the dirty bit
    37                              <2> 					;   (WRITE)
    38                              <2> 					; Bit 13 = Pipe bit (reserved)
    39                              <2> 					;
    40                              <2> 					; Bits 0-7 (old FCB_devid bits)
    41                              <2> 					; If remote file or local file, bit
    42                              <2> 					; 6=0 if dirty Device ID number, bits
    43                              <2> 					; 0-5 if local file.
    44                              <2> 					; bit 7=0 for local file, bit 7
    45                              <2> 					;      =1 for local I/O device
    46                              <2> 					; If local I/O device, bit 6=0 if EOF (input)
    47                              <2> 					;		Bit 5=1 if Raw mode
    48                              <2> 					;		Bit 0=1 if console input device
    49                              <2> 					;		Bit 1=1 if console output device
    50                              <2> 					;		Bit 2=1 if null device
    51                              <2> 					;		Bit 3=1 if clock device
    52 00000007 ????????            <2> sf_devptr	DD	?		; Points to DPB if local file, points
    53                              <2> 					; to device header if local device,
    54                              <2> 					; points to net device header if
    55                              <2> 					; remote
    56 0000000B ????                <2> sf_firclus	DW	?		; First cluster of file (bit 15 = 0)
    57 0000000D ????                <2> sf_time 	DW	?		; Time associated with file
    58 0000000F ????                <2> sf_date 	DW	?		; Date associated with file
    59 00000011 ????????            <2> sf_size 	DD	?		; Size associated with file
    60 00000015 ????????            <2> sf_position	DD	?		; Read/Write pointer or LRU count for FCBs
    61                              <2> ;
    62                              <2> ; Starting here, the next 7 bytes may be used by the file system to store an
    63                              <2> ; ID
    64                              <2> ;
    65 00000019 ????                <2> sf_cluspos	DW	?		; Position of last cluster accessed
    66 0000001B ????????            <2> sf_dirsec	DD	?		; Sector number of directory sector for
    67                              <2> 					; for this file
    68 0000001F ??                  <2> sf_dirpos	DB	?		; Offset of this entry in the above
    69                              <2> ;
    70                              <2> ; End of 7 bytes of file-system specific info.
    71                              <2> ;
    72 00000020 ??????????????????- <2> sf_name 	DB	11 DUP (?)	; 11 character name that is in the
    72 00000029 ????                <2>
    73                              <2> 					; directory entry.  This is used by
    74                              <2> 					; close to detect file deleted and
    75                              <2> 					; disk changed errors.
    76                              <2> 
    77                              <2> ; SHARING INFO
    78 0000002B ????????            <2> sf_chain	DD	?		; link to next SF
    79 0000002F ????                <2> sf_UID		DW	?
    80 00000031 ????                <2> sf_PID		DW	?
    81 00000033 ????                <2> sf_MFT		DW	?
    82 00000035 ????                <2> sf_lstclus	DW	?		;AN009; Last cluster accessed
    83 00000037 ????????            <2> sf_IFS_HDR	DD	?
    84                              <2> sf_entry	ENDS
    85                              <2> 
    86                              <2> labelsize sf_fsda, byte, sf_cluspos	     ;DOS 4.00
    87                              <2> labelsize sf_serial_ID, word, sf_firclus	     ;DOS 4.00
    88                              <2> labelsize sf_netid, byte, sf_cluspos
    89                              <2> labelsize sf_OpenAge, word, sf_position+2
    90                              <2> labelsize sf_LRU, word, sf_position
    91                              <2> 
    92                              <2> sf_default_number   EQU     5h
    93                              <2> 
    94                              <2> ;
    95                              <2> ; Note that we need to mark an SFT as being busy for OPEN/CREATE.  This is
    96                              <2> ; because an INT 24 may prevent us from 'freeing' it.  We mark this as such
    97                              <2> ; by placing a -1 in the ref_count field.
    98                              <2> ;
    99                              <2> 
   100                              <2> sf_busy EQU -1
   101                              <2> 
   102                              <2> 
   103                              <2> ; mode mask for FCB detection
   104                              <2> sf_isfcb		EQU	1000000000000000B
   105                              <2> 
   106                              <2> ; Flag word masks
   107                              <2> sf_isnet		EQU	1000000000000000B
   108                              <2> sf_close_nodate 	EQU	0100000000000000B
   109                              <2> sf_pipe 		EQU	0010000000000000B
   110                              <2> sf_no_inherit		EQU	0001000000000000B
   111                              <2> sf_net_spool		EQU	0000100000000000B
   112                              <2> Handle_Fail_I24 	EQU	0000000100000000B  ;BIT 8 - DISK FULL I24 ERROR
   113                              <2> 
   114                              <2> ; Local file/device flag masks
   115                              <2> devid_file_clean	EQU	40h	; true if file and not written
   116                              <2> devid_file_mask_drive	EQU	3Fh	; mask for drive number
   117                              <2> 
   118                              <2> devid_device		EQU	80h	; true if a device
   119                              <2> devid_device_EOF	EQU	40h	; true if end of file reached
   120                              <2> devid_device_raw	EQU	20h	; true if in raw mode
   121                              <2> devid_device_special	EQU	10h	; true if special device
   122                              <2> devid_device_clock	EQU	08h	; true if clock device
   123                              <2> devid_device_null	EQU	04h	; true if null device
   124                              <2> devid_device_con_out	EQU	02h	; true if console output
   125                              <2> devid_device_con_in	EQU	01h	; true if consle input
   126                              <2> ;									   ;
   127                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   128                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
   129                              <2> 
   130                              <2> ;
   131                              <2> ; structure of devid field as returned by IOCTL is:
   132                              <2> ;
   133                              <2> ;	BIT	7   6	5   4	3   2	1   0
   134                              <2> ;	      |---|---|---|---|---|---|---|---|
   135                              <2> ;	      | I | E | R | S | I | I | I | I |
   136                              <2> ;	      | S | O | A | P | S | S | S | S |
   137                              <2> ;	      | D | F | W | E | C | N | C | C |
   138                              <2> ;	      | E |   |   | C | L | U | O | I |
   139                              <2> ;	      | V |   |   | L | K | L | T | N |
   140                              <2> ;	      |---|---|---|---|---|---|---|---|
   141                              <2> ;	ISDEV = 1 if this channel is a device
   142                              <2> ;	      = 0 if this channel is a disk file
   143                              <2> ;
   144                              <2> ;	If ISDEV = 1
   145                              <2> ;
   146                              <2> ;	      EOF = 0 if End Of File on input
   147                              <2> ;	      RAW = 1 if this device is in Raw mode
   148                              <2> ;		  = 0 if this device is cooked
   149                              <2> ;	      ISCLK = 1 if this device is the clock device
   150                              <2> ;	      ISNUL = 1 if this device is the null device
   151                              <2> ;	      ISCOT = 1 if this device is the console output
   152                              <2> ;	      ISCIN = 1 if this device is the console input
   153                              <2> ;
   154                              <2> ;	If ISDEV = 0
   155                              <2> ;	      EOF = 0 if channel has been written
   156                              <2> ;	      Bits 0-5	are  the  block  device  number  for
   157                              <2> ;		  the channel (0 = A, 1 = B, ...)
   158                              <2> ;
   159                              <2> devid_ISDEV	EQU	80h
   160                              <2> devid_EOF	EQU	40h
   161                              <2> devid_RAW	EQU	20h
   162                              <2> devid_SPECIAL	EQU	10H
   163                              <2> devid_ISCLK	EQU	08h
   164                              <2> devid_ISNUL	EQU	04h
   165                              <2> devid_ISCOT	EQU	02h
   166                              <2> devid_ISCIN	EQU	01h
   167                              <2> 
   168                              <2> devid_block_dev EQU	1Fh		; mask for block device number
    18                              <1> %include "dirent.mac"
     1                              <2> ;	SCCSID = @(#)dirent.asm 1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)dirent.asm 1.1 85/04/10
     3                              <2> Break <Directory entry>
     4                              <2> 
     5                              <2> ;
     6                              <2> ;	+---------------------------+
     7                              <2> ;	|  (12 BYTE) filename/ext   |	    0	    0
     8                              <2> ;	+---------------------------+
     9                              <2> ;	|     (BYTE) attributes     |	    11	    B
    10                              <2> ;	+---------------------------+
    11                              <2> ;	|    (10 BYTE) reserved     |	    12	    C
    12                              <2> ;	+---------------------------+
    13                              <2> ;	| (WORD) time of last write |	    22	    16
    14                              <2> ;	+---------------------------+
    15                              <2> ;	| (WORD) date of last write |	    24	    18
    16                              <2> ;	+---------------------------+
    17                              <2> ;	|   (WORD) First cluster    |	    26	    1A
    18                              <2> ;	+---------------------------+
    19                              <2> ;	|     (DWORD) file size     |	    28	    1C
    20                              <2> ;	+---------------------------+
    21                              <2> ;
    22                              <2> ;   First byte of filename  = E5 -> free directory entry
    23                              <2> ;			    = 00 -> end of allocated directory
    24                              <2> ;   Time:   Bits 0-4=seconds/2, bits 5-10=minute, 11-15=hour
    25                              <2> ;   Date:   Bits 0-4=day, bits 5-8=month, bits 9-15=year-1980
    26                              <2> ;
    27                              <2> 
    28                              <2> dir_entry   STRUC
    29 00000000 ??????????????????- <2> dir_name    DB	    11 DUP (?)		; file name
    29 00000009 ????                <2>
    30 0000000B ??                  <2> dir_attr    DB	    ?			; attribute bits
    31 0000000C ????                <2> dir_codepg  dw	    ?			; code page DOS 4.00
    32 0000000E ????                <2> dir_extcluster dw   ?			; extended attribute starting cluster
    33 00000010 ??                  <2> dir_attr2   db	    ?			; reserved
    34 00000011 ??????????          <2> dir_pad     DB	    5  DUP (?)		; reserved for expansion
    35 00000016 ????                <2> dir_time    DW	    ?			; time of last write
    36 00000018 ????                <2> dir_date    DW	    ?			; date of last write
    37 0000001A ????                <2> dir_first   DW	    ?			; first allocation unit of file
    38 0000001C ????                <2> dir_size_l  DW	    ?			; low 16 bits of file size
    39 0000001E ????                <2> dir_size_h  DW	    ?			; high 16 bits of file size
    40                              <2> dir_entry   ENDS
    41                              <2> 
    42                              <2> attr_read_only	    EQU      1h
    43                              <2> attr_hidden	    EQU      2h
    44                              <2> attr_system	    EQU      4h
    45                              <2> attr_volume_id	    EQU      8h
    46                              <2> attr_directory	    EQU     10h
    47                              <2> attr_archive	    EQU     20h
    48                              <2> attr_device	    EQU     40h 	; This is a VERY special bit.
    49                              <2> 					;   NO directory entry on a disk EVER
    50                              <2> 					;   has this bit set. It is set non-zero
    51                              <2> 					;   when a device is found by GETPATH
    52                              <2> 
    53                              <2> attr_all	    EQU     attr_hidden+attr_system+attr_directory
    54                              <2> 					; OR of hard attributes for FINDENTRY
    55                              <2> 
    56                              <2> attr_ignore	    EQU     attr_read_only+attr_archive+attr_device
    57                              <2> 					; ignore this(ese) attribute(s) during
    58                              <2> 					; search first/next
    59                              <2> 
    60                              <2> attr_changeable     EQU     attr_read_only+attr_hidden+attr_system+attr_archive
    61                              <2> 					; changeable via CHMOD
    19                              <1> %include "curdir.mac"
     1                              <2> ;	SCCSID = @(#)curdir.asm 1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)curdir.asm 1.1 85/04/10
     3                              <2> BREAK <Current directory list structure>
     4                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <2> ;									   ;
     7                              <2> ; CDS items are used bu the internal routines to store cluster numbers and ;
     8                              <2> ; network identifiers for each logical name.  The ID field is used dually, ;
     9                              <2> ; both as net ID and for a cluster number for local devices.  In the case  ;
    10                              <2> ; of local devices, the cluster number will be -1 if there is a potential  ;
    11                              <2> ; of the disk being changed or if the path must be recracked.  The END	   ;
    12                              <2> ; field is the location of the end of the definition.  No .. is allowed    ;
    13                              <2> ; past this point							   ;
    14                              <2> 
    15                              <2> DIRSTRLEN	EQU	64+3		; Max length in bytes of directory strings
    16                              <2> TEMPLEN 	EQU	DIRSTRLEN*2
    17                              <2> 
    18                              <2> curdir_list	STRUC
    19 00000000 ??????????????????- <2> curdir_text	DB	DIRSTRLEN DUP (?)   ; text of assignment and curdir
    19 00000009 ??????????????????- <2>
    19 00000012 ??????????????????- <2>
    19 0000001B ??????????????????- <2>
    19 00000024 ??????????????????- <2>
    19 0000002D ??????????????????- <2>
    19 00000036 ??????????????????- <2>
    19 0000003F ????????            <2>
    20 00000043 ????                <2> curdir_flags	DW	?		; various flags
    21 00000045 ????????            <2> curdir_devptr	DD	?		; local pointer to DPB or net device
    22 00000049 ????                <2> curdir_ID	DW	?		; cluster of current dir (net ID)
    23 0000004B ????                <2> 		DW	?
    24 0000004D ????                <2> curdir_user_word DW	?
    25 0000004F ????                <2> curdir_end	DW	?		; end of assignment
    26 00000051 ??                  <2> curdir_type	DB	?		; IFS drive (2=ifs, 4=netuse)
    27 00000052 ????????            <2> curdir_ifs_hdr	DD	?		; Ptr to File System Header
    28 00000056 ????                <2> curdir_fsda	DB	2 DUP (?)	; File System Dependent Data Area
    29                              <2> curdir_list	ENDS
    30                              <2> 
    31                              <2> curdirLen	EQU	curdir_list_struc_size	; Needed for screwed up
    32                              <2> 						; ASM87 which doesn't allow
    33                              <2> 						; Size directive as a macro
    34                              <2> 						; argument
    35                              <2> labelsize curdir_netID, dword, curdir_ID
    36                              <2> 
    37                              <2> ;Flag word masks
    38                              <2> curdir_isnet	EQU	1000000000000000B
    39                              <2> curdir_isifs	EQU	1000000000000000B	; DOS 4.00
    40                              <2> curdir_inuse	EQU	0100000000000000B
    41                              <2> curdir_splice	EQU	0010000000000000B
    42                              <2> curdir_local	EQU	0001000000000000B
    43                              <2> ;									   ;
    44                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    45                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    20                              <1> %include "dpb.mac"
     1                              <2> ;	SCCSID = @(#)dpb.asm	1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)dpb.asm	1.1 85/04/10
     3                              <2> BREAK <DPB structure>
     4                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <2> ;									   ;
     7                              <2> dpb	STRUC
     8 00000000 ??                  <2> dpb_drive	    DB	    ?		; Logical drive # assoc with DPB (A=0,B=1,...)
     9 00000001 ??                  <2> dpb_UNIT	    DB	    ?		; Driver unit number of DPB
    10 00000002 ????                <2> dpb_sector_size     DW	    ?		; Size of physical sector in bytes
    11 00000004 ??                  <2> dpb_cluster_mask    DB	    ?		; Sectors/cluster - 1
    12 00000005 ??                  <2> dpb_cluster_shift   DB	    ?		; Log2 of sectors/cluster
    13 00000006 ????                <2> dpb_first_FAT	    DW	    ?		; Starting record of FATs
    14 00000008 ??                  <2> dpb_FAT_count	    DB	    ?		; Number of FATs for this drive
    15 00000009 ????                <2> dpb_root_entries    DW	    ?		; Number of directory entries
    16 0000000B ????                <2> dpb_first_sector    DW	    ?		; First sector of first cluster
    17 0000000D ????                <2> dpb_max_cluster     DW	    ?		; Number of clusters on drive + 1
    18 0000000F ????                <2> dpb_FAT_size	    DW	    ?		;;Number of records occupied by FAT
    19 00000011 ????                <2> dpb_dir_sector	    DW	    ?		; Starting record of directory
    20 00000013 ????????            <2> dpb_driver_addr     DD	    ?		; Pointer to driver
    21 00000017 ??                  <2> dpb_media	    DB	    ?		; Media byte
    22 00000018 ??                  <2> dpb_first_access    DB	    ?		; This is initialized to -1 to force a media
    23                              <2> 					; check the first time this DPB is used
    24 00000019 ????????            <2> dpb_next_dpb	    DD	    ?		; Pointer to next Drive parameter block
    25 0000001D ????                <2> dpb_next_free	    DW	    ?		; Cluster # of last allocated cluster
    26 0000001F ????                <2> dpb_free_cnt	    DW	    ?		; Count of free clusters, -1 if unknown
    27                              <2> dpb	ENDS
    28                              <2> 
    29                              <2> DPBSIZ	EQU	dpb_struc_size		; Size of the structure in bytes
    30                              <2> 
    31                              <2> DSKSIZ	equ	dpb_max_cluster 	; Size of disk (temp used during init only)
    32                              <2> ;									   ;
    33                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    34                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    21                              <1> %include "buffer.mac"
     1                              <2> %include "buf2sw.mac"
     1                              <3> %define BUF2 1
     2                              <2> 
     3                              <2> ;	SCCSID = @(#)buffer.asm 1.1 85/04/09
     4                              <2> BREAK <Disk I/O Buffer Header>
     5                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     6                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     7                              <2> ;									   ;
     8                              <2> 
     9                              <2> %ifdef BUF2
    10                              <2> 
    11                              <2> ; Field definition for I/O buffer information
    12                              <2> 
    13                              <2> BUFFINFO        STRUC
    14 00000000 ????????            <2> NEXTBUF         DD      ?       ; Pointer to next buffer in list
    15                              <2> ; The next two items are often refed as a word
    16                              <2> buf_ID:
    17 00000004 ??                  <2> BUFDRV          DB      ?       ; Logical drive # assoc with buffer FF = free
    18                              <2> buf_flags:
    19 00000005 ??                  <2> BUFDATAFLAG	db	?
    20 00000006 ??                  <2> BUFPRI          DB      ?       ; Buffer selection priority (see EQUs below)
    21 00000007 ??                  <2> 	alignb 2
    22                              <2> buf_sector:
    23 00000008 ????????            <2> BUFSECNO        dd      ?       ; Sector number of buffer
    24                              <2> 	alignb 2
    25 0000000C ????????            <2> BUFDRVDP        DD      ?       ; Pointer to drive parameters
    26                              <2> BUFFINFO        ENDS
    27                              <2> 
    28                              <2> BUFINSIZ        EQU     BUFFINFO_struc_size
    29                              <2>                                 ; Size of structure in bytes
    30                              <2> BUFINSIZE equ BUFINSIZ
    31                              <2> 
    32                              <2> FREEPRI EQU     0
    33                              <2> LBRPRI  EQU     2               ; Last byte of buffer read
    34                              <2> LBWPRI  EQU     4               ; Last byte written
    35                              <2> RPRI    EQU     6               ; Read but not last byte
    36                              <2> WPRI    EQU     8               ; Written but not last byte
    37                              <2> DIRPRI  EQU     15              ; Directory Sector
    38                              <2> FATPRI  EQU     30              ; FAT sector
    39                              <2> 
    40                              <2> buf_dirty	EQU	01000000B
    41                              <2> buf_isDATA	EQU	00001000B
    42                              <2> buf_isDIR	EQU	00000100B
    43                              <2> buf_isFAT	EQU	00000010B
    44                              <2> buf_type_0	EQU	11110001B	; AND sets type to "none"
    45                              <2> 
    46                              <2> %else
    47                              <2> 
    48                              <2> ; Field definition for I/O buffer information
    49                              <2> 
    50                              <2> BUFFINFO	STRUC
    51                              <2> buf_next	DW	?		; Pointer to next buffer in list
    52                              <2> buf_prev	DW	?		; Pointer to prev buffer in list
    53                              <2> buf_ID		DB	?		; Drive of buffer (bit 7 = 0)
    54                              <2> 					; SFT table index (bit 7 = 1)
    55                              <2> 					; = FFH if buffer free
    56                              <2> buf_flags	DB	?		; Bit 7 = 1 if Remote file buffer
    57                              <2> 					;	= 0 if Local device buffer
    58                              <2> 					; Bit 6 = 1 if buffer dirty
    59                              <2> 					; Bit 5 = Reserved
    60                              <2> 					; Bit 4 = Search bit (bit 7 = 1)
    61                              <2> 					; Bit 3 = 1 if buffer is DATA
    62                              <2> 					; Bit 2 = 1 if buffer is DIR
    63                              <2> 					; Bit 1 = 1 if buffer is FAT
    64                              <2> 					; Bit 0 = Reserved
    65                              <2> buf_sector	DD	?		; Sector number of buffer (bit 7 = 0)
    66                              <2> ; The next two items are often refed as a word (bit 7 = 0)
    67                              <2> buf_wrtcnt	DB	?		; For FAT sectors, # times sector written out
    68                              <2> buf_wrtcntinc	DW	?		; "   "     "   , # sectors between each write
    69                              <2> buf_DPB 	DD	?		; Pointer to drive parameters
    70                              <2> buf_fill	DW	?		; How full buffer is (bit 7 = 1)
    71                              <2> buf_reserved	DB	?		; make DWORD boundary for 386
    72                              <2> BUFFINFO	ENDS
    73                              <2> 
    74                              <2> labelsize buf_offset, dword, buf_sector
    75                              <2> 					;For bit 7 = 1, this is the byte
    76                              <2> 					;offset of the start of the buffer in
    77                              <2> 					;the file pointed to by buf_ID.  Thus
    78                              <2> 					;the buffer starts at location
    79                              <2> 					;buf_offset in the file and contains
    80                              <2> 					;buf_fill bytes.
    81                              <2> 
    82                              <2> BUFINSIZ	EQU	BUFFINFO_struc_size
    83                              <2> 					; Size of structure in bytes
    84                              <2> 
    85                              <2> buf_Free	EQU	0FFh		; buf_id of free buffer
    86                              <2> 
    87                              <2> ;Flag byte masks
    88                              <2> buf_isnet	EQU	10000000B
    89                              <2> buf_dirty	EQU	01000000B
    90                              <2> 
    91                              <2> buf_isDATA	EQU	00001000B
    92                              <2> buf_isDIR	EQU	00000100B
    93                              <2> buf_isFAT	EQU	00000010B
    94                              <2> buf_type_0	EQU	11110001B	; AND sets type to "none"
    95                              <2> 
    96                              <2> buf_NetID	EQU	BUFINSIZ
    97                              <2> 
    98                              <2> ;
    99                              <2> ; Buffer Hash Entry Structure
   100                              <2> 
   101                              <2> BUFFER_HASH_ENTRY	STRUC		; DOS 4.00
   102                              <2> EMS_PAGE_NUM	DW	?		; logical page number for EMS handle
   103                              <2> BUFFER_BUCKET	DD	 ?		; pointer to buffers
   104                              <2> DIRTY_COUNT	DB	 ?		; number of dirty buffers
   105                              <2> BUFFER_RESERVED DB	 ?		; reserved
   106                              <2> BUFFER_HASH_ENTRY	ENDS
   107                              <2> 
   108                              <2> MaxBuffinBucket EQU	15		; Max number of buffers per bucket
   109                              <2> MaxBucketinPage EQU	 2		; Max number of buckets per 16kb page
   110                              <2> 
   111                              <2> %endif
   112                              <2> 
   113                              <2> ;									   ;
   114                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
   115                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    22                              <1> %include "arena.mac"
     1                              <2> ;	SCCSID = @(#)arena.asm	1.1 85/04/09
     2                              <2> ;BREAK <Memory arena structure>
     3                              <2> 
     4                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     5                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     6                              <2> ;									   ;
     7                              <2> ;
     8                              <2> ; arena item
     9                              <2> ;
    10                              <2> arena	STRUC
    11 00000000 ??                  <2> arena_signature     DB	?		; 4D for valid item, 5A for last item
    12 00000001 ????                <2> arena_owner	    DW	?		; owner of arena item
    13 00000003 ????                <2> arena_size	    DW	?		; size in paragraphs of item
    14 00000005 ??????              <2> arena_reserved	    DB	3 DUP(?)	; reserved
    15 00000008 ????????????????    <2> arena_name	    DB	8 DUP(?)	; owner file name
    16                              <2> arena	ENDS
    17                              <2> 
    18                              <2> ;
    19                              <2> ; CAUTION: The routines in ALLOC.ASM rely on the fact that arena_signature
    20                              <2> ; and arena_owner_system are all equal to zero and are contained in DI.  Change
    21                              <2> ; them and change ALLOC.ASM.
    22                              <2> 
    23                              <2> arena_owner_system  EQU 0		; free block indication
    24                              <2> 
    25                              <2> arena_signature_normal	EQU 4Dh 	; valid signature, not end of arena
    26                              <2> arena_signature_end	EQU 5Ah 	; valid signature, last block in arena
    27                              <2> ;									   ;
    28                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    29                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    30                              <2> 
    23                              <1> %include "vector.mac"
     1                              <2> ;	SCCSID = @(#)vector.asm	1.1 85/04/10
     2                              <2> BREAK <interrupt definitions>
     3                              <2> 
     4                              <2> ;Asmvar	AltVect
     5                              <2> %ifndef AltVect
     6                              <2>  %iassign AltVect 0
     7                              <2> %endif
     8                              <2> 
     9                              <2> INTTAB		EQU	20H
    10                              <2> inttab equ INTTAB	; NASM port equate
    11                              <2> INTBASE 	EQU	4 * inttab
    12                              <2> ENTRYPOINT	EQU	INTBASE+40H
    13                              <2> 
    14                              <2> 	%IF	ALTVECT
    15                              <2> ALTTAB	EQU	0F0H
    16                              <2> ALTBASE EQU	4 * ALTTAB
    17                              <2> 	%ENDIF
    18                              <2> 
    19                              <2> ;
    20                              <2> ; interrupt assignments
    21                              <2> ;
    22                              <2> 	%IFN ALTVECT
    23                              <2> int_abort	    EQU     INTTAB	; abort process
    24                              <2> int_command	    EQU     int_abort+1 ; call MSDOS
    25                              <2> int_terminate	    EQU     int_abort+2 ; int to terminate address
    26                              <2> int_ctrl_c	    EQU     int_abort+3 ; ^c trapper
    27                              <2> int_fatal_abort     EQU     int_abort+4 ; hard disk error
    28                              <2> int_disk_read	    EQU     int_abort+5 ; logical sector disk read
    29                              <2> int_disk_write	    EQU     int_abort+6 ; logical sector disk write
    30                              <2> int_keep_process    EQU     int_abort+7 ; terminate program and stay
    31                              <2> 					; resident
    32                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    33                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    34                              <2> ;									   ;
    35                              <2> int_spooler	    EQU     int_abort+8 ; spooler call
    36                              <2> int_fastcon	    EQU     int_abort+9 ; fast CON interrupt
    37                              <2> int_IBM 	    EQU     int_abort+10; critical section maintenance
    38                              <2> ;									   ;
    39                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    40                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    41                              <2> 	%ELSE
    42                              <2> int_abort	    EQU     INTTAB	; abort process
    43                              <2> int_command	    EQU     int_abort+1 ; call MSDOS
    44                              <2> int_terminate	    EQU     ALTTAB	; int to terminate address
    45                              <2> int_ctrl_c	    EQU     int_terminate+1 ; ^c trapper
    46                              <2> int_fatal_abort     EQU     int_terminate+2 ; hard disk error
    47                              <2> int_disk_read	    EQU     int_abort+5 ; logical sector disk read
    48                              <2> int_disk_write	    EQU     int_abort+6 ; logical sector disk write
    49                              <2> int_keep_process    EQU     int_abort+7 ; terminate program and stay resident
    50                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    51                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    52                              <2> ;									   ;
    53                              <2> int_spooler	    EQU     int_terminate+3 ; spooler call
    54                              <2> int_fastcon	    EQU     int_abort+9 ; fast CON interrupt
    55                              <2> ;									   ;
    56                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    57                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    58                              <2> 	%ENDIF
    59                              <2> 
    60                              <2> addr_int_abort		EQU    4 * int_abort
    61                              <2> addr_int_command	EQU    4 * int_command
    62                              <2> addr_int_terminate	EQU    4 * int_terminate
    63                              <2> addr_int_ctrl_c 	EQU    4 * int_ctrl_c
    64                              <2> addr_int_fatal_abort	EQU    4 * int_fatal_abort
    65                              <2> addr_int_disk_read	EQU    4 * int_disk_read
    66                              <2> addr_int_disk_write	EQU    4 * int_disk_write
    67                              <2> addr_int_keep_process	EQU    4 * int_keep_process
    68                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    69                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    70                              <2> ;									   ;
    71                              <2> addr_int_spooler	EQU    4 * int_spooler
    72                              <2> addr_int_fastcon	EQU    4 * int_fastcon
    73                              <2> addr_int_IBM		EQU    4 * int_IBM
    74                              <2> ;									   ;
    75                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    76                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    24                              <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 ??????????????????- <2> 	       DB    (SRHEAD_struc_size) DUP(?)
   156 00000009 ????????            <2>
   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 ??????????????????- <2> MEDIA_Label	 DB	 11 dup (?) ;volume label
   183 0000000F ????                <2>
   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
    25                              <1> %include "pdb.mac"
     1                              <2> ;	SCCSID = @(#)pdb.asm	1.1 85/04/10
     2                              <2> BREAK <Process data block>
     3                              <2> 
     4                              <2> ;
     5                              <2> ; Process data block (otherwise known as program header)
     6                              <2> ;
     7                              <2> 
     8                              <2> FilPerProc	    EQU     20
     9                              <2> 
    10                              <2> Process_data_block  STRUC
    11 00000000 ????                <2> PDB_Exit_Call	    DW	    ?		; INT int_abort system terminate
    12 00000002 ????                <2> PDB_block_len	    DW	    ?		; size of execution block
    13 00000004 ??                  <2> 		    DB	    ?
    14 00000005 ??????????          <2> PDB_CPM_Call	    DB	5 DUP (?)	; ancient call to system
    15 0000000A ????????            <2> PDB_Exit	    DD	    ?		; pointer to exit routine
    16 0000000E ????????            <2> PDB_Ctrl_C	    DD	    ?		; pointer to ^C routine
    17 00000012 ????????            <2> PDB_Fatal_abort     DD	    ?		; pointer to fatal error
    18                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    19                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    20                              <2> ;									   ;
    21 00000016 ????                <2> PDB_Parent_PID	    DW	    ?		; PID of parent (terminate PID)
    22 00000018 ??????????????????- <2> PDB_JFN_Table	    DB	FilPerProc DUP (?)
    22 00000021 ??????????????????- <2>
    22 0000002A ????                <2>
    23                              <2> 					; indices into system table
    24                              <2> ;									   ;
    25                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    26                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    27 0000002C ????                <2> PDB_environ	    DW	    ?		; seg addr of environment
    28                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    29                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    30                              <2> ;									   ;
    31 0000002E ????????            <2> PDB_User_stack	    DD	    ?		; stack of self during system calls
    32 00000032 ????                <2> PDB_JFN_Length	    DW	    ?		; number of handles allowed
    33 00000034 ????????            <2> PDB_JFN_Pointer     DD	    ?		; pointer to JFN table
    34 00000038 ????????            <2> PDB_Next_PDB	    DD	    ?		; pointer to nested PDB's
    35 0000003C ??????????????????- <2> PDB_PAD1	    DB	    14h DUP (?)
    35 00000045 ??????????????????- <2>
    35 0000004E ????                <2>
    36                              <2> ;									   ;
    37                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    38                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    39 00000050 ??????????          <2> PDB_Call_system     DB	    5 DUP (?)	; portable method of system call
    40                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    41                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    42                              <2> ;									   ;
    43 00000055 ??????????????      <2> PDB_PAD2	    DB	    7h DUP (?)
    44                              <2> ;									   ;
    45                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    46                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    47                              <2> Process_data_block  ENDS
    48                              <2> 
    49                              <2> labelsize PDB_InterCon, byte, PDB_PAD1	; 2/12/KK
    50                              <2> labelsize PDB_Append, byte, PDB_PAD1+1	; 2/12/KK
    26                              <1> %include "find.mac"
     1                              <2> ;	SCCSID = @(#)find.asm	1.1 85/04/10
     2                              <2> ;	SCCSID = @(#)find.asm	1.1 85/04/10
     3                              <2> Break	<find first/next buffer>
     4                              <2> 
     5                              <2> find_buf    STRUC
     6                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
     7                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
     8                              <2> ;									   ;
     9 00000000 ??                  <2> find_buf_drive	    DB	?		; drive of search
    10 00000001 ??????????????????- <2> find_buf_name	    DB	11 DUP (?)	; formatted name
    10 0000000A ????                <2>
    11 0000000C ??                  <2> find_buf_sattr	    DB	?		; attribute of search
    12 0000000D ????                <2> find_buf_LastEnt    DW	?		; LastEnt
    13 0000000F ????                <2> find_buf_DirStart   DW	?		; DirStart
    14 00000011 ????????            <2> find_buf_NetID	    DB	4 DUP (?)	; Reserved for NET
    15                              <2> ;									   ;
    16                              <2> ;	     C	A  V  E  A  T	  P  R	O  G  R  A  M  M  E  R		   ;
    17                              <2> ;----+----+----+----+----+----+----+----+----+----+----+----+----+----+----;
    18                              <2> 
    19 00000015 ??                  <2> find_buf_attr	    DB	?		; attribute found
    20 00000016 ????                <2> find_buf_time	    DW	?		; time
    21 00000018 ????                <2> find_buf_date	    DW	?		; date
    22 0000001A ????                <2> find_buf_size_l     DW	?		; low(size)
    23 0000001C ????                <2> find_buf_size_h     DW	?		; high(size)
    24 0000001E ??????????????????- <2> find_buf_pname	    DB	13 DUP (?)	; packed name
    24 00000027 ????????            <2>
    25                              <2> find_buf    ENDS
    27                              <1> %include "mi.mac"
     1                              <2> ;	SCCSID = @(#)mi.asm	1.1 85/04/10
     2                              <2> BREAK <Machine instruction, flag definitions and character types>
     3                              <2> 
     4                              <2> mi_INT		EQU	0CDh
     5                              <2> mi_Long_JMP	EQU	0EAh
     6                              <2> mi_Long_CALL	EQU	09Ah
     7                              <2> mi_Long_RET	EQU	0CBh
     8                              <2> mi_Near_RET	EQU	0C3h
     9                              <2> 
    10                              <2> ;			xxxxoditszxaxpxc
    11                              <2> f_Overflow	EQU	0000100000000000B
    12                              <2> f_Direction	EQU	0000010000000000B
    13                              <2> f_Interrupt	EQU	0000001000000000B
    14                              <2> f_Trace 	EQU	0000000100000000B
    15                              <2> f_Sign		EQU	0000000010000000B
    16                              <2> f_Zero		EQU	0000000001000000B
    17                              <2> f_Aux		EQU	0000000000010000B
    18                              <2> f_Parity	EQU	0000000000000100B
    19                              <2> f_Carry 	EQU	0000000000000001B
    28                              <1> ;.cref
    29                              <1> [list +]
    30                              <1> 
    31                              <1> ;TITLE   IBMDATA - DATA segment for DOS
    32                              <1> ;NAME    IBMDATA
    33                              <1> 
    34                              <1> %iassign installed TRUE
    35                              <1> 
    36                              <1> ;=== Push trace listing source: ms_data.nas
    37                              <1> %include "ms_data.nas" ; NASM included file
     1                              <2> %include "nasmorg.mac"
     1                              <3> 
     2                              <3> %if 0
     3                              <3> 
     4                              <3> NASM macros to replace JWasm org directive
     5                              <3>  2024 by E. C. Masloch, Public Domain
     6                              <3> 
     7                              <3> %endif
     8                              <3> 
     9                              <3> 	%imacro org 1-2.nolist db 0
    10                              <3> times (%1) - ($ - $$) %2
    11                              <3> 	%endmacro
     2                              <2> 
     3                              <2> ;       SCCSID = @(#)msdata.asm 1.8 85/09/12
     4                              <2> %ifndef Kanji
     5                              <2>  %iassign Kanji 0
     6                              <2> %endif
     7                              <2> %ifndef Debug
     8                              <2>  %iassign Debug 0
     9                              <2> %endif
    10                              <2> %ifndef Redirector
    11                              <2>  %iassign Redirector 0
    12                              <2> %endif
    13                              <2> %ifndef ShareF
    14                              <2>  %iassign ShareF 0
    15                              <2> %endif
    16                              <2>  
    17                              <2> Break <Uninitialized data overlayed by initialization code>
    18                              <2> 
    19                              <2> %define RECORDED none, none
    20                              <2> %macro record 2.nolist
    21                              <2> %%before:
    22                              <2> 	%1
    23                              <2> %%after:
    24                              <2> %assign %%i 0
    25                              <2> %rep %%after - %%before
    26                              <2>  %assign %%offset %%before + %%i - MSDAT001S
    27                              <2>  %xdefine RECORDED RECORDED, %%offset, %2
    28                              <2>  %assign %%i %%i + 1
    29                              <2> %endrep
    30                              <2> %endmacro
    31                              <2>  
    32                              <2> section DATA
    33                              <2> ; Init code overlaps with data area below
    34                              <2> 
    35                              <2> absolute $
    36                              <2> 
    37                              <2>         ORG     0, resb 1
    38                              <2> MSDAT001E equ MSDAT001e	; NASM port label
    39                              <2> PUBLIC MSDAT001S,MSDAT001E
    40                              <2> MSDAT001S       label byte
    41                              <2>  
    42 00000000 ????????????        <2>         I_am_nobits    TIMEBUF,6               ; Time read from clock device
    43 00000006 ????                <2>         I_am_nobits    DEVIOBUF,2              ; Buffer for I/O under file assignment
    44                              <2> ;
    45                              <2> ; The following areas are used as temp buffer in EXEC system call
    46                              <2> ;
    47 00000008 <res 80h>           <2>         I_am_nobits    OPENBUF,128             ; buffer for name operations
    48 00000088 <res 80h>           <2>         I_am_nobits    RenBuf,128              ; buffer for rename destination
    49                              <2> ; Buffer for search calls
    50 00000108 <res 35h>           <2>         I_am_nobits    SEARCHBUF,53            ; internal search buffer
    51 0000013D <res 58h>           <2>         I_am_nobits    DummyCDS,curdirLen
    52                              <2> ;
    53                              <2> ; End of contiguous buffer
    54                              <2> ;
    55                              <2>  
    56                              <2> ;
    57                              <2> ; Temporary directory entry for use by many routines.  Device directory
    58                              <2> ; entries (bogus) are built here.
    59                              <2> ;
    60                              <2> DevFCB equ DEVFCB	; NASM port label
    61                              <2>         PUBLIC  DevFCB
    62                              <2> DEVFCB  LABEL   BYTE                    ; Uses NAME1, NAME2, combined
    63                              <2> ; WARNING..  do not alter position of NAME1 relative to DEVFCB
    64                              <2> ; without first examining BUILD_DEVICE_ENT. Look carefully at DOS_RENAME
    65                              <2> ; as well as it is the only guy who uses NAME2 and DESTSTART.
    66 00000195 <res Ch>            <2>         I_am_nobits    NAME1,12                ; File name buffer
    67 000001A1 <res Dh>            <2>         I_am_nobits    NAME2,13                ;
    68 000001AE ????                <2>         I_am_nobits    DESTSTART,WORD          ;
    69                              <2> DIR_ENTRY_struc_size equ dir_entry_struc_size	; NASM port equate
    70 000001B0 ??????????          <2>         DB      ((DIR_ENTRY_struc_size) - ($ - DEVFCB)) DUP (?)
    71                              <2> ;
    72                              <2> ; End Temporary directory entry.
    73                              <2> ;
    74 000001B5 ??                  <2>         I_am_nobits    ATTRIB,BYTE             ; storage for file attributes
    75 000001B6 ??                  <2>         I_am_nobits    EXTFCB,BYTE             ; TRUE => extended FCB in use
    76 000001B7 ??                  <2>         I_am_nobits    SATTRIB,BYTE            ; Storage for search attributes
    77                              <2> %if EXTFCB + 1 != SATTRIB	; used in macro2.nas
    78                              <2>  %error Unexpected layout
    79                              <2> %endif
    80 000001B8 ??                  <2>         I_am_nobits    open_access,BYTE        ; access of open system call
    81 000001B9 ??                  <2>         I_am_nobits    FoundDel,BYTE           ; true => file was deleted
    82 000001BA ??                  <2>         I_am_nobits    Found_dev,BYTE          ; true => search found a device
    83 000001BB ??                  <2>         I_am_nobits    fSplice,BYTE            ; true => do a splice in transpath
    84 000001BC ??                  <2>         I_am_nobits    fSharing,BYTE           ; TRUE => no redirection
    85 000001BD ??                  <2>         I_am_nobits    SECCLUSPOS,BYTE         ; Position of first sector within cluster
    86 000001BE ??                  <2>         I_am_nobits    TRANS,BYTE              ;
    87 000001BF ??                  <2>         I_am_nobits    READOP,BYTE             ;
    88 000001C0 ??                  <2>         I_am_nobits    THISDRV,BYTE            ;
    89 000001C1 ??                  <2>         I_am_nobits    CLUSFAC,BYTE            ;
    90 000001C2 ??                  <2>         I_am_nobits    CLUSSPLIT,BYTE          ;
    91 000001C3 ??                  <2>         I_am_nobits    INSMODE,BYTE            ; true => insert mode in buffered read
    92 000001C4 ??                  <2>         I_am_nobits    cMeta,BYTE              ; count of meta'ed components found
    93 000001C5 ??                  <2>         I_am_nobits    VOLID,BYTE              ;
    94 000001C6 ??                  <2>         I_am_nobits    exit_type,BYTE          ; type of exit...
    95                              <2>  
    96 000001C7 ??                  <2>         record alignb 2, 90h
    97                              <2>  
    98                              <2> ; WARNING - the following two items are accessed as a word
    99 000001C8 ??                  <2>         I_am_nobits    CREATING,BYTE           ; true => creating a file
   100 000001C9 ??                  <2>         I_am_nobits    DELALL,BYTE             ; true => deleting everything
   101                              <2>  
   102 000001CA ????????            <2>         I_am_nobits    EXITHOLD,DWORD          ; Temp location for proc terminate
   103 000001CE ????                <2>         I_am_nobits    user_SP,WORD            ; User SP for system call
   104 000001D0 ????                <2>         I_am_nobits    user_SS,WORD            ; User SS for system call
   105 000001D2 ????                <2>         I_am_nobits    CONTSTK,WORD            ;
   106 000001D4 ????????            <2>         I_am_nobits    THISDPB,DWORD           ;
   107 000001D8 ????                <2>         I_am_nobits    CLUSSAVE,WORD           ;
   108 000001DA ????????            <2>         I_am_nobits    CLUSSEC,DWORD           ;>32mb                                  AC0000
   109 000001DE ????                <2>         I_am_nobits    PREREAD,WORD            ; 0 means preread; 1 means optional
   110 000001E0 ????                <2>         I_am_nobits    FATBYT,WORD             ; Used by ALLOCATE
   111 000001E2 ????                <2>         I_am_nobits    FATBYTE,WORD            ; Used by $SLEAZEFUNC
   112 000001E4 ????????            <2>         I_am_nobits    DEVPT,DWORD             ;
   113 000001E8 ????????            <2>         I_am_nobits    THISSFT,DWORD           ; Address of user SFT
   114 000001EC ????????            <2>         I_am_nobits    THISCDS,DWORD           ; Address of current CDS
   115 000001F0 ????????            <2>         I_am_nobits    THISFCB,DWORD           ; Address of user FCB
   116 000001F4 ????                <2>         record {I_am_nobits    SFN,WORD,<-1>}, 255           ; SystemFileNumber found for accessfile
   117 000001F6 ????                <2>         I_am_nobits    JFN,WORD                ; JobFileNumber found for accessfile
   118 000001F8 ????????            <2>         I_am_nobits    PJFN,DWORD              ; PointerJobFileNumber found for accessfile
   119 000001FC ????                <2>         I_am_nobits    WFP_START,WORD          ;
   120 000001FE ????                <2>         I_am_nobits    REN_WFP,WORD            ;
   121 00000200 ????                <2>         I_am_nobits    CURR_DIR_END,WORD       ;
   122 00000202 ????                <2>         I_am_nobits    NEXTADD,WORD            ;
   123 00000204 ????                <2>         I_am_nobits    LASTPOS,WORD            ;
   124 00000206 ????                <2>         I_am_nobits    CLUSNUM,WORD            ;
   125 00000208 ????????            <2>         I_am_nobits    DIRSEC,DWORD            ;>32mb                                  AC0000
   126 0000020C ????                <2>         I_am_nobits    DIRSTART,WORD           ;
   127 0000020E ????????            <2>         I_am_nobits    SECPOS,DWORD       ;>32mb Position of first sector accessed
   128 00000212 ????????            <2>         I_am_nobits    VALSEC,DWORD       ;>32mb Number of valid (previously written)
   129                              <2>                                         ; sectors
   130 00000216 ????                <2>         I_am_nobits    BYTSECPOS,WORD          ; Position of first byte within sector
   131 00000218 ????????            <2>         I_am_nobits    BYTPOS,4                ; Byte position in file of access
   132 0000021C ????                <2>         I_am_nobits    BYTCNT1,WORD            ; No. of bytes in first sector
   133 0000021E ????                <2>         I_am_nobits    BYTCNT2,WORD            ; No. of bytes in last sector
   134 00000220 ????                <2>         I_am_nobits    SECCNT_DOS,WORD             ; No. of whole sectors
   135 00000222 ????                <2>         I_am_nobits    ENTFREE,WORD            ;
   136 00000224 ????                <2>         I_am_nobits    ENTLAST,WORD            ;
   137 00000226 ????                <2>         I_am_nobits    NXTCLUSNUM,WORD         ;
   138 00000228 ????????            <2>         I_am_nobits    GROWCNT,DWORD           ;
   139 0000022C ????????            <2>         I_am_nobits    CURBUF,DWORD            ;
   140 00000230 ????????            <2>         I_am_nobits    CONSft,DWORD            ; SFT of console swapped guy.
   141 00000234 ????                <2>         I_am_nobits    SaveBX,WORD             ;
   142 00000236 ????                <2>         I_am_nobits    SaveDS,WORD             ;
   143 00000238 ????                <2>         I_am_nobits    restore_tmp,WORD        ; return address for restore world
   144 0000023A ????                <2>         I_am_nobits    NSS,WORD
   145 0000023C ????                <2>         I_am_nobits    NSP,WORD
   146 0000023E ????                <2>         I_am_nobits    EXTOPEN_FLAG,WORD,<0>   ;FT. extended open input flag           ;AN000;
   147 00000240 ??                  <2>         I_am_nobits    EXTOPEN_ON,BYTE,<0>     ;FT. extended open conditional flag     ;AN000;
   148 00000241 ????                <2>         I_am_nobits    EXTOPEN_IO_MODE,WORD,<0>;FT. extende open io mode               ;AN000;
   149 00000243 ????                <2>         I_am_nobits    SAVE_DI,WORD            ;FT. extende open saved DI              ;AN000;
   150 00000245 ????                <2>         I_am_nobits    SAVE_ES,WORD            ;FT. extende open saved ES              ;AN000;
   151 00000247 ????                <2>         I_am_nobits    SAVE_DX,WORD            ;FT. extende open saved DX              ;AN000;
   152 00000249 ????                <2>         I_am_nobits    SAVE_CX,WORD            ;FT. extende open saved CX              ;AN000;
   153 0000024B ????                <2>         I_am_nobits    SAVE_BX,WORD            ;FT. extende open saved BX              ;AN000;
   154 0000024D ????                <2>         I_am_nobits    SAVE_SI,WORD            ;FT. extende open saved SI              ;AN000;
   155 0000024F ????                <2>         I_am_nobits    SAVE_DS,WORD            ;FT. extende open saved DS              ;AN000;
   156 00000251 ????                <2>         I_am_nobits    HIGH_SECTOR,WORD,<0>    ;>32mb higher sector #                  ;AN000;
   157 00000253 ????                <2>         I_am_nobits    HIGH_SECTOR_TEMP,WORD,<0>;>32mb high sector #                   ;AN000;
   158 00000255 ??                  <2>         I_am_nobits    DISK_FULL,BYTE          ;>32mb indicating disk full when 1      ;AN000;
   159 00000256 ????                <2>         I_am_nobits    TEMP_VAR,WORD           ; temporary variable for everyone       ;AN000;
   160 00000258 ????                <2>         I_am_nobits    TEMP_VAR2,WORD          ; temporary variable 2 for everyone     ;AN000;
   161 0000025A ??                  <2>         I_am_nobits    DrvErr,BYTE             ; used to save drive error              ;AN000;
   162 0000025B ????                <2>         I_am_nobits    DOS34_FLAG,WORD,<0>     ; common flag for DOS 3.4               ;AN000;
   163 0000025D ????????            <2>         I_am_nobits    NO_FILTER_PATH,DWORD    ; pointer to orignal path               ;AN000;
   164 00000261 ????????            <2>         I_am_nobits    NO_FILTER_DPATH,DWORD   ; pointer to orignal path of destination;AN000;
   165 00000265 ????                <2>         I_am_nobits   Callback_SS,WORD         ;AN000; call back SS for system call
   166 00000267 ????                <2>         I_am_nobits   Callback_SP,WORD         ;AN000; call back SP for system call
   167 00000269 ??                  <2>         I_am_nobits   Callback_flag,BYTE,<0>   ;AN000; call back flag
   168                              <2>  
   169                              <2>  
   170                              <2> ; make those pushes fast!!!
   171                              <2> record alignb 2, 90h
   172                              <2> StackSize   equ   180h                    ; gross but effective
   173                              <2> ;;;StackSize   =   300h                    ; This is a "trial" change IBM hasn't
   174                              <2> ;;;                                        ; made up their minds about
   175                              <2>  
   176                              <2> ;
   177                              <2> ; WARNING!!!! DskStack may grow into AUXSTACK due to interrupt service.
   178                              <2> ; This is NO problem as long as AUXSTACK comes immediately before DSKSTACK
   179                              <2> ;
   180                              <2>  
   181                              <2>         PUBLIC  RENAMEDMA,AuxStack,DskStack,IOStack
   182                              <2> RENAMEDMA   LABEL   BYTE                ; See DOS_RENAME
   183                              <2>  
   184 0000026A ??????????????????- <2>         DB      StackSize DUP (?)       ;
   184 00000273 ??????????????????- <2>
   184 0000027C ??????????????????- <2>
   184 00000285 ??????????????????- <2>
   184 0000028E ??????????????????- <2>
   184 00000297 ??????????????????- <2>
   184 000002A0 ??????????????????- <2>
   184 000002A9 ??????????????????- <2>
   184 000002B2 ??????????????????- <2>
   184 000002BB ??????????????????- <2>
   184 000002C4 ??????????????????- <2>
   184 000002CD ??????????????????- <2>
   184 000002D6 ??????????????????- <2>
   184 000002DF ??????????????????- <2>
   184 000002E8 ??????????????????- <2>
   184 000002F1 ??????????????????- <2>
   184 000002FA ??????????????????- <2>
   184 00000303 ??????????????????- <2>
   184 0000030C ??????????????????- <2>
   184 00000315 ??????????????????- <2>
   184 0000031E ??????????????????- <2>
   184 00000327 ??????????????????- <2>
   184 00000330 ??????????????????- <2>
   184 00000339 ??????????????????- <2>
   184 00000342 ??????????????????- <2>
   184 0000034B ??????????????????- <2>
   184 00000354 ??????????????????- <2>
   184 0000035D ??????????????????- <2>
   184 00000366 ??????????????????- <2>
   184 0000036F ??????????????????- <2>
   184 00000378 ??????????????????- <2>
   184 00000381 ??????????????????- <2>
   184 0000038A ??????????????????- <2>
   184 00000393 ??????????????????- <2>
   184 0000039C ??????????????????- <2>
   184 000003A5 ??????????????????- <2>
   184 000003AE ??????????????????- <2>
   184 000003B7 ??????????????????- <2>
   184 000003C0 ??????????????????- <2>
   184 000003C9 ??????????????????- <2>
   184 000003D2 ??????????????????- <2>
   184 000003DB ??????????????????- <2>
   184 000003E4 ????????????        <2>
   185                              <2> AuxStack    LABEL   BYTE
   186                              <2>  
   187 000003EA ??????????????????- <2>         DB      StackSize DUP (?)       ;
   187 000003F3 ??????????????????- <2>
   187 000003FC ??????????????????- <2>
   187 00000405 ??????????????????- <2>
   187 0000040E ??????????????????- <2>
   187 00000417 ??????????????????- <2>
   187 00000420 ??????????????????- <2>
   187 00000429 ??????????????????- <2>
   187 00000432 ??????????????????- <2>
   187 0000043B ??????????????????- <2>
   187 00000444 ??????????????????- <2>
   187 0000044D ??????????????????- <2>
   187 00000456 ??????????????????- <2>
   187 0000045F ??????????????????- <2>
   187 00000468 ??????????????????- <2>
   187 00000471 ??????????????????- <2>
   187 0000047A ??????????????????- <2>
   187 00000483 ??????????????????- <2>
   187 0000048C ??????????????????- <2>
   187 00000495 ??????????????????- <2>
   187 0000049E ??????????????????- <2>
   187 000004A7 ??????????????????- <2>
   187 000004B0 ??????????????????- <2>
   187 000004B9 ??????????????????- <2>
   187 000004C2 ??????????????????- <2>
   187 000004CB ??????????????????- <2>
   187 000004D4 ??????????????????- <2>
   187 000004DD ??????????????????- <2>
   187 000004E6 ??????????????????- <2>
   187 000004EF ??????????????????- <2>
   187 000004F8 ??????????????????- <2>
   187 00000501 ??????????????????- <2>
   187 0000050A ??????????????????- <2>
   187 00000513 ??????????????????- <2>
   187 0000051C ??????????????????- <2>
   187 00000525 ??????????????????- <2>
   187 0000052E ??????????????????- <2>
   187 00000537 ??????????????????- <2>
   187 00000540 ??????????????????- <2>
   187 00000549 ??????????????????- <2>
   187 00000552 ??????????????????- <2>
   187 0000055B ??????????????????- <2>
   187 00000564 ????????????        <2>
   188                              <2> DskStack    LABEL   BYTE
   189                              <2>  
   190 0000056A ??????????????????- <2>         DB      StackSize DUP (?)       ;
   190 00000573 ??????????????????- <2>
   190 0000057C ??????????????????- <2>
   190 00000585 ??????????????????- <2>
   190 0000058E ??????????????????- <2>
   190 00000597 ??????????????????- <2>
   190 000005A0 ??????????????????- <2>
   190 000005A9 ??????????????????- <2>
   190 000005B2 ??????????????????- <2>
   190 000005BB ??????????????????- <2>
   190 000005C4 ??????????????????- <2>
   190 000005CD ??????????????????- <2>
   190 000005D6 ??????????????????- <2>
   190 000005DF ??????????????????- <2>
   190 000005E8 ??????????????????- <2>
   190 000005F1 ??????????????????- <2>
   190 000005FA ??????????????????- <2>
   190 00000603 ??????????????????- <2>
   190 0000060C ??????????????????- <2>
   190 00000615 ??????????????????- <2>
   190 0000061E ??????????????????- <2>
   190 00000627 ??????????????????- <2>
   190 00000630 ??????????????????- <2>
   190 00000639 ??????????????????- <2>
   190 00000642 ??????????????????- <2>
   190 0000064B ??????????????????- <2>
   190 00000654 ??????????????????- <2>
   190 0000065D ??????????????????- <2>
   190 00000666 ??????????????????- <2>
   190 0000066F ??????????????????- <2>
   190 00000678 ??????????????????- <2>
   190 00000681 ??????????????????- <2>
   190 0000068A ??????????????????- <2>
   190 00000693 ??????????????????- <2>
   190 0000069C ??????????????????- <2>
   190 000006A5 ??????????????????- <2>
   190 000006AE ??????????????????- <2>
   190 000006B7 ??????????????????- <2>
   190 000006C0 ??????????????????- <2>
   190 000006C9 ??????????????????- <2>
   190 000006D2 ??????????????????- <2>
   190 000006DB ??????????????????- <2>
   190 000006E4 ????????????        <2>
   191                              <2> IOStack LABEL   BYTE
   192                              <2>  
   193                              <2>  
   194                              <2> ; patch space for Boca folks.
   195                              <2> ; Say What????!!! This does NOT go into the swappable area!
   196                              <2> ; NOTE: We include the decl of ibmpatch in ms-dos even though it is not needed.
   197                              <2> ;       This allows the REDIRector to work on either IBM or MS-DOS.
   198                              <2>  
   199                              <2> PUBLIC  IBMPATCH
   200                              <2> IBMPATCH    label byte
   201 000006EA ??                  <2>         I_am_nobits    PRINTER_FLAG,BYTE,<0>   ; [SYSTEM] status of PRINT utility
   202 000006EB ??                  <2>         I_am_nobits    VOLCHNG_FLAG,BYTE,<0>   ; [SYSTEM] true if volume label created
   203 000006EC ??                  <2>         I_am_nobits    VIRTUAL_OPEN,BYTE,<0>   ; [SYSTEM] non-zero if we opened a virtual file
   204                              <2>  
   205                              <2> ; Following 4 variables moved to MSDATA.asm from MSTABLE.asm (P4986)
   206 000006ED ??                  <2>       I_am_nobits     FSeek_drive,BYTE         ;AN000; fastseek drive #
   207 000006EE ????                <2>       I_am_nobits     FSeek_firclus,WORD       ;AN000; fastseek first cluster #
   208 000006F0 ????                <2>       I_am_nobits     FSeek_logclus,WORD       ;AN000; fastseek logical cluster #
   209 000006F2 ????                <2>       I_am_nobits     FSeek_logsave,WORD       ;AN000; fastseek returned log clus #
   210                              <2> %ifndef BUF2
   211                              <2>       record {I_am_nobits     ACT_PAGE,WORD,<-1>}, 255       ;;;;;;; ;BL ; active EMS page                       ;AN000;
   212                              <2> %endif
   213                              <2> 
   214                              <2> ; lDOS extensions
   215                              <2> record alignb 2, 90h
   216 000006F4 ????                <2> 	I_am_nobits	CLUSTER_FACTOR_EDR,WORD
   217 000006F6 ????                <2> 	I_am_nobits	CLUSTER_NEXT_EDR,WORD
   218 000006F8 ????                <2> 	I_am_nobits	dosdata_to_doscode,WORD
   219                              <2> dosdata_to_doscode_segment equ dosdata_to_doscode
   220                              <2> 	global dosdata_to_doscode_segment
   221 000006FA ????                <2> 	record {I_am_nobits	first_umcb, word, <-1>}, 255
   222 000006FC ??                  <2> 	I_am_nobits	enable_uma, byte
   223 000006FD ??                  <2> 	I_am_nobits	alloc_strategy_ext, byte
   224 000006FE ????                <2> 	I_am_nobits	first_hmcb, word
   225 00000700 ??                  <2> 	I_am_nobits	doslocation3306, byte
   226 00000701 ??                  <2> 	I_am_nobits	doslocation3001, byte
   227 00000702 ????                <2> 	I_am_nobits	nextmcbinput, word
   228 00000704 ????                <2> 	I_am_nobits	haltflags, word
   229 00000706 ????                <2> 	I_am_nobits	backdoor_free_mcb_exec, word
   230 00000708 ????????            <2> 	record {I_am_nobits	backdoor_indicator, dword, <-1, -1>}, 255
   231                              <2> 
   232 0000070C ????????            <2> 	I_am_nobits	shell_return_address, dword
   233 00000710 ??                  <2> 	record {I_am_nobits	shell_return_has_been_freed, byte, <-1>}, 255
   234 00000711 ??                  <2> 	I_am_nobits	create_redirector_called, byte
   235                              <2> 
   236                              <2> SWAP_END    LABEL   BYTE
   237                              <2> PUBLIC  SWAP_END
   238                              <2>  
   239                              <2> ; THE FOLLOWING BYTE MUST BE HERE, IMMEDIATELY FOLLOWING SWAP_END. IT CANNOT
   240                              <2> ;   BE USED. If the size of the swap data area is ODD, it will be rounded up
   241                              <2> ;   to include this byte.
   242 00000712 ??                  <2>         DB      ?
   243                              <2>  
   244                              <2> ibmpatch equ IBMPATCH	; NASM port label
   245 00000713 ??????????????????- <2>             DB      (512+80+32-(SWAP_END-ibmpatch)) DUP (?)
   245 0000071C ??????????????????- <2>
   245 00000725 ??????????????????- <2>
   245 0000072E ??????????????????- <2>
   245 00000737 ??????????????????- <2>
   245 00000740 ??????????????????- <2>
   245 00000749 ??????????????????- <2>
   245 00000752 ??????????????????- <2>
   245 0000075B ??????????????????- <2>
   245 00000764 ??????????????????- <2>
   245 0000076D ??????????????????- <2>
   245 00000776 ??????????????????- <2>
   245 0000077F ??????????????????- <2>
   245 00000788 ??????????????????- <2>
   245 00000791 ??????????????????- <2>
   245 0000079A ??????????????????- <2>
   245 000007A3 ??????????????????- <2>
   245 000007AC ??????????????????- <2>
   245 000007B5 ??????????????????- <2>
   245 000007BE ??????????????????- <2>
   245 000007C7 ??????????????????- <2>
   245 000007D0 ??????????????????- <2>
   245 000007D9 ??????????????????- <2>
   245 000007E2 ??????????????????- <2>
   245 000007EB ??????????????????- <2>
   245 000007F4 ??????????????????- <2>
   245 000007FD ??????????????????- <2>
   245 00000806 ??????????????????- <2>
   245 0000080F ??????????????????- <2>
   245 00000818 ??????????????????- <2>
   245 00000821 ??????????????????- <2>
   245 0000082A ??????????????????- <2>
   245 00000833 ??????????????????- <2>
   245 0000083C ??????????????????- <2>
   245 00000845 ??????????????????- <2>
   245 0000084E ??????????????????- <2>
   245 00000857 ??????????????????- <2>
   245 00000860 ??????????????????- <2>
   245 00000869 ??????????????????- <2>
   245 00000872 ??????????????????- <2>
   245 0000087B ??????????????????- <2>
   245 00000884 ??????????????????- <2>
   245 0000088D ??????????????????- <2>
   245 00000896 ??????????????????- <2>
   245 0000089F ??????????????????- <2>
   245 000008A8 ??????????????????- <2>
   245 000008B1 ??????????????????- <2>
   245 000008BA ??????????????????- <2>
   245 000008C3 ??????????????????- <2>
   245 000008CC ??????????????????- <2>
   245 000008D5 ??????????????????- <2>
   245 000008DE ??????????????????- <2>
   245 000008E7 ??????????????????- <2>
   245 000008F0 ??????????????????- <2>
   245 000008F9 ??????????????????- <2>
   245 00000902 ??????????????????- <2>
   245 0000090B ??????????????????- <2>
   245 00000914 ??????????????????- <2>
   245 0000091D ??????????????????- <2>
   245 00000926 ??????????????????- <2>
   245 0000092F ??????????????????- <2>
   245 00000938 ??????????????????- <2>
   245 00000941 ??????????????????- <2>
   245 0000094A ??????????????????- <2>
   245 00000953 ????????????????    <2>
   246                              <2>  
   247                              <2> MSDAT001e       label byte
   248                              <2>  
   249                              <2> ;.xall
   250                              <2>  
   251                              <2> ; (no prior section) ; DATA    ENDS
   252                              <2> 
    38                              <1> ;=== Pop trace listing source
    39                              <1> ;=== Push trace listing source: dosinit.nas
    40                              <1> %include "dosinit.nas" ; NASM included file
     1                              <2> ;	SCCSID = @(#)msinit.asm 1.2 85/07/23
     2                              <2> ; TITLE MSINIT.ASM -- MS-DOS INITIALIZATION CODE
     3                              <2> ; AN000 version 4.0 Jan. 1988
     4                              <2> ; AN007 PTM 3957 - fake version for IBMCACHE.COM
     5                              <2> ; AN008 PTM 4070 - fake version for MS WINDOWS
     6                              <2> [list -]
     6          ******************  <2>  warning: out: ... CLONE version build switch on ... [-w+user]
    11                              <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
    12                              <2> %include "lstruct.mac"
     1                              <3> [list -]
    13                              <3> [list -]
    13                              <2> %include "entryseg.nas"
     1                              <3> 
     2                              <3> %ifndef ENTRYSEGNAS
     3                              <3> %define ENTRYSEGNAS 1
     4                              <3> 
     5                              <3> %include "lmacros3.mac"
     6                              <3> %include "entrysw.mac"
     7                              <3> [list -]
     8                              <3> 
     9                              <3> %define HARDALIGN 2
    10                              <3> %ifdef MSHARD
    11                              <3>  %define HARDALIGN 16
    12                              <3> %endif
    13                              <3> 
    14                              <3> %if _RELOCATEDOSCODE
    15                              <3>  %define DOSENTRYCLASS DOSENTRY
    16                              <3> %else
    17                              <3>  %define DOSENTRYCLASS DOSCODE
    18                              <3> %endif
    19                              <3> 
    20                              <3> addsection DOSENTRY, class=%[DOSENTRYCLASS]
    21                              <3> %ifn _RELOCATEDOSCODE
    22                              <3>  [list +]
    23                              <3>  %define DOSENTRYGROUP DOSCODEGROUP
    24                              <3>  [list -]
    25                              <3>  %include "dcodeseg.nas"
    26                              <3> %endif
    27                              <3> addsection DOSENTRYHARD, class=%[DOSENTRYCLASS] align=HARDALIGN
    28                              <3> addsection DOSENTRYINIT, class=%[DOSENTRYCLASS] align=2
    29                              <3> 
    30                              <3> %if _RELOCATEDOSCODE
    31                              <3> group DOSENTRYGROUP DOSENTRY DOSENTRYHARD DOSENTRYINIT
    32                              <3> %else
    33                              <3>  group DOSCODEGROUP DOSENTRY 	DOSCODETABLE DOSCODECODE DOSBIOCODE BIOCODE 	DOSENTRYHARD DOSENTRYINIT
    36                              <3> %endif
    37                              <3> 
    38                              <3> [list +]
    39                              <3> usesection DOSENTRY
    40                              <3> 
    41                              <3> %endif
    14                              <2> [list +]
    15                              <2> 
    16                              <2> extern i20, i21, i25, i26, i27, i2F, i2D, call5, i23, i24, entry_iret, i31
    17                              <2> 
    18                              <2> 	I_need	DMAAdd,DWORD		; current dma address
    19                              <2> 	I_need	DPBHead,DWORD		; long pointer to DPB chain
    20                              <2> 	I_need	SFT_Addr,DWORD		; pointer to open file list
    21                              <2> 	I_need	NumIO,BYTE		; number of physical drives
    22                              <2> 	I_need	BuffHead,DWORD		; pointer to buffer chain
    23                              <2> 	I_need	EndMem,WORD		; first unavailable address in memory
    24                              <2> 	I_need	CurrentPDB,WORD 	; current process ID
    25                              <2> 	I_need	CreatePDB,BYTE		; TRUE => create a new PDB
    26                              <2> 	I_need	Arena_Head,WORD 	; paragraph address of head of arena
    27                              <2> 	I_need	sfTabl,BYTE		; internal file table
    28                              <2> 	I_need	SysInitVar,BYTE 	; label for internal structures
    29                              <2> 	I_need	NulDev,DWORD		; long pointer to device chain
    30                              <2> 	I_need	BCon,DWORD		; pointer to console device
    31                              <2> 	I_need	BClock,DWORD		; pointer to clock device
    32                              <2> 	I_need	CallUnit,BYTE		; unit field in dd packet
    33                              <2> 	I_need	CallBPB,DWORD		; returned BPB from DD
    34                              <2> 	I_need	Maxsec,WORD
    35                              <2> 	I_need	Dskchret,BYTE
    36                              <2> 	I_need	Devcall,BYTE
    37                              <2> 	i_need	Header,BYTE
    38                              <2> 	I_need	JShare,DWORD
    39                              <2> 	I_need	COUNTRY_CDPG,BYTE	 ; country info table, DOS 3.3
    40                              <2> 	I_need	SysInitTable,BYTE	 ; sys init table for SYSINIT
    41                              <2> 	I_need	FastOpenTable,BYTE	 ; table for FASTOPEN
    42                              <2> 	I_need	FETCHI_TAG,WORD 	 ; TAG CHECK
    43                              <2> 	I_need	Special_Entries,WORD	 ; address of special entries ;AN007;
    44                              <2> 	I_need	IFS_DOS_CALL,DWORD	 ; IFS IBMDOS CALL entry      ;AN000;
    45                              <2> 	I_need	HASHINITVAR,WORD	 ; hash table variables       ;AN000;
    46                              <2> 	I_need	Packet_Temp,WORD	 ; used for initial Hash table;AN000;
    47                              <2> 	I_need	BUF_HASH_PTR,DWORD	 ; used for initial Hash table;AN000;
    48                              <2> 	I_need	SWAP_ALWAYS_AREA,DWORD	 ; swap always area addr    ;AN000;
    49                              <2> 	I_need	SWAP_ALWAYS_AREA_LEN,WORD; swap always area length  ;AN000;
    50                              <2> 	I_need	SWAP_IN_DOS,DWORD	 ; swap in dos area	    ;AN000;
    51                              <2> 	I_need	SWAP_IN_DOS_LEN,WORD	 ; swap in dos area length  ;AN000;
    52                              <2> 	I_need	SWAP_AREA_LEN,WORD	 ; swap area length	    ;AN000;
    53                              <2> 	I_need	SWAP_START,BYTE 	 ; swap start addr	    ;AN000;
    54                              <2> 	I_need	SWAP_ALWAYS,BYTE	 ; swap always addr	    ;AN000;
    55                              <2> 	I_need	Hash_Temp,WORD		 ; temporary Hash table     ;AN000;
    56                              <2> 
    57                              <2> 	i_need	CallDevAd,DWORD
    58                              <2> 
    59                              <2> section DATA
    60                              <2> 	; ORG	0			; reset to beginning of data segment
    61                              <2> 
    62                              <2> %ifdef DONOBITS
    63 00000953 <rep 95Bh>          <2>  [list -]
   168                              <2> 
   169                              <2> ; (no prior section) ; DATA	ENDS
   170                              <2> 
   171                              <2> ; the next segment defines a new class that MUST appear last in the link map.
   172                              <2> ; This defines several important locations for the initialization process that
   173                              <2> ; must be the first available locations of free memory.
   174                              <2> 
   175                              <2> section LAST
   176                              <2> 
   177                              <2> %ifdef DONOBITS
   178                              <2>  [list -]
  1242                              <2> 
  1243                              <2> ; (no prior section) ; LAST	ENDS
    41                              <1> ;=== Pop trace listing source
    42                              <1> 	END
