;       SCCSID = @(#)mstable.asm        6.5 92/01/30
;**     MSTABLE -- OEM independent constant data
;
;
;       IBM/Microsoft Confidential
;
;       Copyright (c) IBM Corporation 1987, 1989
;       Copyright (c) Microsoft Corporation 1987, 1989
;
;       All non-OEM configurable constant data and tables are
;       declared here.
;
;       04/18/84        EKE
;           All variables used by the redirector have been marked with the
;           comment "*REDIR*".  If those variables are changed in any way,
;           make sure that the changes are also made in the redirector.
;
;       02/24/86        KCD
;           Switched order of minor and major version numbers in MSVERS.  The
;           w_Get_Version needs the bytes swapped for Dos 5 calls.
;           Int 21 call has also been corrected to reflect the change.
;
;       04/15/88        CWL
;           Added ah=6Ch and 69h for extended attribute support.
;

NAME    MSTABLE
.xlist
.xcref
include basemid.inc
include basemaca.inc
include osmaca.inc
include dosseg.inc
include dossymc.inc
include syscalls.inc
include error.inc
include protmode.inc
.cref
.list

        ReferFlat       _TKSSBase,DWORD
        ReferGDT        GDT_RDR1,QWORD
        ReferGDT        GDT_REDIR,QWORD

        ReferGlobal CDSAddr,DWORD
        ReferGlobal InterruptLevel,BYTE
        ReferGlobal InDos,WORD
        ReferGlobal PhysDiskTablePtr,DWORD

        EXTRNFAR        AsgCheckDrive
        EXTRNFAR        doshlp_RedirDev
        EXTRNFAR        GoProtAll
        EXTRNFAR        GoRealAll
        EXTRNFAR        HardError
        EXTRNFAR        MemMapAlias
        EXTRNFAR        MemUnmapAlias
        EXTRNFAR        SegGetInfo
        EXTRNFAR        SFFromSFN
        EXTRNFAR        UCase
        EXTRN32         intSwitchStack
        ReferFlat       privateStack,DWORD
        EXTRN32         ReserveVM                                       ;novell
        EXTRN32         forceEMHandler                                  ;b726833
        ReferFlat       _pgpPageDir,DWORD                               ;novell



DATA segment

;
; We need to map old int 24 errors and device driver errors into the new set
; of errors.  The following table is indexed by the new errors
;
        public  ErrMap24
ErrMap24    label   byte
    DB  ERROR_WRITE_PROTECT             ;   0
    DB  ERROR_BAD_UNIT                  ;   1
    DB  ERROR_NOT_READY                 ;   2
    DB  ERROR_BAD_COMMAND               ;   3
    DB  ERROR_CRC                       ;   4
    DB  ERROR_BAD_LENGTH                ;   5
    DB  ERROR_SEEK                      ;   6
    DB  ERROR_NOT_DOS_DISK              ;   7
    DB  ERROR_SECTOR_NOT_FOUND          ;   8
    DB  ERROR_OUT_OF_PAPER              ;   9
    DB  ERROR_WRITE_FAULT               ;   A
    DB  ERROR_READ_FAULT                ;   B
    DB  ERROR_GEN_FAILURE               ;   C
    DB  ERROR_DISK_CHANGE               ;   D
    DB  ERROR_GEN_FAILURE               ;   E   RESERVED
    DB  ERROR_WRONG_DISK                ;   F
    DB  ERROR_UNCERTAIN_MEDIA           ;   10
    DB  ERROR_INTERRUPT                 ;   11
    DB  ERROR_MONITORS_NOT_SUPPORTED    ;   12
    DB  ERROR_INVALID_PARAMETER         ;   13
    DB  ERROR_DEVICE_IN_USE             ;   14

Public  ErrMap24End
ErrMap24End LABEL   BYTE        ; *REDIR*

;
; We need to map old int 24 errors and device driver errors into the new set
; of message numbers for the harderror daemon to show the device name in
; the hard error popup.  The following table is indexed by the new errors.
; This is only for errors from a device driver request packet.
;
; NOTE: The entries that are zero will be ignored by the hard error
;       routine, and the daemon will use the value in AX.
;       See harderr.asm for more details.
;

        public  MsgMap24
MsgMap24    label   byte

    DB  MSG_ERROR_WRITE_PROTECT         ;   0
    DB  MSG_ERROR_BAD_UNIT              ;   1
    DB  MSG_ERROR_NOT_READY             ;   2
    DB  MSG_ERROR_BAD_COMMAND           ;   3
    DB  MSG_ERROR_CRC                   ;   4
    DB  MSG_ERROR_BAD_LENGTH            ;   5
    DB  MSG_ERROR_SEEK                  ;   6
    DB  MSG_ERROR_NOT_DOS_DISK          ;   7
    DB  MSG_ERROR_SECTOR_NOT_FOUND      ;   8
    DB  MSG_ERROR_OUT_OF_PAPER          ;   9
    DB  MSG_ERROR_WRITE_FAULT           ;   A
    DB  MSG_ERROR_READ_FAULT            ;   B
    DB  MSG_ERROR_GEN_FAILURE           ;   C
    DB  MSG_ERROR_DISK_CHANGE           ;   D
    DB  0                               ;   E
    DB  0                               ;   F
    DB  0                               ;   10
    DB  0                               ;   11
    DB  0                               ;   12
    DB  0                               ;   13
    DB  MSG_DEVICE_IN_USE               ;   14

Public  MsgMap24End
MsgMap24End LABEL   BYTE

DATA ends


TABLE   SEGMENT
TableZero   LABEL   BYTE

        PUBLIC  MSVERS

MSVERS  EQU     THIS WORD       ; MS-DOS version in hex for w_Get_Version
MSMINOR DB      MINOR_VERSION
MSMAJOR DB      MAJOR_VERSION

        PUBLIC  YRTAB,MONTAB
YRTAB   DB      200,166,200,165,200,165,200,165         ; *REDIR*
MONTAB  DB      31,28,31,30,31,30,31,31,30,31,30,31     ; *REDIR*

; I21_MAP_E_TAB - INT 21 error mapping table
;
; This is the error code mapping table for INT 21 errors.  This table in
; conjunction with the next table defines error mappings to change one error
; code to another (usually to map a protect mode error to a compatable 3x
; error), and error codes which are "allowed" for each system call.  If the
; error code ABOUT to be returned is not "allowed" for the call, the correct
; action is to return the "real" error via Extended error, and one of the
; allowed errors on the actual call.
;
; The table is organized as follows:
;
;       byte    call            int 21 function number
;       byte    count           total bytes following this byte for this entry
;       byte    nmaps           number of mapping entries (can be 0)
;        word   from,to         mapping entries...
;       byte    nlegal          number of legal error codes (at least 1)
;        byte   legal           legal error codes...
;
; two macros are used to build the table entries:
;   E21 call,nummaps,<<map>,<mapn>>,numlegalerrors
;   E21legal <error1,error2>
;   where:
;       call = int 21 function #
;       nummaps = number of mapping entries
;       map  = <from,to>
;       numlegalerrors = number of legal error codes
;
; two macros are used instead of one because one line is too long for the
; assembler.
;
; EXAMPLE:
;       E21 Open,1,<<INVALID_DRIVE,PATH_NOT_FOUND>>,5
;       E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,INVALID_ACCESS,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
;
;       Generates:
;       DB      3d, 0b, 01, 000f,0003, 05, 03,02,0c,04,05
;
; There are a number of calls (for instance all of the FCB calls) for which
;   there is NO entry.  This means that NO error codes are returned on this
;   call, so set up an Extended error and leave the current error code alone.
;
; The table is terminated by a call value of 0FFh

E21     macro   call,nummap,maps,numlegal
        LOCAL size

        ;; nmap + 4 bytes per map + nlegal + 1 byte per legal
        size = 1+nummap*4 + 1+numlegal      ;; size after call,count
        IF size GE 256
            IF2
                .err
                %out E21: entry too large
            ENDIF
        ENDIF

        IF numlegal EQ 0
            IF2
                .err
                %out E21: must have at least one valid error code
            ENDIF
        ENDIF

        db      call
        db      size
        db      nummap
        IRP     map,<maps>
            IRP tmp,<map>
                dw      ERROR_&&&tmp
            ENDM
        ENDM
        db      numlegal
endm


E21legal macro   legals

        IRP     legal,<legals>
                db      ERROR_&&legal
        ENDM
endm


        public  I21_MAP_E_TAB
I21_MAP_E_TAB   label   byte
    E21 INTERNATIONAL,0,<>,1
    E21legal <FILE_NOT_FOUND>
    E21 MKDIR,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,3
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,ACCESS_DENIED>
    E21 RMDIR,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,4
    E21legal <CURRENT_DIRECTORY,PATH_NOT_FOUND,FILE_NOT_FOUND,ACCESS_DENIED>
    E21 CHDIR,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,2
    E21legal <FILE_NOT_FOUND,PATH_NOT_FOUND>
    E21 CREAT,3,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>,<INVALID_NAME,FILE_NOT_FOUND>>,4
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
    E21 OPEN,4,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>,<INVALID_DRIVE,PATH_NOT_FOUND>,<INVALID_NAME,FILE_NOT_FOUND>>,5
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,INVALID_ACCESS,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
    E21 CLOSE,0,<>,1
    E21legal <INVALID_HANDLE>
    E21 READ,0,<>,2
    E21legal <INVALID_HANDLE,ACCESS_DENIED>
    E21 WRITE,0,<>,2
    E21legal <INVALID_HANDLE,ACCESS_DENIED>
    E21 UNLINK,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,3
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,ACCESS_DENIED>
    E21 LSEEK,0,<>,2
    E21legal <INVALID_HANDLE,INVALID_FUNCTION>
    E21 CHMOD,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,4
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,INVALID_FUNCTION,ACCESS_DENIED>
    E21 IOCTL,0,<>,5
    E21legal <INVALID_DRIVE,INVALID_DATA,INVALID_FUNCTION,INVALID_HANDLE,ACCESS_DENIED>
    E21 XDUP,0,<>, 2
    E21legal <INVALID_HANDLE,TOO_MANY_OPEN_FILES>
    E21 XDUP2,0,<>,2
    E21legal <INVALID_HANDLE,TOO_MANY_OPEN_FILES>
    E21 CURRENT_DIR,0,<>,1
    E21legal <INVALID_DRIVE>
    E21 ALLOC,0,<>,2
    E21legal <ARENA_TRASHED,NOT_ENOUGH_MEMORY>
    E21 DEALLOC,0,<>,2
    E21legal <ARENA_TRASHED,INVALID_BLOCK>
    E21 SETBLOCK,0,<>,3
    E21legal <ARENA_TRASHED,INVALID_BLOCK,NOT_ENOUGH_MEMORY>
    E21 EXEC,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,8
    E21legal <PATH_NOT_FOUND,INVALID_FUNCTION,FILE_NOT_FOUND,TOO_MANY_OPEN_FILES,BAD_FORMAT,BAD_ENVIRONMENT,NOT_ENOUGH_MEMORY,ACCESS_DENIED>
    E21 FIND_FIRST,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,3
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,NO_MORE_FILES>
    E21 FIND_NEXT,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,1
    E21legal <NO_MORE_FILES>
    E21 RENAME,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,4
    E21legal <NOT_SAME_DEVICE,PATH_NOT_FOUND,FILE_NOT_FOUND,ACCESS_DENIED>
    E21 FILE_TIMES,0,<>,2
    E21legal <INVALID_HANDLE,INVALID_FUNCTION>
    E21 CreateTempFile,3,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>,<INVALID_NAME,FILE_NOT_FOUND>>,4
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
    E21 CreateNewFile,3,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>,<INVALID_NAME,FILE_NOT_FOUND>>,5
    E21legal <FILE_EXISTS,PATH_NOT_FOUND,FILE_NOT_FOUND,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
    E21 LockOper,0,<>,4
    E21legal <INVALID_HANDLE,INVALID_FUNCTION,SHARING_BUFFER_EXCEEDED,LOCK_VIOLATION>
    E21 CpSwitch,0,<>,3
    E21legal <INVALID_FUNCTION,NETWORK_ACCESS_DENIED,FILE_NOT_FOUND>
    E21 Get_ECI,0,<>,3
    E21legal <INVALID_FUNCTION,NETWORK_ACCESS_DENIED,FILE_NOT_FOUND>
    E21 Open2,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,5
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,INVALID_ACCESS,TOO_MANY_OPEN_FILES,ACCESS_DENIED>
    E21 MkDir2,2,<<META_EXPANSION_TOO_LONG,FILE_NOT_FOUND>,<FILENAME_EXCED_RANGE,FILE_NOT_FOUND>>,3
    E21legal <PATH_NOT_FOUND,FILE_NOT_FOUND,ACCESS_DENIED>
    DB  0FFh

;
; The following table defines CLASS ACTION and LOCUS info for the INT 21H
; errors.  Each entry is 4 bytes long:
;
;       Err#,Class,Action,Locus
;
; A value of 0FFh indicates a call specific value (ie.  should already
; be set).  AN ERROR CODE NOT IN THE TABLE FALLS THROUGH TO THE CATCH ALL AT
; THE END, IT IS ASSUMED THAT CLASS, ACTION, LOCUS ARE ALREADY SET.
ErrTab  macro   err,class,action,locus
ifidn <locus>,<0FFh>
    DB  ERROR_&err,ERRCLASS_&class,ERRACT_&action,0FFh
else
    DB  ERROR_&err,ERRCLASS_&class,ERRACT_&action,ERRLOC_&locus
endif
        endm

        public  Err_Table_21
Err_Table_21    label   byte
    ErrTab  INVALID_FUNCTION,       APPERR,     ABORT,      0FFh
    ErrTab  FILE_NOT_FOUND,         NOTFND,     USER,       DISK
    ErrTab  PATH_NOT_FOUND,         NOTFND,     USER,       DISK
    ErrTab  TOO_MANY_OPEN_FILES,    OUTRES,     ABORT,      UNK
    ErrTab  ACCESS_DENIED,          AUTH,       USER,       0FFh
    ErrTab  INVALID_HANDLE,         APPERR,     ABORT,      UNK
    ErrTab  ARENA_TRASHED,          APPERR,     PANIC,      MEM
    ErrTab  NOT_ENOUGH_MEMORY,      OUTRES,     ABORT,      MEM
    ErrTab  INVALID_BLOCK,          APPERR,     ABORT,      MEM
    ErrTab  BAD_ENVIRONMENT,        APPERR,     ABORT,      MEM
    ErrTab  BAD_FORMAT,             BADFMT,     USER,       UNK
    ErrTab  INVALID_ACCESS,         APPERR,     ABORT,      UNK
    ErrTab  INVALID_DATA,           BADFMT,     ABORT,      UNK
    ErrTab  INVALID_DRIVE,          NOTFND,     USER,       DISK
    ErrTab  CURRENT_DIRECTORY,      AUTH,       USER,       DISK
    ErrTab  NOT_SAME_DEVICE,        UNK,        USER,       DISK
    ErrTab  NO_MORE_FILES,          NOTFND,     USER,       DISK
    ErrTab  FILE_EXISTS,            ALREADY,    USER,       DISK
    ErrTab  SHARING_VIOLATION,      LOCKED,     DLYRET,     DISK
    ErrTab  LOCK_VIOLATION,         LOCKED,     DLYRET,     DISK
    ErrTab  OUT_OF_STRUCTURES,      OUTRES,     ABORT,      0FFh
    ErrTab  INVALID_PASSWORD,       AUTH,       USER,       UNK
    ErrTab  CANNOT_MAKE,            OUTRES,     ABORT,      DISK
    ErrTab  NOT_SUPPORTED,          BADFMT,     USER,       NET
    ErrTab  ALREADY_ASSIGNED,       ALREADY,    USER,       NET
    ErrTab  INVALID_PARAMETER,      BADFMT,     USER,       UNK
    ErrTab  FAIL_I24,               UNK,        ABORT,      UNK
    ErrTab  SHARING_BUFFER_EXCEEDED,OUTRES,     ABORT,      MEM

;   Dos 5 error codes

    ErrTab  NETWORK_ACCESS_DENIED,  APPERR,     ABORT,      UNK
    ErrTab  DUP_FCB,                UNK,        ABORT,      UNK
    ErrTab  INTERRUPT,              UNK,        RETRY,      UNK
    ErrTab  DRIVE_LOCKED,           LOCKED,     DLYRET,     DISK
    ErrTab  OPEN_FAILED,            NOTFND,     USER,       UNK
    ErrTab  BUFFER_OVERFLOW,        APPERR,     RETRY,      MEM
    ErrTab  DISK_FULL,              OUTRES,     USER,       DISK
    ErrTab  NO_MORE_SEARCH_HANDLES  OUTRES,     ABORT,      UNK
    ErrTab  INVALID_TARGET_HANDLE   APPERR,     ABORT,      UNK
    ErrTab  VIOKBD_REQUEST          APPERR,     ABORT,      UNK
    ErrTab  INVALID_CATEGORY        APPERR,     ABORT,      UNK
    ErrTab  INVALID_VERIFY_SWITCH   APPERR,     ABORT,      UNK
    ErrTab  BAD_DRIVER_LEVEL        APPERR,     ABORT,      DISK
    ErrTab  INVALID_NAME,           BADFMT,     USER,       UNK
    ErrTab  DIRECT_ACCESS_HANDLE,   CANT,       ABORT,      DISK
    ErrTab  BUSY_DRIVE,             ALREADY,    DLYRET,     DISK
    ErrTab  SAME_DRIVE,             CANT,       USER,       UNK
    ErrTab  DIR_NOT_ROOT,           CANT,       USER,       DISK
    ErrTab  DIR_NOT_EMPTY,          CANT,       USER,       DISK
    ErrTab  PATH_BUSY,              ALREADY,    USER,       UNK
    ErrTab  LABEL_TOO_LONG,         BADFMT,     USER,       DISK
    ErrTab  NOT_LOCKED,             CANT,       ABORT,      UNK
    ErrTab  BAD_ARGUMENTS,          BADFMT,     ABORT,      UNK
    ErrTab  BAD_PATHNAME,           BADFMT,     USER,       UNK
    ErrTab  ALREADY_EXISTS,         ALREADY,    USER,       UNK
    ErrTab  NOT_CURRENT_CTRY,       CANT,       ABORT,      UNK
    DB      0FFh,                   0FFH,       0FFH,       0FFh

;
; The following table defines CLASS ACTION and LOCUS info for the INT 24H
; errors.  Each entry is 4 bytes long:
;
;       Err#,Class,Action,Locus
;
; A Locus value of 0FFh indicates a call specific value (ie.  should already
; be set).  AN ERROR CODE NOT IN THE TABLE FALLS THROUGH TO THE CATCH ALL AT
; THE END.

        public  Err_Table_24
Err_Table_24    label   byte
    ErrTab  WRITE_PROTECT,          MEDIA,      INTRET,     DISK
    ErrTab  BAD_UNIT,               INTRN,      PANIC,      UNK
    ErrTab  NOT_READY,              HRDFAIL,    INTRET,     0FFh
    ErrTab  BAD_COMMAND,            INTRN,      PANIC,      UNK
    ErrTab  CRC,                    MEDIA,      ABORT,      DISK
    ErrTab  BAD_LENGTH,             INTRN,      PANIC,      UNK
    ErrTab  SEEK,                   HRDFAIL,    RETRY,      DISK
    ErrTab  NOT_DOS_DISK,           MEDIA,      INTRET,     DISK
    ErrTab  SECTOR_NOT_FOUND,       MEDIA,      ABORT,      DISK
    ErrTab  OUT_OF_PAPER,           TEMPSIT,    INTRET,     SERDEV
    ErrTab  WRITE_FAULT,            HRDFAIL,    ABORT,      0FFh
    ErrTab  READ_FAULT,             HRDFAIL,    ABORT,      0FFh
    ErrTab  GEN_FAILURE,            UNK,        ABORT,      0FFh
    ErrTab  SHARING_VIOLATION,      LOCKED,     DLYRET,     DISK
    ErrTab  LOCK_VIOLATION,         LOCKED,     DLYRET,     DISK
    ErrTab  DISK_CHANGE,            MEDIA,      USER,       DISK
    ErrTab  WRONG_DISK,             MEDIA,      INTRET,     DISK
    ErrTab  NOT_SUPPORTED,          BADFMT,     USER,       NET
    ErrTab  FCB_UNAVAILABLE,        APPERR,     ABORT,      UNK
    ErrTab  SHARING_BUFFER_EXCEEDED,OUTRES,     ABORT,      MEM
    ErrTab  UNCERTAIN_MEDIA,        INTRN,      ABORT,      DISK
    ErrTab  MONITORS_NOT_SUPPORTED, CANT,       ABORT,      UNK
    ErrTab  INVALID_PARAMETER,      BADFMT,     USER,       UNK
    DB      0FFh,                   ERRCLASS_UNK, ERRACT_PANIC, 0FFh


        FARCODE LOW
CODE    SEGMENT

if 0 ; BUGBUG danno 01-Dec-1988
     ; real-mode code is dead
; Temp dummy entry for system calls

Procedure $BAD,,LOCAL
        error   ERROR_INVALID_FUNCTION
        ret
EndProc   $BAD

endif ; BUGBUG danno 01-Dec-1988

;***    Code area used by redirector.

        public  redircall1, redircall2
redircall1:
        call    dword ptr CS:redirdisp1
        ret
redircall2:
        call    dword ptr CS:redirdisp2
        ret

;       Keep redirdisp1 and redirdisp2 together.

        public  redirdisp1, redirdisp2
redirdisp1      dd      0
redirdisp2      dd      0

CODE    ENDS


;***    NOTE    These tables are used by LANMAN.
;               Do *NOT* put EVEN's in them.

        public DOSTable
DOSTable        label   word
        db      (DOSTableEnd-DOSTable-1)/4
        DDFAR   HardError       ;    0  HardError
        DDFAR   UCase           ;    1  UCase
        dd      0               ;    2  CAL_LK
        dd      0               ;    3  Enter_Kmode
        dd      0               ;    4  Exit_Kmode
        DDFAR   MemMapAlias     ;    5  MemMapAlias
        DDFAR   MemUnmapAlias   ;    6  MemUnmapAlias
        DDFAR   GoProtAll       ;    7  GoProtAll
        DDFAR   GoRealAll       ;    8  GoRealAll
        DDFAR   doshlp_RedirDev ;    9  doshlp_RedirDev
        dd      0               ;   10  real mode Enter_KmodeRM
        dd      0               ;   11  real mode Exit_KmodeRM
        DDFAR   SFFromSFN       ;   12  SFFromSFN
        DDFAR   SegGetInfo      ;   13  SegGetInfo (used by PMDD.SYS, not redir)
        DDFAR   AsgCheckDrive   ;   14  AsgCheckDrive - check for current drive
        dd      GSEL GDT_REDIR  ;   15  Call gate for redir

        PUBLIC  RedirCallOut
RedirCallOut label dword
        dd      0               ;   16  Redirector dispatch address (16:16)
DOSTableEnd     label   byte


DOSTab2         label   byte
        db      (DOSTab2End-DOSTab2-1)/4
        dd      ErrMap24                ;    0
        dd      ErrMap24End             ;    1
        dd      Err_Table_24            ;    2
        dd      CDSAddr                 ;    3
        dd      GDT_RDR1                ;    4
        dd      InterruptLevel          ;    5
        dd      InDos                   ;    6
        dd      0                       ; RealModeStackSegment ; 7
        dd      0                       ; Seg3xBoxPTDA       ; 8
        dd      seg FLAT:_TEXT          ;    9 R0CS
        dd      seg FLAT:_DATA          ;   10 R0DS
        dd      offset FLAT:_TKSSBase   ;   11 Variable containing stack base
        dd      offset FLAT:intSwitchStack ;   12 private stack switch rtn
        dd      offset FLAT:privateStack   ;   13 interrupted linear stack
        dd      PhysDiskTablePtr           ;   14 disk table
        dd      offset FLAT:forceEMHandler ;   15 change NPX emul rtn   ;b726833
        dd      offset FLAT:ReserveVM      ;   16 alloc virtual memory  ;novell
        dd      offset FLAT:_pgpPageDir    ;   17 lin addr of dir table ;novell
        PUBLIC  pgMstable
pgMstable label dword
        dd      0                          ;  18 physical memory size in bytes
                                           ;   set by pgInitDosTable in pga.asm
                                           ;   LAN Server Requirement
DOSTab2End      label   byte


; NOTE WARNING: This declaration of HEADER must be THE LAST thing in this
;       module. The reason is so that the data alignments are the same in
;       IBM-DOS and MS-DOS up through header.

include header.inc

TABLE   ENDS
        END
