TITLE[EOMDefs];
*last edited by rej August 6, 1979  1:22 PM	added code for new CSB
*last edited by srd February 26, 1980  2:30 PM	added hooks for verdi disk change.
*last edited by srd February 29, 1980  1:45 PM	moved bit in eomState to allow
*					different new list size specification.
*last edited by srd March 24, 1980  9:11 AM	eliminated font bank register
*last edit by srd March 26, 1980  1:35 PM		modified new list size mask
*last edit by srd March 27, 1980  2:34 PM		added new list overflow reason bit
*REGISTER OFFSETS AND TASK CODE STARTS

SET[loTaskIOoffset,LSHIFT[eomLoTask,4]];
SET[hiTaskIOoffset,LSHIFT[eomHiTask,4]];
SET[hiEOMTaskCodeStart,LSHIFT[eomHiTaskPage,10]];
SET[loEOMTaskCodeStart,LSHIFT[eomLoTaskPage,10]];

*HIGH TASK DISPATCHES

SET[hiTaskWakeupDispatch,ADD[hiEOMTaskCodeStart,20]];
SET[hiTaskWakeupReasonDisp,ADD[hiEOMTaskCodeStart,40]];

*LOW TASK DISPATCHES

SET[loTaskMainDispatch,ADD[loEOMTaskCodeStart,20]];
SET[loTaskMesaDispatch,ADD[loEOMTaskCodeStart,40]];
SET[loTaskBlockBldDispatch,ADD[loEOMTaskCodeStart,60]];
SET[ruleMaskDispatch,ADD[loEOMTaskCodeStart,100]];
SET[type6Dispatch,ADD[loEOMTaskCodeStart,140]];

*HARDWARE INTERFACE REGISTER DEFINITIONS

SET[wakeUpType,3];		* (input)
SET[opcStartupIn,1];		* (input)
SET[bandBufferCmndReg,1];	* (output)
SET[loTaskStatus,1];		* (input)
SET[outputChannelBuffer,2];	* (input)
SET[loTaskCommandReg,3];	* (output)
SET[rosStartupCmnds,5];	* (output)
SET[opcStartupOut,6];	* (output)
SET[inputParameterBuffer,16];	* (output)
SET[inputChannelBuffer,17];	* (output)

*CSB OFFSET VALUES

SET[wakeupMaskOffset,0];
SET[wakeupReasonOffset,1];
SET[mesaCommandOffset,2];
SET[statusOffset,3];
SET[fontPointerOffset,4];
SET[workingStorageOffset,6];
SET[fragmentsOffset,10];
SET[auxCmnd,11];
SET[bandListOffset,12];
SET[outputBufferOffset,14];
SET[outputBufferRingChar,17];

*JUNK AREA OFFSET VALUES

SET[parametricBlockCount,14];
SET[thirdJunkQuad,10];

*INPUT REGISTER ADDRESSES - These are register addresses for use in INPUT operations to perform
	*the resets.

SET[hiTaskPause,10];
SET[resetMesaCommand,14];
SET[resetParityError,12];
SET[resetBandSwitch,16];
SET[resetLoTaskRun,17];

*CSB LOCATION

*MC[eomLhLoCsbBase,400];
*MC[eomRhLoCsbBase,320];
*MC[eomHiCsbBase,0];
SET[eomCSBpage,377];					*CSB address
SET[eomCSBbank,0];
MC[eomRhLoCSBbase, LSHIFT[eomLoTask,4]];
MC[eomLhLoCSBbase, LSHIFT[eomCSBpage,10]];
MC[eomLhHiCSBbase, LSHIFT[eomCSBbank,10]];
MC[eomRhHiCSBbase, ADD[eomCSBbank,1]];

*REGISTER COMMANDS

MC[setLoTaskRun,3];
MC[eomStart,1];
MC[hiTaskUnPause,40];

*PARAMETER BLOCK CONSTANTS

