;       SCCSID = @(#)demtable.asm       6.6 92/02/13
;       SCCSID = @(#)demtable.asm       6.6 92/02/13
;   Revision history:
;
; Local DCR/
; Tag   PTM     Who     Date        Description
;
; A000                              version 4.0  Jan. 1988
; A001  D486                        Share installation for >32mb drives
; A006  D503                        fake version for IBMCACHE
; A008  P4070                       fake version for MS WINDOWS
;               danno   16-Nov-1988 Modify for MVDM
;
;***********************************************************************;BN001;
; BN001 - 10/9/91  CP20 AA03991  Mark Rogalski                          ;BN001;
;         Route DUP_PDB function to filter so that reference counts for ;BN001;
;         OS/2 files can be incremented when a PDB is duplicated.       ;BN001;
;***********************************************************************;BN001;
; BN002 - 11/25/91 CP20 B730106  Mark Rogalski                          ;BN002;
;         All INT 21 calls for function Get_extended_error should now   ;BN002;
;         be routed to DOS. The filter will update the DOS variables.   ;BN002;
;***********************************************************************;BN002;
; BC003 - 02/07/92 CP20 B732885  Mark Rogalski                          ;BN003;
;         We should let DOS handle get DTA calls.                       ;BN003;
;***********************************************************************;BN003;
; BC004 - 02/12/92 CP20 B731511  Mark Rogalski                          ;BN004;
;         Add support for named pipe calls and function 64 stuff        ;BN004;
;***********************************************************************;BN004;
; BN008 - 01/23/93 defect 46578  Carlos A. Romero                       ;BN008;
;         Added SERVER DOS CALL (5D00H) function to FSFILTER            ;BN008;
;***********************************************************************;BN008;
; BN009 - 01/05/94 defect 75510  John M. Hare                           ;BN009;
;         Added beyond 6F to int21 list for Novell                      ;BN009;
;***********************************************************************;BN009;
; 88962 - 07/12/94 ChangeTeam (Defect #80871-original)                  ;88962;
;         Added GET_DATE, SET_DATE, GET_TIME, and SET_TIME.             ;88962;
;         These changes have been merged from r206 to r207 by V. Taplin ;88962;
;***********************************************************************;BN009;

.xlist
include v86seg.inc
.xcref
include basemaca.inc
include osmaca.inc
include oldmaca.inc
include demmac.inc
include demver.inc
;include extattr.inc                           ;AN000;; for Extended Attributes
;include fastopen.inc                     ;AN000;; for Extended Attributes
include dossymc.inc
include error.inc
include syscalls.inc
.cref
.list

        AsmVars <Kanji, Debug, Redirector, ShareF>

V86TABLE           SEGMENT
TableZero   LABEL   BYTE

        PUBLIC  MSVERS
PUBLIC MSTAB001s,MSTAB001e
MSTAB001S       label byte

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

        I_am    YRTAB,8,<200,166,200,165,200,165,200,165>   ; [SYSTEM]
        I_am    MONTAB,12,<31,28,31,30,31,30,31,31,30,31,30,31> ; [SYSTEM]

; 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,<>,2
    E21legal <invalid_function,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 GetExtCntry,0,<>,2
    E21legal <invalid_function,file_not_found>
    E21 GetSetCdPg,0,<>,2
    E21legal <invalid_function,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
    ErrTab  DEVICE_IN_USE           ALREADY,    DLYRET,     UNK
    DB      0FFh,                   0FFH,       0FFH,       0FFh


        PUBLIC  DISPATCH,MAXCALL,MAXCOM

MAXCALL DB      VAL1
MAXCOM  DB      VAL2

; Standard Functions
DISPATCH    LABEL WORD
        short_addr  $ABORT                          ;  0      0
        short_addr  $STD_CON_INPUT                  ;  1      1
        short_addr  $STD_CON_OUTPUT                 ;  2      2
        short_addr  $STD_AUX_INPUT                  ;  3      3
        short_addr  $STD_AUX_OUTPUT                 ;  4      4
        short_addr  $STD_PRINTER_OUTPUT             ;  5      5           x
        short_addr  $RAW_CON_IO                     ;  6      6
        short_addr  $RAW_CON_INPUT                  ;  7      7
        short_addr  $STD_CON_INPUT_NO_ECHO          ;  8      8
        short_addr  $STD_CON_STRING_OUTPUT          ;  9      9
        short_addr  $STD_CON_STRING_INPUT           ; 10      A
        short_addr  $STD_CON_INPUT_STATUS           ; 11      B
        short_addr  $STD_CON_INPUT_FLUSH            ; 12      C
        short_addr  $DISK_RESET                     ; 13      D           x
        short_addr  $SET_DEFAULT_DRIVE              ; 14      E           x
        short_addr  $FCB_OPEN                       ; 15      F           x
        short_addr  $FCB_CLOSE                      ; 16     10           x
        short_addr  $DIR_SEARCH_FIRST               ; 17     11           x
        short_addr  $DIR_SEARCH_NEXT                ; 18     12           x
        short_addr  $FCB_DELETE                     ; 19     13           x
        short_addr  $FCB_SEQ_READ                   ; 20     14           x
        short_addr  $FCB_SEQ_WRITE                  ; 21     15           x
        short_addr  $FCB_CREATE                     ; 22     16           x
        short_addr  $FCB_RENAME                     ; 23     17           x
        dw  0      ;CPMFUNC                         ; 24     18
        short_addr  $GET_DEFAULT_DRIVE              ; 25     19           x
        short_addr  $SET_DMA                        ; 26     1A           x
        short_addr  $SLEAZEFUNC                     ; 27     1B           x
        short_addr  $SLEAZEFUNCDL                   ; 28     1C           x
        dw  0      ;CPMFUNC                         ; 29     1D
        dw  0      ;CPMFUNC                         ; 30     1E
        short_addr  $GET_DEFAULT_DPB                ; 31     1F
        dw  0      ;CPMFUNC                         ; 32     20
        short_addr  $FCB_RANDOM_READ                ; 33     21           x
        short_addr  $FCB_RANDOM_WRITE               ; 34     22           x
        short_addr  $GET_FCB_FILE_LENGTH            ; 35     23           x
        short_addr  $GET_FCB_POSITION               ; 36     24           x
VAL1    =       ($-DISPATCH)/2 - 1

; Extended Functions
        dw  0      ;$SET_INTERRUPT_VECTOR           ; 37     25
        dw  0      ;$CREATE_PROCESS_DATA_BLOCK      ; 38     26
        short_addr  $FCB_RANDOM_READ_BLOCK          ; 39     27           x
        short_addr  $FCB_RANDOM_WRITE_BLOCK         ; 40     28           x
        short_addr  $PARSE_FILE_DESCRIPTOR          ; 41     29           x
;******* This has been commented out due to the merger on r206 to r207 ********
;        dw  0      ;$GET_DATE                       ; 42     2A
;        dw  0      ;$SET_DATE                       ; 43     2B
;        dw  0      ;$GET_TIME                       ; 44     2C
;        dw  0      ;$SET_TIME                       ; 45     2D
        short_addr  $GET_DATE                       ; 42     2A              ;88962
        short_addr  $SET_DATE                       ; 43     2B              ;88962
        short_addr  $GET_TIME                       ; 44     2C              ;88962
        short_addr  $SET_TIME                       ; 45     2D              ;88962
        short_addr  $SET_VERIFY_ON_WRITE            ; 46     2E

; Extended functionality group
        dw  0      ;$GET_DMA                        ; 47     2F           x  ;BC003
        dw  0      ;$GET_VERSION                    ; 48     30
        dw  0      ;$Keep_Process                   ; 49     31
        short_addr  $GET_DPB                        ; 50     32
        dw  0      ;$SET_CTRL_C_TRAPPING            ; 51     33
        dw  0      ;$GET_INDOS_FLAG                 ; 52     34
        dw  0      ;$GET_INTERRUPT_VECTOR           ; 53     35
        short_addr  $GET_DRIVE_FREESPACE            ; 54     36           x
        dw  0      ;$CHAR_OPER                      ; 55     37
        dw  0      ;$INTERNATIONAL                  ; 56     38
; XENIX CALLS
;   Directory Group
        short_addr  $MKDIR                          ; 57     39           x
        short_addr  $RMDIR                          ; 58     3A           x
        short_addr  $CHDIR                          ; 59     3B           x
;   File Group
        short_addr  $CREAT                          ; 60     3C           x
        short_addr  $OPEN                           ; 61     3D           x
        short_addr  $CLOSE                          ; 62     3E           x
        short_addr  $READ                           ; 63     3F           x
        short_addr  $WRITE                          ; 64     40           x
        short_addr  $UNLINK                         ; 65     41           x
        short_addr  $LSEEK                          ; 66     42           x
        short_addr  $CHMOD                          ; 67     43           x
        short_addr  $IOCTL                          ; 68     44           x
        short_addr  $DUP                            ; 69     45           x
        short_addr  $DUP2                           ; 70     46           x
        short_addr  $CURRENT_DIR                    ; 71     47           x
;    Memory Group
        dw  0      ;$ALLOC                          ; 72     48
        dw  0      ;$DEALLOC                        ; 73     49
        dw  0      ;$SETBLOCK                       ; 74     4A
;    Process Group
        short_addr  $EXEC                           ; 75     4B
        short_addr  $ABORT    ; was $EXIT           ; 76     4C
        dw  0      ;$WAIT                           ; 77     4D
        short_addr  $FIND_FIRST                     ; 78     4E           x
        short_addr  $FIND_NEXT                      ; 79     4F           x
; SPECIAL SYSTEM GROUP
        dw  0      ;$SET_CURRENT_PDB                ; 80     50
        dw  0      ;$GET_CURRENT_PDB                ; 81     51
        dw  0      ;$GET_IN_VARS                    ; 82     52
        dw  0      ;$SETDPB                         ; 83     53
        dw  0      ;$GET_VERIFY_ON_WRITE            ; 84     54
        short_addr  $DUP_PDB                        ; 85     55       ;BC001
        short_addr  $RENAME                         ; 86     56           x
        short_addr  $FILE_TIMES                     ; 87     57           x
        dw  0      ;$AllocOper                      ; 88     58
; Network extention system calls
        dw  0      ;$GetExtendedError               ; 89     59       ;BC002
        short_addr  $CreateTempFile                 ; 90     5A           x
        short_addr  $CreateNewFile                  ; 91     5B           x
        short_addr  $LockOper                       ; 92     5C           x
        short_addr  $srv_call                       ; 93     5D       ;BN008
        dw  0      ;$BAD                            ; 94     5E
        short_addr  $AssignOper                     ; 95     5F       ;BC004
        short_addr  $NameTrans                      ; 96     60
        dw  0      ;$JSA                            ; 97     61
        dw  0      ;$Get_Current_PDB                ; 98     62
; the next call is reserved for hangool sys call
        dw  0      ;$ECS_Call                       ; 99     63
        short_addr  $Generic                        ; 100    64       ;BC004
        dw  0      ;$GetExtCntry                    ; 101    65
        dw  0      ;$GetSetCdPg                     ; 102    66
        short_addr  $ExtHandle                      ; 103    67
        short_addr  $Commit                         ; 104    68           x
        short_addr  $GSetMediaID                    ; 105    69   ;AN000; x
        short_addr  $Commit                         ; 106    6A   ;AN000; x
        dw  0      ;$BAD                            ; 107    6B   ;AN000;
        short_addr  $Extended_Open                  ; 108    6C   ;AN000; x
        short_addr  $MKDIR2                         ; 109    6D           x
        short_addr  $EnumAttrib                     ; 110    6E           x
        short_addr  $QMaxEASize                     ; 111    6F           x
        dw  0                                       ; 112    70           x  ; BN009 ;
        dw  0                                       ; 113    71           x  ; BN009 ;
        dw  0                                       ; 114    72           x  ; BN009 ;
        dw  0                                       ; 115    73           x  ; BN009 ;
        dw  0                                       ; 116    74           x  ; BN009 ;
        dw  0                                       ; 117    75           x  ; BN009 ;
        dw  0                                       ; 118    76           x  ; BN009 ;
        dw  0                                       ; 119    77           x  ; BN009 ;
        dw  0                                       ; 120    78           x  ; BN009 ;
        dw  0                                       ; 121    79           x  ; BN009 ;
        dw  0                                       ; 122    7A           x  ; BN009 ;
        dw  0                                       ; 123    7B           x  ; BN009 ;
        dw  0                                       ; 124    7C           x  ; BN009 ;
        dw  0                                       ; 125    7D           x  ; BN009 ;
        dw  0                                       ; 126    7E           x  ; BN009 ;
        dw  0                                       ; 127    7F           x  ; BN009 ;
        dw  0                                       ; 128    80           x  ; BN009 ;
        dw  0                                       ; 129    81           x  ; BN009 ;
        dw  0                                       ; 130    82           x  ; BN009 ;
        dw  0                                       ; 131    83           x  ; BN009 ;
        dw  0                                       ; 132    84           x  ; BN009 ;
        dw  0                                       ; 133    85           x  ; BN009 ;
        dw  0                                       ; 134    86           x  ; BN009 ;
        dw  0                                       ; 135    87           x  ; BN009 ;
        dw  0                                       ; 136    88           x  ; BN009 ;
        dw  0                                       ; 137    89           x  ; BN009 ;
        dw  0                                       ; 138    8A           x  ; BN009 ;
        dw  0                                       ; 139    8B           x  ; BN009 ;
        dw  0                                       ; 140    8C           x  ; BN009 ;
        dw  0                                       ; 141    8D           x  ; BN009 ;
        dw  0                                       ; 142    8E           x  ; BN009 ;
        dw  0                                       ; 143    8F           x  ; BN009 ;
        dw  0                                       ; 144    90           x  ; BN009 ;
        dw  0                                       ; 145    91           x  ; BN009 ;
        dw  0                                       ; 146    92           x  ; BN009 ;
        dw  0                                       ; 147    93           x  ; BN009 ;
        dw  0                                       ; 148    94           x  ; BN009 ;
        dw  0                                       ; 149    95           x  ; BN009 ;
        dw  0                                       ; 150    96           x  ; BN009 ;
        dw  0                                       ; 151    97           x  ; BN009 ;
        dw  0                                       ; 152    98           x  ; BN009 ;
        dw  0                                       ; 153    99           x  ; BN009 ;
        dw  0                                       ; 154    9A           x  ; BN009 ;
        dw  0                                       ; 155    9B           x  ; BN009 ;
        dw  0                                       ; 156    9C           x  ; BN009 ;
        dw  0                                       ; 157    9D           x  ; BN009 ;
        dw  0                                       ; 158    9E           x  ; BN009 ;
        dw  0                                       ; 159    9F           x  ; BN009 ;
        dw  0                                       ; 160    A0           x  ; BN009 ;
        dw  0                                       ; 161    A1           x  ; BN009 ;
        dw  0                                       ; 162    A2           x  ; BN009 ;
        dw  0                                       ; 163    A3           x  ; BN009 ;
        dw  0                                       ; 164    A4           x  ; BN009 ;
        dw  0                                       ; 165    A5           x  ; BN009 ;
        dw  0                                       ; 166    A6           x  ; BN009 ;
        dw  0                                       ; 167    A7           x  ; BN009 ;
        dw  0                                       ; 168    A8           x  ; BN009 ;
        dw  0                                       ; 169    A9           x  ; BN009 ;
        dw  0                                       ; 170    AA           x  ; BN009 ;
        dw  0                                       ; 171    AB           x  ; BN009 ;
        dw  0                                       ; 172    AC           x  ; BN009 ;
        dw  0                                       ; 173    AD           x  ; BN009 ;
        dw  0                                       ; 174    AE           x  ; BN009 ;
        dw  0                                       ; 175    AF           x  ; BN009 ;
        dw  0                                       ; 176    B0           x  ; BN009 ;
        dw  0                                       ; 177    B1           x  ; BN009 ;
        dw  0                                       ; 178    B2           x  ; BN009 ;
        dw  0                                       ; 179    B3           x  ; BN009 ;
        dw  0                                       ; 180    B4           x  ; BN009 ;
        dw  0                                       ; 181    B5  03       Novell Task Mode Control - Determine current cale of the task mode byte   ; BN009 ;
                                                    ; 181    B4  04       Novell Task Mode Control - Get a pointer to the task mode byte            ; BN009 ;
        dw  0                                       ; 182    B6  00       Novell Extended File Attributes - get extended file attributes            ; BN009 ;
                                                    ; 182    B6  01       Novell Extended File Attributes - set extended file attributes            ; BN009 ;
        dw  0                                       ; 183    B7           x  ; BN009 ;
        dw  0                                       ; 184    B8  00       Novell Print Jobs  - Get Default job flags                                ; BN009 ;
                                                    ; 184    B8  01       Novell Print Jobs  - set default capture flags                            ; BN009 ;
                                                    ; 184    B8  02       Novell Print Jobs  - get specific capture flags                           ; BN009 ;
                                                    ; 184    B8  03       Novell Print Jobs  - set specific print job flags                         ; BN009 ;
                                                    ; 184    B8  04       Novell Print Jobs  - get default local printer                            ; BN009 ;
                                                    ; 184    B8  05       Novell Print Jobs  - set default local printer                            ; BN009 ;
                                                    ; 184    B8  06       Novell Print Jobs  - set capture printer queue                            ; BN009 ;
                                                    ; 184    B8  07       Novell Print Jobs  - set capture print job                                ; BN009 ;
                                                    ; 184    B8  08       Novell Print Jobs  - get banner user name                                 ; BN009 ;
                                                    ; 184    B8  09       Novell Print Jobs  - set banner user name                                 ; BN009 ;
        dw  0                                       ; 185    B9           x  ; BN009 ;
        dw  0                                       ; 186    BA           x  ; BN009 ;
        dw  0                                       ; 187    BB           Novell set end of job status                                              ; BN009 ;
        dw  0                                       ; 188    BC           Novell log/lock physical record                                           ; BN009 ;
        dw  0                                       ; 189    BD           Novell release physical record                                            ; BN009 ;
        dw  0                                       ; 190    BE           Novell clear physical record                                              ; BN009 ;
        dw  0                                       ; 191    BF           Novell log/lock record (fcb)                                              ; BN009 ;
        dw  0                                       ; 192    C0           Novell release record (fcb)                                               ; BN009 ;
        dw  0                                       ; 193    C1           Novell clear record (fcb)                                                 ; BN009 ;
        dw  0                                       ; 194    C2           Novell lock physical record set                                           ; BN009 ;
        dw  0                                       ; 195    C3           Novell release physical record set                                        ; BN009 ;
        dw  0                                       ; 196    C4           Novell clear physical record set                                          ; BN009 ;
        dw  0                                       ; 197    C5  00       Novell semaphores - open semaphore                                        ; BN009 ;
                                                    ; 197    C5  01       Novell semaphores - examine semaphore                                     ; BN009 ;
                                                    ; 197    C5  02       Novell semaphores - wait on semaphore                                     ; BN009 ;
                                                    ; 197    C5  03       Novell semaphores - signal semaphore                                      ; BN009 ;
                                                    ; 197    C5  04       Novell semaphores - close semaphore                                       ; BN009 ;
        dw  0                                       ; 198    C6  00       Novell Get or set lock mode - set old compatibility mode                  ; BN009 ;
                                                    ; 198    C6  01       Novell Get or set lock mode - set new extended locks mode                 ; BN009 ;
                                                    ; 198    C6  02       Novell Get or set lock mode - get lock mode                               ; BN009 ;
        dw  0                                       ; 199    C7  00       Novell Transaction tracking system - begin transaction                    ; BN009 ;
                                                    ; 199    C7  01       Novell Transaction tracking system - end transaction                      ; BN009 ;
                                                    ; 199    C7  02       Novell Transaction tracking system - TTS available                        ; BN009 ;
                                                    ; 199    C7  03       Novell Transaction tracking system - abort transaction                    ; BN009 ;
                                                    ; 199    C7  04       Novell Transaction tracking system - transaction status                   ; BN009 ;
                                                    ; 199    C7  05       Novell Transaction tracking system - get application thresholds           ; BN009 ;
                                                    ; 199    C7  06       Novell Transaction tracking system - set application thresholds           ; BN009 ;
                                                    ; 199    C7  07       Novell Transaction tracking system - get workstation thresholds           ; BN009 ;
                                                    ; 199    C7  08       Novell Transaction tracking system - set workstation thresholds           ; BN009 ;
        dw  0                                       ; 200    C8           Novell begin logical file locking                                         ; BN009 ;
        dw  0                                       ; 201    C9           Novell end logical file locking                                           ; BN009 ;
        dw  0                                       ; 202    CA           Novell log/lock personal file (fcb)                                       ; BN009 ;
        dw  0                                       ; 203    CB           Novell lock file set                                                      ; BN009 ;
        dw  0                                       ; 204    CC           Novell release file (fcb)                                                 ; BN009 ;
        dw  0                                       ; 205    CD           Novell release file set                                                   ; BN009 ;
        dw  0                                       ; 206    CE           Novell clear file (fcb)                                                   ; BN009 ;
        dw  0                                       ; 207    CF           Novell clear file set                                                     ; BN009 ;
        dw  0                                       ; 208    D0           Novell lock logical record                                                ; BN009 ;
        dw  0                                       ; 209    D1           Novell lock logical record set                                            ; BN009 ;
        dw  0                                       ; 210    D2           Novell unlock logical record                                              ; BN009 ;
        dw  0                                       ; 211    D3           Novell unlock logical record set                                          ; BN009 ;
        dw  0                                       ; 212    D4           Novell clear logical record                                               ; BN009 ;
        dw  0                                       ; 213    D5           Novell clear logical record set                                           ; BN009 ;
        dw  0                                       ; 214    D6           Novell end of job                                                         ; BN009 ;
        dw  0                                       ; 215    D7           Novell system logout                                                      ; BN009 ;
        dw  0                                       ; 216    D8           Novell allocate resource                                                  ; BN009 ;
        dw  0                                       ; 217    D9           Novell deallocate resource                                                ; BN009 ;
        dw  0                                       ; 218    DA           Novell get volume statistics                                              ; BN009 ;
        dw  0                                       ; 219    DB           Novell get number of local drives                                         ; BN009 ;
        dw  0                                       ; 220    DC           Novell get station number                                                 ; BN009 ;
        dw  0                                       ; 221    DD           Novell set error mode                                                     ; BN009 ;
        dw  0                                       ; 222    DE           Novell set broadcase mode                                                 ; BN009 ;
        dw  0                                       ; 223    DF  00       Novell capture - start LPT capture                                        ; BN009 ;
                                                    ; 223    DF  01       Novell capture - end LPT capture                                          ; BN009 ;
                                                    ; 223    DF  02       Novell capture - cancel LPT capture                                       ; BN009 ;
                                                    ; 223    DF  03       Novell capture - flush LPT capture                                        ; BN009 ;
                                                    ; 223    DF  04       Novell capture - start specific capture                                   ; BN009 ;
                                                    ; 223    DF  05       Novell capture - end specific capture                                     ; BN009 ;
                                                    ; 223    DF  06       Novell capture - cancel specific capture                                  ; BN009 ;
                                                    ; 223    DF  07       Novell capture - flush specific capture                                   ; BN009 ;
        dw  0                                       ; 224    E0  00       Novell print spooling - spool data to a capture file                      ; BN009 ;
                                                    ; 224    E0  01       Novell print spooling - close and queue capture file                      ; BN009 ;
                                                    ; 224    E0  02       Novell print spooling - set spool flags                                   ; BN009 ;
                                                    ; 224    E0  03       Novell print spooling - spool existing file                               ; BN009 ;
                                                    ; 224    E0  04       Novell print spooling - get queue entry                                   ; BN009 ;
                                                    ; 224    E0  05       Novell print spooling - remove entry from spool queue                     ; BN009 ;
                                                    ; 224    E0  06       Novell print spooling - get printer status                                ; BN009 ;
                                                    ; 224    E0  09       Novell print spooling - create a disk capture file                        ; BN009 ;
        dw  0                                       ; 225    E1           Novell broadcast messages                                                 ; BN009 ;
        dw  0                                       ; 226    E2           Novell directory functions                                                ; BN009 ;
        dw  0                                       ; 227    E3           Novell connection control                                                 ; BN009 ;
        dw  0                                       ; 228    E4           Novell set file attributes (fcb)                                          ; BN009 ;
        dw  0                                       ; 229    E5           Novell update file size (fcb)                                             ; BN009 ;
        dw  0                                       ; 230    E6           Novell copy file to file (fcb)                                            ; BN009 ;
        dw  0                                       ; 231    E7           Novell get file server date and time                                      ; BN009 ;
        dw  0                                       ; 232    E8           Novell set fcb re-open mode                                               ; BN009 ;
        dw  0                                       ; 233    E9   00      Novell shell's get base status - Determine whether the specified drive is mapped to a base ; BN009 ;
                                                    ; 233    E9   05      Novell map a fake root directory                                          ; BN009 ;
                                                    ; 233    E9   06      Novell delete fake root directory                                         ; BN009 ;
                                                    ; 233    E9   07      Novell get relative drive depth                                           ; BN009 ;
                                                    ; 233    E9   08      Novell set show dots                                                      ; BN009 ;
        dw  0                                       ; 234    EA           Novell return shell version                                               ; BN009 ;
        dw  0                                       ; 235    EB           Novell log file                                                           ; BN009 ;
        dw  0                                       ; 236    EC           Novell release file                                                       ; BN009 ;
        dw  0                                       ; 237    ED           Novell clear file                                                         ; BN009 ;
        dw  0                                       ; 238    EE           Novell get physical station number                                        ; BN009 ;
        dw  0                                       ; 239    EF           Novell get drive info                                                     ; BN009 ;
        dw  0                                       ; 240    F0   00      Novell connection id - set perferred connection ID                        ; BN009 ;
                                                    ; 240    F0   01      Novell connection id - get perferred connection ID                        ; BN009 ;
                                                    ; 240    F0   02      Novell connection id - get default   connection ID                        ; BN009 ;
                                                    ; 240    F0   03      Novell connection id - LPT capture active                                 ; BN009 ;
                                                    ; 240    F0   04      Novell connection id - set primary   connection ID                        ; BN009 ;
                                                    ; 240    F0   05      Novell connection id - get primary   connection ID                        ; BN009 ;
        dw  0                                       ; 241    F1   00      Novell file server connection - attach to file server                     ; BN009 ;
                                                    ; 241    F1   01      Novell file server connection - detach from file server                   ; BN009 ;
                                                    ; 241    F1   02      Novell file server connection - logout from file server                   ; BN009 ;
        dw  0                                       ; 242    F2           Novell shell interface multiplexor                                        ; BN009 ;
        dw  0                                       ; 243    F3           Novell file server file copy                                              ; BN009 ;
        dw  0                                       ; 244    F4           x  ; BN009 ;
        dw  0                                       ; 245    F5           x  ; BN009 ;
        dw  0                                       ; 246    F6           x  ; BN009 ;
        dw  0                                       ; 247    F7           x  ; BN009 ;
        dw  0                                       ; 248    F8           x  ; BN009 ;
        dw  0                                       ; 249    F9           x  ; BN009 ;
        dw  0                                       ; 250    FA           x  ; BN009 ;
        dw  0                                       ; 251    FB           x  ; BN009 ;
        dw  0                                       ; 252    FC           x  ; BN009 ;
        dw  0                                       ; 253    FD           x  ; BN009 ;
        dw  0                                       ; 254    FE           x  ; BN009 ;
        dw  0                                       ; 255    FF           x  ; BN009 ;



VAL2    =       ($-DISPATCH)/2 - 1

        If      Installed

PUBLIC FOO
FOO     LABEL WORD
        Short_addr  Leave2F
DTab    DW  OFFSET  V86GROUP:DOSTable
        PUBLIC FOO,DTAB

DOSTable    LABEL   WORD
        DB      (DOSTableEnd-DOSTable-1)/2
ifdef NOT_DONE ; mikem 3/31/89
        Short_addr  DOSInstall          ;   0 install check
        Short_addr  DOS_CLOSE           ;   1   DOS_CLOSE
        Short_addr  RECSET              ;   2   RECSET
        Short_addr  DOSGetGroup         ;   3   Get DOSGROUP
        Short_addr  PATHCHRCMP          ;   4   PATHCHRCMP
        Short_addr  OUTT                ;   5   OUT
        Short_addr  NET_I24_ENTRY       ;   6   NET_I24_ENTRY
        Short_addr  PLACEBUF            ;   7   PLACEBUF
        Short_addr  FREE_SFT            ;   8   FREE_SFT
        Short_addr  BUFWRITE            ;   9   BUFWRITE
        Short_addr  SHARE_VIOLATION     ;   10  SHARE_VIOLATION
        Short_addr  SHARE_ERROR         ;   11  SHARE_ERROR
        Short_addr  SET_SFT_MODE        ;   12  SET_SFT_MODE
        Short_addr  DATE16              ;   13  DATE16
        Short_addr  idle                ;   14      empty slot
        Short_addr  SCANPLACE           ;   15  SCANPLACE
        Short_addr  idle                ;   16      empty slot
        Short_addr  StrCpy              ;   17  StrCpy
        Short_addr  StrLen              ;   18  StrLen
        Short_addr  Ucase               ;   19  Ucase
        Short_addr  POINTCOMP           ;   20  POINTCOMP
        Short_addr  CHECKFLUSH          ;   21  CHECKFLUSH
        Short_addr  SFFromSFN           ;   22  SFFromSFN
        Short_addr  GetCDSFromDrv       ;   23  GetCDSFromDrv
        Short_addr  Get_User_Stack      ;   24  Get_User_Stack
        Short_addr  GetThisDrv          ;   25  GetThisDrv
        Short_addr  DriveFromText       ;   26  DriveFromText
        Short_addr  SETYEAR             ;   27  SETYEAR
        Short_addr  DSUM                ;   28  DSUM
        Short_addr  DSLIDE              ;   29  DSLIDE
        Short_addr  StrCmp              ;   30  StrCmp
        Short_addr  InitCDS             ;   31  initcds
        Short_addr  pJFNFromHandle      ;   32  pJfnFromHandle
        Short_addr  $NameTrans          ;   33  $NameTrans
        Short_addr  CAL_LK              ;   34  CAL_LK
        Short_addr  DEVNAME             ;   35  DEVNAME
        Short_addr  Idle                ;   36  Idle
        Short_addr  DStrLen             ;   37  DStrLen
        Short_addr  NLS_OPEN            ;   38  NLS_OPEN      DOS 3.3
        Short_addr  $CLOSE              ;   39  $CLOSE        DOS 3.3
        Short_addr  NLS_LSEEK           ;   40  NLS_LSEEK     DOS 3.3
        Short_addr  $READ               ;   41  $READ         DOS 3.3
        Short_addr  FastInit            ;   42  FastInit      DOS 3.4  ;AN000;
        Short_addr  NLS_IOCTL           ;   43  NLS_IOCTL     DOS 3.3
        Short_addr  GetDevList          ;   44  GetDevList    DOS 3.3
        Short_addr  NLS_GETEXT          ;   45  NLS_GETEXT    DOS 3.3
        Short_addr  MSG_RETRIEVAL       ;   46  MSG_RETRIEVAL DOS 4.0  ;AN000;
        Short_addr  Fake_Version        ;   47  Fake_Version  DOS 4.0  ;AN006;
endif

DOSTableEnd LABEL   BYTE

        ENDIF

; 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.
;---------------------------------------Start of Korean support  2/11/KK
;
; The varialbes for ECS version are moved here for the same data alignments
; as IBM-DOS and MS-DOS.
;

        I_AM    InterChar, byte         ; Interim character flag ( 1= interim)  ;AN000;
                                                                                ;AN000;
;------- NOTE: NEXT TWO BYTES SOMETIMES USED AS A WORD !! ---------------------
DUMMY   LABEL   WORD                                                            ;AN000;
        PUBLIC  InterCon                ; Console in Interim mode ( 1= interim) ;AN000;
InterCon        db      0                                                       ;AN000;
        PUBLIC  SaveCurFlg              ; Print, do not advance cursor flag     ;AN000;
SaveCurFlg      db      0                                                       ;AN000;
;-----------------------------------------End of Korean support  2/11/KK


        PUBLIC  HEADER
Header  LABEL   BYTE
        IF      DEBUG
        DB      13,10,"Debugging DOS version "
        DB      MAJOR_VERSION + "0"
        DB      "."
        DB      (MINOR_VERSION / 10) + "0"
        DB      (MINOR_VERSION MOD 10) + "0"
        ENDIF

        IF      NOT IBM
        DB      13,10,"MS-DOS version "
        DB      MAJOR_VERSION + "0"
        DB      "."
        DB      (MINOR_VERSION / 10) + "0"
        DB      (MINOR_VERSION MOD 10) + "0"

        IF      HIGHMEM
        DB      "H"
        ENDIF

        DB      13,10, "Copyright 1981,82,83,84,88 Microsoft Corp.",13,10,"$"
        ENDIF

IF DEBUG
        DB      13,10,"$"
ENDIF

MSTAB001E       label byte

include demcrigh.inc                              ;AN000;

; SYS init extended table,   DOS 3.3   F.C. 5/29/86
;
;m       ReferV86   COUNTRY_CDPG,BYTE
;m       ReferV86   SYSINITVAR,BYTE
;m
;m       PUBLIC   SysInitTable
;m
;mSysInitTable  label  byte
;m               dw      OFFSET V86GROUP:SYSINITVAR    ; pointer to sysinit var
;m               dw      0                             ; segment
;m               dw      OFFSET V86GROUP:COUNTRY_CDPG  ; pointer to country table
;m               dw      0                             ; segment of pointer

ifdef NOT_MVDM ; BUGBUG danno 06-Dec-1988
; DOS 3.3 F.C. 6/12/86

; FASTOPEN communications area DOS 3.3   F.C. 5/29/86
;
       PUBLIC   FastOpenTable
       PUBLIC   FastTable                            ; a better name
       EXTRN    FastRet:FAR                          ; defined in misc2.asm

FastTable      label  byte                           ; a better name
FastOpenTable  label  byte
               dw      2                             ; number of entries
               dw      OFFSET V86GROUP:FastRet       ; pointer to ret instr.
               dw      0                             ; and will be modified by
               dw      OFFSET V86GROUP:FastRet       ; FASTxxx when loaded in
               dw      0                             ;
; DOS 3.3 F.C. 6/12/86
      PUBLIC   FastFlg                  ;AN000; flags
FastFlg        label  byte              ;AN000; don't change the following order
        I_am   FastOpenFlg,BYTE,<0>     ;AN000;
        I_am   FastSeekFlg,BYTE,<0>     ;AN000;

       PUBLIC   FastOpen_Ext_Info

; FastOpen_Ext_Info is used as a temporary storage for saving dirpos,dirsec
; and clusnum  which are filled by DOS 3.3 when calling FastOpen Insert
; or filled by FastOPen when calling FastOpen Lookup

FastOpen_Ext_Info  label  byte
               db   SIZE FASTOPEN_EXTENDED_INFO dup(0) ;dirpos

; Dir_Info_Buff is a dir entry buffer which is filled by FastOPen
; when calling FastOpen Lookup

       PUBLIC  Dir_Info_Buff

Dir_Info_Buff  label  byte
               db   SIZE dir_entry dup (0)

endif ; BUGBUG danno 06-Dec-1988

      I_am     Next_Element_Start,WORD  ; save next element start offset

; Following 4 variables moved to MSDATA.asm  (P4986)
;     I_am     FSeek_drive,BYTE         ;AN000; fastseek drive #
;     I_am     FSeek_firclus,WORD       ;AN000; fastseek first cluster #
;     I_am     FSeek_logclus,WORD       ;AN000; fastseek logical cluster #
;     I_am     FSeek_logsave,WORD       ;AN000; fastseek returned log clus #

; The following is a stack and its pointer for interrupt 2F which is uesd
; by NLSFUNC.  There is no significant use of this stack, we are just trying
; not to destroy the INT 21 stack saved for the user.


       PUBLIC   User_SP_2F

USER_SP_2F       LABEL  WORD
                dw    OFFSET V86GROUP:FAKE_STACK_2F

       PUBLIC   Packet_Temp
Packet_Temp      label  word             ; temporary packet used by readtime
       PUBLIC   DOS_TEMP                 ; temporary word
DOS_TEMP         label  word
FAKE_STACK_2F   dw   14 dup (0)          ; 12 register temporary storage

       PUBLIC   Hash_Temp                ;AN000; temporary word
Hash_Temp        label  word             ;AN000;
                dw    4 dup (0)          ;AN000; temporary hash table during config.sys

      PUBLIC   SCAN_FLAG                 ; flag to indicate key ALT_Q
SCAN_FLAG      label  byte
               db     0
;;; The following  2 words must be adjacent for IBMDOS reasons

;     PUBLIC   DATE_FLAG
DATE_FLAG      label  word               ; flag to
               dw     0                  ; to update the date
;;;; special tag for IBMDOS
      PUBLIC   FETCHI_TAG
FETCHI_TAG     label  word               ; TAG to make DOS 3.3 work
               dw     0                  ; must be 22642
;;; The above  2 words must be adjacent for IBMDOS reasons
; DOS 3.3 F.C. 6/12/86
      I_am     Del_ExtCluster,WORD       ; for dos_delete                       ;AN000;

      PUBLIC   MSG_EXTERROR              ; for system message addr              ;AN000;
MSG_EXTERROR   label  DWORD                                                     ;AN000;
               dd     0                  ; for extended error                   ;AN000;
               dd     0                  ; for parser                           ;AN000;
               dd     0                  ; for critical errror                  ;AN000;
               dd     0                  ; for IFS                              ;AN000;
               dd     0                  ; for code reduction                   ;AN000;

      PUBLIC   SEQ_SECTOR                ; last sector read                     ;AN000;
SEQ_SECTOR     label  DWORD                                                     ;AN000;
               dd     -1                                                        ;AN000;

      I_am     XA_CONDITION,BYTE,<0>     ; for Extended Attributes              ;AN000;
;     I_am     XA_ES,WORD                ; for extended find                    ;AN000;
;     I_am     XA_BP,WORD                ; for extended find                    ;AN000;
;     I_am     XA_handle,WORD            ; for get/set EA                       ;AN000;
      I_am     XA_type,BYTE              ; for get/set EA                       ;AN000;
;     I_am     XA_device,BYTE            ; for get/set EA                       ;AN000;
      I_am     XA_from,BYTE              ; for get/set EA                       ;AN000;
;     I_am     XA_VAR,WORD               ; for get/set EA                       ;AN000;
;     I_am     XA_TEMP,WORD              ; for get/set EA                       ;AN000;
;     I_am     XA_TEMP2,WORD             ; for get/set EA                       ;AN000;
;

;     I_am     MAX_EA_SIZE,WORD,<29>     ; max EA list size                     ;AN000;
;     I_am     MAX_EANAME_SIZE,WORD,<20> ; max EA name list size                ;AN000;
;     I_am     XA_COUNT,WORD,<2>         ; number of EA entries                 ;AN000;


;     PUBLIC   XA_TABLE                       ; for get/set EA                  ;AN000;
;
;XA_TABLE       label  byte                                                      ;AN000;
;              db EAISBINARY                                       ;Code Page   ;AN000;
;              dw EASYSTEM                                                      ;AN000;
;              db 0,2                                                           ;AN000;
;              dw 2                                                             ;AN000;
;              db 'CP'                                                          ;AN000;
;
;              db EAISBINARY                                       ;File Type   ;AN000;
;              dw EASYSTEM                                                      ;AN000;
;              db 0,8                                                           ;AN000;
;              dw 1                                                             ;AN000;
;              db 'FILETYPE'                                                    ;AN000;
;

;         PUBLIC XA_PACKET                                                            ;AN000;
;XA_PACKET        label byte                                                           ;AN000;
;IF  DBCS                                                                             ;AN000;
;                dw   18                                                              ;AN000;
;                db   18 dup(0)                                                       ;AN000;
;         PUBLIC DBCS_PACKET                                                          ;AN000;
;DBCS_PACKET      label byte                                                           ;AN000;
;                db   5 dup(0)
;ELSE
;                dw   2, 0                       ; get/set device code page           ;AN000;
;ENDIF

IF NOT_FILTER

        I_am    CurHashEntry,DWORD               ; current hash buffer entry          ;AN000;
;;      I_am    ACT_PAGE,WORD,<-1>               ;BL ; active EMS page                       ;AN000;
        I_am    SC_SECTOR_SIZE,WORD              ; sector size for SC                 ;AN000;
        I_am    SC_DRIVE,BYTE                    ; drive # for secondary cache        ;AN000;
        I_am    CurSC_DRIVE,BYTE,<-1>            ; current SC drive                   ;AN000;
        I_am    CurSC_SECTOR,DWORD               ; current SC starting sector         ;AN000;
        I_am    SC_STATUS,WORD,<0>               ; SC status word                     ;AN000;
        I_am    SC_FLAG,BYTE,<0>                 ; SC flag                            ;AN000;
        I_am    IFS_DRIVER_ERR,WORD,<0>          ; driver error for IFS               ;AN000;

          PUBLIC NO_NAME_ID                                                           ;AN000;
NO_NAME_ID       label byte                                                           ;AN000;
                 db   'NO NAME    '              ; null media id                      ;AN000;


          PUBLIC SWAP_AREA_TABLE                                                      ;AN000;
SWAP_AREA_TABLE  label byte                                                           ;AN000;
        I_am    NUM_SWAP_AREA,WORD,<2>           ; number of swap areas               ;AN000;
        I_am    SWAP_IN_DOS,DWORD                ; swap in dos area                   ;AN000;
        I_am    SWAP_IN_DOS_LEN,WORD             ; swap in dos area length            ;AN000;
        I_am    SWAP_ALWAYS_AREA,DWORD           ; swap always area                   ;AN000;
        I_am    SWAP_ALWAYS_AREA_LEN,WORD        ; swap always area length            ;AN000;
        I_am    IFSFUNC_SWAP_IN_DOS,DWORD        ; ifsfunc swap in dos area           ;AN000;
        I_am    IFSFUNC_SWAP_IN_DOS_LEN,WORD     ; ifsfunc swap in dos area length    ;AN000;

        I_am    SWAP_AREA_LEN,WORD               ; swap area length                   ;AN000;
        I_am    FIRST_BUFF_ADDR,WORD             ; first buffer address               ;AN000;
        I_am    SPECIAL_VERSION,WORD,<0>         ;AN006; used by INT 2F 47H
        I_am    FAKE_COUNT,<255>                 ;AN008; fake version count
        I_am    OLD_FIRSTCLUS,WORD               ;AN011; save old first cluster for fastopen

ENDIF

V86TABLE    ENDS

V86CODE SEGMENT
        ASSUME  CS:V86CODE

Procedure $BAD,near
        error   ERROR_INVALID_FUNCTION
EndProc   $BAD

V86CODE ENDS

        END
