TITLE[EOMStarDefs];
%
Edited by Tom Henning Jan 4, 1983 used registers 70, 71, 72, and 73, for Trapezoid updates, these registers were previously reserved for EIM microcode, the 5700 presently have no input scanners
Edited by Tom Henning December 15, 1982 also use eomTemp and eomTemp1 as eomNextY and eomNextHeight, to implement Trapezoids
Edited by Tom Henning July 1, 1982 deleted eomZPlane, was used by LoTask, no longer used
Edited by Tom Henning June 30, 1982 changed edit history to reflect Star graphics only

From EOMDefs.mc Rubicon version 6/30/82, to be extended for Star graphics
Previously edited by Steve Dashiell, Ron Joiner, and Ed Fiala
Originally written by Steve Dashiell
%

*REVISION LEVELS

*Revision Level 1 - - March 2, 1981  1:39 PM
*Revision Level 2 - - March 6, 1981  1:33 PM	This revision is bad
*Revision Level 3 - - March 12, 1981  1:07 PM
*Revision Level 4 - - July 1, 1982  11:19 AM, Star Graphics support

*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]];
SET[ruleMaskDispatchA,ADD[7400,100]];

*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];
SET[endOfPageCodeLoc,16];

*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];
MC[hiEOPcode,120000];
MC[loEOPcode,100];
MC[bandListEOPpointerMinusTwo,SUB[endOfPageCodeLoc,2]];
MC[highFontBitsMask,30000];
MC[eomLastNewWasZ,40];
MC[eomLastOldWasZ,20];
MC[eomLastOldNewWasZ,60];
MC[eomRuletteMode,1];
MC[revisionLevel,4];			*REVISION LEVEL NUMBER.  MUST UPDATE WHEN ANY CHANGE
				*OCCURS TO THE CODE.

*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[eomRulettesLeft,2];	*In RuletteMode, this is the number of Rulettes remaining.

**********

RV[eomRuletteInkPointer,3];	*In RuletteMode, this points to the 16x16 inkwell to use on the Rulettes.

**********

*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[eomOldZNewZ,31];	*OldListZPlane[0..7],,NewListZPlane[10..17]

**********

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
			*bit 11 = 0 implies last Old List Block was not a ZMarker
			*bit 11 = 1 implies last Old List Block was a ZMarker
			*bit 10 = 0 implies last New List Block was not a ZMarker
			*bit 10 = 1 implies last New List Block was a ZMarker

			*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.
				*bit 5 is used also
**********

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[eomSavedforEIM0,70];		*registers 70 to 73 may be used by the EIM task
RV[eomSavedforEIM1,71];
RV[eomSavedforEIM2,72];
RV[eomSavedforEIM3,73];

**********

RV[eomTrapezoid0,70];	*registers 70 to 73 may be used by the EIM task
RV[eomTrapezoid1,71];	*we are using it for trapezoid updates
RV[eomTrapezoid2,72];	*this assumes that no input scanner is used
RV[eomTrapezoid3,73];

***********

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[eomParmBlock1,75];		*together word 1 of the parameter block

**********

RV[eomTemp,76];

**********

RV[eomTemp1,77];

**********

RV[eomZCheck0,76];
RV[eomZCheck1,77];

**********

RV[eomNextY,76];
RV[eomNextHeight,77];

**********

END;