MC[previousLineNotPresent,20];
MC[ruleParmWord2,160];
MC[partialStateSave,400];

*WORK SPACE RING CONSTANTS

MC[newListReadRingBase,60];
MC[newListWriteRingBase,74];
MC[newListSizeMask,76000];
*MC[newListSizeMask,74000];
MC[oldListInitA,4000];
MC[oldListInitB,10000];
MC[oldListInitC,20000];
MC[oldListInitD,40000];
*MC[oldListInit,20000];		*This will cause the old list to begin at 20020B.

*IMAGINAL RING CONSTANTS

*MC[incSectorsFilledByOne,400];
*SET[sectorsFilledFieldWidth,10];
*SET[blocksPerSectorStartBit,sectorsFilledFieldWidth];
*SET[blocksPerSectorFieldWidth,10];
MC[incSectorsFilledByOne,1000];
SET[sectorsFilledFieldWidth,7];
SET[blocksPerSectorStartBit,sectorsFilledFieldWidth];
SET[blocksPerSectorFieldWidth,11];

*INTERNAL FLAG CONSTANTS

MC[bandDone,4];
MC[workingFromNewList,100000];
MC[parametricModeFlag,400];
MC[firstBlockAndSectorEmpty,4000];
MC[freezeEOBChar,1000];
MC[newListAndParametricMode,100400];
MC[firstParametricReturnBlock,10];
MC[firstParametricAndBandDone,14];
MC[hiTaskRunning,1];
MC[eopAlreadySent,2];
MC[nakedNotifyRegisterAddress,21];
MC[forceWord8ToZero,40000];
MC[abnormalInkIndication,100000];

*CSB COMMUNICATION CONSTANTS

MC[image0SectorEmpty,1];
MC[image1SectorEmpty,2];
MC[image2SectorEmpty,4];
MC[image3SectorEmpty,10];
MC[bandSwitch,20];
MC[imageUnderflow,40];
MC[bandAllReturned,100];
MC[workSpaceOverflow,200];
MC[EOPProcessed,400];
MC[parityError,1000];
MC[bandBufferBehind,2000];
MC[firstBandReady,4000];
MC[newListOverflow,10000];


*TASK LEVEL REGISTERS (tasks are in the same quadblock, so they share registers)

SETTASK[eomLoTask];

**********

RV[eomInkSetting,0];		*this is the current ink setting.  It is merged into character
			*and rule parameter blocks by the low task.  It is initialized
			*by the z-Plane setting code.

**********

RV[eomBandListPointer,1];	*This is the offset used for accessing band list entries.

**********

RV[eomZPlane,3];		*this is the z-Plane value used by the low task for block building

**********

RV[eomFragA,4];		*This quadblock is where parameter block fragments are placed.
RV[eomFragB,5];		*Some of these locations are used as temporaries various places
RV[eomFragC,6];		*in the low task code.
RV[eomFragD,7];

**********

RV[eomBListEntryA,10];	*this register pair is the destination of PFETCH2
RV[eomBListEntryB,11];		*operations which fetch band list entries.

**********

RV[eomBandListA,12];		*this register pair is the base pointer used for accessing
RV[eomBandListB,13];		*band list entries.

**********

RV[eomParmA,14];		*This is the area where quadwords of parameter blocks are
RV[eomParmB,15];		*created by the low task
RV[eomParmC,16];
RV[eomParmD,17];

**********

RV[eomNewListRead,20];		*The read pointer into the new list.

**********

RV[eomNewBlocksFull,21];	*this contains the count of full slots in the new ring.
			*  "totalNewListBlocks" is the max value this can contain.
			*   -1 indicates the ring is empty.

**********

RV[eomCsbBaseLo,22];	*This is the double base pointer used for accessing the CSB.
RV[eomCsbBaseHi,23];	*The high word is not really right, but since Lo + T will never
			*carry, it will do.

