// VMem.decl - data structures and constants common to VMemInit and VMemB
// Edited December 13, 1984  11:50 AM by Bill van Melle
// Edited April 11, 1982  4:44 PM by Bill van Melle
// File created on November 20, 1980  12:23 AM by Beau Sheil

structure BPT:			// length is known in Vmema.asm
 [ NEXT word = 			// next buffer in chain *** MUST BE FIRST
		[ LOCK bit
		  ONLYNEXT bit 15
		]
   VP word = [ STATE word	// various overflow values mean empty or NA 
             ]
   FILEP word 			// page number in file
 ]

manifest
 [ 
   LastVMSegment = 255
   BigAddressSpace = true
   lBPT = size BPT/16
   EMPTY = #177776
   UNAVAIL = #177777
 ]

// Hardware memory map definitions - Dorado Serial 1 compatible

manifest
  [	REFbit   = #100000
	DIRTYbit =  #10000
	VACANT   =  #30000
	OCCUPIED =      #0
  ]

structure PVP:			// paged virtual page number
 [ key1 bit 11			// first level key
   key2 bit  5			// second level key = log PMBLOCKSIZE
 ]


external [ @Bpt; @BptSegment; BptSize; @BufVp; @BufRP; @RPoffset; LogPagingFlag ]