;       SCCSID = @(#)cachdata.asm	6.1 90/11/18
;	SCCSID = @(#)cachdata.asm      13.4 90/02/13
;
;
; This file defines the order of code modules and combines them into
; segments for code swapping mechanism.
; Non-debug model has two code segments.  Each code segments is combined
; from 4 modules; first module is resident, the others are swappable.
; Debug model is similar except each module reside in a seperate segment.
;
; This file also defines the space for the cache buffer headers.  It is
; necessary so that we ensure that it ALWAYS gets placed at the end
; of the default data segment
;

ifndef MEDIUM_MODEL

CGROUP group _TEXT,_TEXTEND,ASWAP0,ASWAP0END,ASWAP1,ASWAP1END,ASWAP2,ASWAP2END
C_BGRP group _BTXT,_BTXTEND,BSWAP0,BSWAP0END,BSWAP1,BSWAP1END,BSWAP2,BSWAP2END

G__TEXT  equ <CGROUP>
G_ASWAP0 equ <CGROUP>
G_ASWAP1 equ <CGROUP>
G_ASWAP2 equ <CGROUP>
G__BTXT  equ <C_BGRP>
G_BSWAP0 equ <C_BGRP>
G_BSWAP1 equ <C_BGRP>
G_BSWAP2 equ <C_BGRP>


else


G__TEXT  GROUP _TEXT,  _TEXTEND
G_ASWAP0 GROUP ASWAP0, ASWAP0END
G_ASWAP1 GROUP ASWAP1, ASWAP1END
G_ASWAP2 GROUP ASWAP2, ASWAP2END
G__BTXT  GROUP _BTXT,  _BTXTEND
G_BSWAP0 GROUP BSWAP0, BSWAP0END
G_BSWAP1 GROUP BSWAP1, BSWAP1END
G_BSWAP2 GROUP BSWAP2, BSWAP2END

endif

IRP SEG,<_TEXT,ASWAP0,ASWAP1,ASWAP2,_BTXT,BSWAP0,BSWAP1,BSWAP2>

SEG segment word public 'CODE'

assume  CS:G_&SEG

public  SEG&_START

SEG&_START label byte

SEG  ends


SEG&END segment word public 'CODE'

assume  CS:G_&SEG

public  SEG&_END

SEG&_END label byte

SEG&END  ends

ENDM

DGROUP GROUP BEGDATA, _DATA, CONST, _BSS, c_common, CACHE

BEGDATA segment word public 'DATA'
;   BYTE abHotFixBuf[SECSIZE] = {
;       0x4c, 0x4b, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00,
;       0x00, 0x57, 0x50, 0x4d, 0x00, 0x00, 0x00, 0x00,
;       0x00, 0x00, 0x4a, 0x45, 0x50, 0x00, 0x00, 0x00,
;       0x00, 0x00, 0x00, 0x4d, 0x00, 0x48, 0x00, 0x00,
;       0x00, 0x00, 0x00, 0x00, 0x47, 0x4f, 0x00, 0x00,
;       0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x52, 0x00,
;   };
public abHotFixBuf
abHotFixBuf db 4cH, 4bH, 50H, 00H, 00H, 00H, 00H, 00H
            db 00H, 57H, 50H, 4dH, 00H, 00H, 00H, 00H
            db 00H, 00H, 4aH, 45H, 50H, 00H, 00H, 00H
            db 00H, 00H, 00H, 4dH, 00H, 48H, 00H, 00H
            db 00H, 00H, 00H, 00H, 47H, 4fH, 00H, 00H
            db 00H, 00H, 00H, 00H, 00H, 4aH, 52H, 00H
            db (512 - 48) dup (0)

;   extern ULONG ulFEAList;
extrn ulFEAList:dword

;   ULONG aulEaopNull[3] = { 0, (ULONG)&ulFEAList, 0L };
public aulEaopNull
aulEaopNull dd  0, ulFEAList, 0

BEGDATA   ends

_DATA SEGMENT WORD PUBLIC 'DATA'
_DATA ENDS

CONST SEGMENT WORD PUBLIC 'CONST'
CONST ENDS

_BSS SEGMENT WORD PUBLIC 'BSS'
_BSS ENDS

c_common SEGMENT WORD PUBLIC 'BSS'
c_common ENDS

;
; define pvoid since it is used in a bufnode
;
PVOID struc
	dd ?
PVOID ends

include misc.inc	; for LSN typedef
include buf.inc		; for BUFNODE definition

CACHE SEGMENT WORD PUBLIC 'CACHE'
ASSUME DS:DGROUP

PUBLIC ABUFCACHE
ABUFCACHE DB SIZE BUFNODE DUP (?)	; define ONE bufnode

CACHE ENDS
END