**********

RV[eomSectorsFilled,24];	*The max value of this register is 1 less than the number of sectors
			*filled.  This is because it is used as a fast branch. 

**********

RV[eomActiveAttributes,25];	*The microcode attributes for the object which most recently had a
			*"first" data transfer (hi task IOATTEN branch 0).  The attributes
			*are in bits 15, 16, and 17.  The 15B high order bits are always
			*zero, except when the lo task has set the register to 177777B
			*to force a base register load.  This happens on page startup,
			*and on parametric page continue.
**********

RV[eomOldBlocksFull,26];	*A count of the number of blocks of data in the old list which
			*remain to be sent out on the current band.
**********

RV[eomOldListWrite,27];		*The write pointer into the old list.

**********

RV[eomOldBlocksReturned,30];	*A count of the number of blocks of data in the old list which have
			*been returned during the current band.
**********

RV[eomPreviousZPlane,31];	*z-Plane value of previous block transferred

**********

RV[eomDataTransferOffset,32];	*The offset value used for data transfers.

**********

RV[eomNewListWrite,33];		*this is the write pointer into the new list.

**********

RV[eomBlocksRemaining,34];	*The max value of this register is 2 less than the number of
			*blocks in a sector.  This is because it is used as a fast branch
			*and is decremented during the instruction which does the fast
			*branch.

RV[eomAlternateZPlane,35];	*next z-Plane value out of alternate list

RV[eomImageXferOffset,35];	*This register is used for image ring wrap computations.  It is
			*fetched with a PFETCH2 along with eomBlocksRemaining.  It is also
			*used as a non-task specific temporary for the naked notify
			*operation in eomHiTaskModifyWakeupReasons.
**********

RV[eomParameterTransferBaseA,36];	*this register pair is used as the long base pair for
RV[eomParameterTransferBaseB,37];	*accessing the workspace and parameter block fragments.
				*This, along with fontPointerA,B is initialized with a
				*quadWord reference.
**********

RV[eomOldListRead,60];		*The read pointer into the old list.

**********


RV[eomFragments,61];		*The pointer, relative to parameterTransferBaseA,B, which indicates
			*the start of the fragments table.  It also indicates the end of
			*the workspace.
**********

RV[eomState,62];		*This register contains 2 fast branch flags defined as follows:
				*sign bit = 0 implies working from old list
				*sign bit = 1 implies working from new list
				*bit 15 = 0 implies hi task paused
				*bit 15 = 1 implies hi task running
			*and several slow branch flags defined as follows:

			*LO BYTE:
				*bit 14 = 0 implies EOP not sent
				*bit 14 = 1 implies EOP sent
				*bit 13 = 0 implies band in progress
				*bit 13 = 1 implies band done
				*bit 12 = 0 implies first bitmap request
				*bit 12 = 1 implies not first request

			*HI BYTE:
				*bit 7 = 0 implies real time generation
				*bit 7 = 1 implies parametric time generation
				*bit 6 = 0 implies OK to ship EOB character.
				*bit 6 = 1 implies do not ship EOB character.

				*BITS 1,2,3,4 are the four most significant bits of the
				*new list size.
**********

RV[eomDispField,63];		*The register used for the dispatch fields and temporaries in the
			*high task.

**********

RV[eomDataTransferBaseA,64];	*The base from which compressed data transfers are done.
RV[eomDataTransferBaseB,65];

**********

RV[eomTerminalBlockAddress,66];	*For images, this gives the end of the ring, in blocks.

**********

RV[eomRingChar,67];			*The boundary between fields in this register are
				*controlled by the imaginal ring constant values.

**********

RV[eomParmBlock0,74];	*parmBlock0 and blockPointer are used in a PFETCH2.  They must be
RV[eomBlockPointer,75];		*together word 1 of the parameter block

**********

RV[eomTemp,76];

**********

RV[eomTemp1,77];

**********

END;