;       SCCSID = @(#)demcnst.asm        6.1 91/07/12
;       SCCSID = @(#)demcnst.asm        6.2 91/03/04
;       SCCSID = @(#)demcnst.asm        6.2 91/03/04
;BN001;
; LINE TAGS BEGINNING WITH 'B' ARE FOR THE CRUISER RELEASE:  OS/2 VERSION 2.0
;BN001;
;**********************************************************************;BN001;
; REVISION HISTORY                                                     ;BN001;
;                                                                      ;BN001;
;  B001  DCR 1329 - 2/16/91 TMB -  Add support for loading DOS device  ;BN001;
;                   drivers and TSRs into UMBs.                        ;BN001;
;                                                                      ;BN001;
;                   Module dependencies:                               ;BN001;
;                   drv6\src\dos\v86code\v86init.asm                   ;BN001;
;                   drv6\src\dos\v86code\demarena.asm                  ;BN001;
;                   drv6\src\dos\v86code\demcnst.asm                   ;BN001;
;                   drv6\src\dos\v86code\demproc.asm                   ;BN001;
;                   drv6\src\dos\v86code\demexec.inc                   ;BN001;
;                   drv6\src\dos\v86code\demumb.inc                    ;BN001;
;                   drv6\src\vdev\vbios.c                              ;BN001;
;                   drv6\src\vdev\propname.h                           ;BN001;
;                   drv6\inc\vdmprop.inc                               ;BN001;
;                   drv6\h\vdmprop.h                                   ;BN001;
;                   drv6\src\dos\mvdm\dem.c                            ;BN001;

;      AN000  version 4.00  Jan. 1988
;      AN007  fake version check for IBMCACHE.COM
;
;   Revisions:
;
;Local  DCR/
;Tag    PTM(R)  Who     When
;AN000
;                   version 4.00  Jan. 1988
;AN007
;                   fake version check for IBMCACHE.COM
;               danno   07-Dec-1988
;                   Modified from msconst.asm for MVDM
;
;**********************************************************************;BN001;

.xlist
include v86seg.inc
.xcref
include basemaca.inc
include osmaca.inc
include demmac.inc
include devhdr.inc
.cref
.list


;BD005     I_Need  RMDevHandleInfo,BYTE


V86CODE SEGMENT
        Extrn   LeaveDOS:NEAR
;        Extrn   BadCall:FAR, OKCall:FAR
V86CODE ENDS

Break <Initialized data and data used at DOS initialization>

;
; We need to identify the parts of the data area that are relevant to tasks
; and those that are relevant to the system as a whole.  Under 3.0, the system
; data will be gathered with the system code.  The process data under 2.x will
; be available for swapping and under 3.0 it will be allocated per-process.
;
; The data that is system data will be identified by [SYSTEM] in the comments
; describing that data item.
;

        AsmVars <Kanji, Debug, Redirector, ShareF>

V86CONST SEGMENT
;        extrn   sfTabl:DWORD

;mdr        ORG     0

        EVEN

;
Public MSCT001S,MSCT001E
MSCT001S    EQU THIS BYTE


        I_am    MYNUM,WORD,<0>          ; [SYSTEM] A number that goes with MYNAME
        I_am    FCBLRU,WORD,<0>         ; [SYSTEM] LRU count for FCB cache
        I_am    OpenLRU,WORD,<0>        ; [SYSTEM] LRU count for FCB cache opens
; NOTE: We include the decl of OEM_HANDLER in IBM DOS even though it is not used.
;       This allows the REDIRector to work on either IBM or MS-DOS.
;m        PUBLIC  OEM_HANDLER
;mOEM_HANDLER     DD      -1              ; [SYSTEM] Pointer to OEM handler code
;m        I_am    LeaveAddr,WORD,<<OFFSET V86GROUP:LeaveDOS>> ; [SYSTEM]
;m        I_am    RetryCount,WORD,<3>     ; [SYSTEM] Share retries
;m        I_am    RetryLoop,WORD,<1>      ; [SYSTEM] Share retries
;m        I_am    LastBuffer,DWORD,<-1,-1>; [SYSTEM] Buffer queue recency pointer
;m        I_am    CONTPOS,WORD            ; [SYSTEM] location in buffer of next read

; CAVEAT
;
;   Dirty apps depend on arena_head being here, before SYSINITVAR
;               danno 07-Dec-1988

;m        I_am    arena_head,WORD         ; [SYSTEM] Segment # of first arena in memory
; The following block of data is used by SYSINIT.  Do not change the order or
; size of this block
;m        PUBLIC  SYSINITVAR              ; [SYSTEM]
;mSYSINITVAR  LABEL   WORD                ; [SYSTEM]
;m        I_am    DPBHEAD,DWORD           ; [SYSTEM] Pointer to head of DPB-FAT list
;m        I_am    sft_addr,DWORD,<<OFFSET V86GROUP:RMDevHandleInfo>,?> ; [SYSTEM] Pointer to first SFT table
;m        I_am    BCLOCK,DWORD,<-1,-1>    ; [SYSTEM] The CLOCK device
;m        I_am    BCON,DWORD              ; [SYSTEM] Console device entry points
;m        I_am    MAXSEC,WORD,<128>       ; [SYSTEM] Maximum allowed sector size
;m        I_am    BUFFHEAD,DWORD,<-1,-1>  ; [SYSTEM] Pointer to head of buffer queue
;m        I_am    CDSADDR,DWORD,<-1,-1>   ; [SYSTEM] Pointer to curdir structure table
;m        I_am    sftFCB,DWORD,<-1,-1>    ; [SYSTEM] pointer to FCB cache table
;m        I_am    KeepCount,WORD,<-1>     ; [SYSTEM] count of FCB opens to keep
;m        I_am    NUMIO,BYTE,<0>          ; [SYSTEM] Number of disk tables
;m        I_am    CDSCOUNT,BYTE,<0>       ; [SYSTEM] Number of CDS structures in above
; A fake header for the NUL device
;m        I_am    NULDEV,DWORD            ; [SYSTEM] Link to rest of device list
;m        DW      DEV_CHAR_DEV OR DEV_NULL; [SYSTEM] Null device attributes
;m        short_addr  SNULDEV             ; [SYSTEM] Strategy entry point
;m        short_addr  INULDEV             ; [SYSTEM] Interrupt entry point
;m        DB      "NUL     "              ; [SYSTEM] Name of null device
;m        I_am    Splices,BYTE,<0>        ; [SYSTEM] TRUE => splices being done
;m        I_am    Special_Entries,WORD,<0>; [SYSTEM] address of specail entries   ;AN000;
;m        I_am    IFS_DOS_CALL,DWORD      ; [SYSTEM] entry for IFS DOS service    ;AN000;
;m        I_am    IFS_HEADER,DWORD        ; [SYSTEM] IFS header chain             ;AN000;
;m        I_am    BUFFERS_PARM1,WORD,<0>  ; [SYSTEM] value of BUFFERS= ,m         ;AN000;
;m        I_am    BUFFERS_PARM2,WORD,<0>  ; [SYSTEM] value of BUFFERS= ,n         ;AN000;
;m        I_am    BOOTDRIVE,BYTE          ; [SYSTEM] the boot drive               ;AN000;
;m        I_am    DDMOVE,BYTE,<0>         ; [SYSTEM] 1 if we need DWORD move      ;AN000;
;m        I_am    EXT_MEM_SIZE,WORD,<0>   ; [SYSTEM] extended memory size         ;AN000;

ifdef NOT_MVDM ; BUGBUG danno 07-Dec-1988
        PUBLIC  HASHINITVAR             ; [SYSTEM]                              ;AN000;
        I_am    BUF_HASH_PTR,DWORD      ; [SYSTEM] buffer Hash table addr       ;AN000;
        I_am    BUF_HASH_COUNT,WORD,<1> ; [SYSTEM] number of Hash entries       ;AN000;
        I_am    SC_CACHE_PTR,DWORD      ; [SYSTEM] secondary cache pointer      ;AN000;
        I_am    SC_CACHE_COUNT,WORD,<0> ; [SYSTEM] secondary cache count        ;AN000;

IF      BUFFERFLAG

        I_am    BUF_EMS_SAFE_FLAG,BYTE,<1>      ; indicates whether the page used by buffers is safe or not
        I_am    BUF_EMS_LAST_PAGE,4,<0,0,0,0>   ; holds the last page above 640k
        I_am    BUF_EMS_FIRST_PAGE,4,<0,0,0,0>  ; holds the first page above 640K
        I_am    BUF_EMS_NPA640,WORD,<0>         ; holds the number of pages above 640K

ENDIF

        I_am    BUF_EMS_MODE,BYTE,<-1>  ; [SYSTEM] EMS mode                     ;AN000;
        I_am    BUF_EMS_HANDLE,WORD     ; [SYSTEM] buffer EMS handle            ;AN000;
        I_am    BUF_EMS_PAGE_FRAME,WORD ,<-1>;[SYSTEM] EMS page frame number    ;AN000;
        I_am    BUF_EMS_SEG_CNT,WORD,<1>; [SYSTEM] EMS seg count                ;AN000;
        I_am    BUF_EMS_PFRAME,WORD     ; [SYSTEM] EMS page frame seg address   ;AN000;
        I_am    BUF_EMS_RESERV,WORD,<0> ; [SYSTEM] reserved                     ;AN000;

IF      BUFFERFLAG
;m        I_am    BUF_EMS_MAP_BUFF,1,<0>  ; this is not used to save the state of the
                                        ; of the buffers page. this one byte is
                                        ; retained to keep the size of this data
                                        ; block the same.
ELSE
;m        I_am    BUF_EMS_MAP_BUFF,12,<0,0,0,0,0,0,0,0,0,0,0,0>   ; map buufer    ;AN000;
ENDIF

; End of SYSINITVar block

IF NOT_FILTER
;
; Sharer jump table
;
PUBLIC  JShare
        EVEN
JShare  LABEL   DWORD
        DW      OFFSET DOSGROUP:BadCall, 0
        DW      OFFSET DOSGROUP:OKCall,  0  ;   1   MFT_enter
        DW      OFFSET DOSGROUP:OKCall,  0  ;   2   MFTClose
        DW      OFFSET DOSGROUP:BadCall, 0  ;   3   MFTclU
        DW      OFFSET DOSGROUP:BadCall, 0  ;   4   MFTCloseP
        DW      OFFSET DOSGROUP:BadCall, 0  ;   5   MFTCloN
        DW      OFFSET DOSGROUP:BadCall, 0  ;   6   set_block
        DW      OFFSET DOSGROUP:BadCall, 0  ;   7   clr_block
        DW      OFFSET DOSGROUP:OKCall,  0  ;   8   chk_block
        DW      OFFSET DOSGROUP:BadCall, 0  ;   9   MFT_get
        DW      OFFSET DOSGROUP:BadCall, 0  ;   10  ShSave
        DW      OFFSET DOSGROUP:BadCall, 0  ;   11  ShChk
        DW      OFFSET DOSGROUP:OKCall , 0  ;   12  ShCol
        DW      OFFSET DOSGROUP:BadCall, 0  ;   13  ShCloseFile
        DW      OFFSET DOSGROUP:BadCall, 0  ;   14  ShSU
endif ; BUGBUG danno 07-Dec-1988

ENDIF

MSCT001E    EQU THIS BYTE
V86CONST    ENDS

        END
