{
   File:  BandBLT.dfn
   Description: Definitions for use by BandBLT.mc and BandBLTSubs.mc
   Author: Patrick PXO     
   Created: February 27, 1981
   Last edit: CRF       26-Oct-86 12:22:11:  Added trapzItemLength.
   Last edit: CRF       21-Jul-86 17:07:21:  Changed UnusedBLEntry to Trapezoid; added reRead.9, reRead.A, writeLO.4, and SaveReadPtr.4.
   Last edit: RDH       30-Oct-85 11:18:04:  Add defs and macros used by Bandblt from Dandelion.dfn.
   Last edit: PXO       March 19, 1981  8:54 PM:  Changes for re-work of handling of inks, levels, and leftovers.
   Last edited by: Dennis DEG      @ 20-Sep-83 20:40:58: Changed name to .dfn and removed Bravo information.
   Last edited by: Dennis DEG      @  2-Sep-84  0:29:06: add copyright notice.
}

{	Copyright (C) 1981, 1983 by Xerox Corporation.  All rights reserved. }

	Set[Bandwidth, 16'd];
	Set[LOlist, 0];
	Set[BL, 1];
	Set[Nil, 0];

	MacroDef[BLentryTypeRot, LRot4];
	Set[BLentryTypeMask, 0];
	MacroDef[BLentryDISP, DISP4[#1, BLentryTypeMask]];

{
	Bandlist entries
}
	Set[EndOfBand, 8];
	Set[EndOfPage, 9];
	Set[Rectangle, 0A]; {must be even; yloc is masked with u1FFF}
	Set[SetLevel, 0B];
	Set[SetInk, 0C];
	Set[Roulette, 0D];
	Set[Trapezoid, 0E];
	Set[Nop, 0F];

	Set[trapzItemLength, 0A];

	MacroDef[ListFlagDisp, L3Disp];

{
	Subroutine return definitions:
}

	Set[Read.0, 0]{used for Read};
	Set[Read.1, 1]{used for Read};
	Set[Read.2, 2]{used for Read};
	Set[reRead.3, 3]{used for reRead};
	Set[reRead.4, 4]{used for reRead};
	Set[Read.5, 5]{used for Read};
	Set[reRead.6, 6]{used for reRead};
	Set[Read.7, 7]{used for Read};
	Set[reRead.8, 8]{used for reRead};
	Set[reRead.9, 9]{used for reRead};
	Set[reRead.A, 0A]{used for reRead};
	Set[reRead.B, 0B]{used for reRead};
	Set[reRead.C, 0C]{used for reRead};
	Set[reRead.D, 0D]{used for reRead};
 	Set[reRead.E, 0E]{used for reRead};

	Set[SaveReadPtr.0, 0]{used for SaveReadPtr};
	Set[SaveReadPtr.1, 1]{used for SaveReadPtr};
	Set[SaveReadPtr.3, 3]{used for SaveReadPtr};
	Set[SaveReadPtr.4, 4]{used for SaveReadPtr};
	
	Set[writeLO.0, 0]{used for writeLO - branch target};
	Set[writeLO.1, 1]{used for writeLO - 3 word leftover (char or rectangle)};
	Set[writeLO.2, 2]{used for writeLO - 1 word leftover (endOfBand)};
	Set[writeLO.4, 4]{used for writeLO - 3+7 word leftover (trapezoid)};

	Set[Rot12.0, 0]{used for TempRot12};
	Set[Rot12.2, 2]{used for TempRot12};
	Set[Rot12.3, 3]{used for TempRot12};
	Set[Rot12.4, 4]{used for TempRot12};
	Set[Rot12.5, 5]{used for TempRot12};
	Set[Rot12.6, 6]{used for TempRot12};
	Set[Rot12.7, 7]{used for TempRot12};
	Set[Rot12.8, 8]{used for TempRot12};

{definitions for writeLO}
	Set[OneWordLO, 0C]; {leftover list entry with length = 1 word}
	Set[ThreeWordLO,0]; {leftover list entry with length = 3 words}

	Set[PageNumToPtr.0, 0]{used for PageNumToPtr};
	Set[PageNumToPtr.1, 1]{used for PageNumToPtr};


{BandBLT stuff}

	MacroDef[PgCrBRANCH, BRANCH[#1, #2, 1]];
	MacroDef[CancelPgCross, IfEqual[#0, 1, CANCELBR[#1, 2], CANCELBR[#1, #2]]];
	MacroDef[CancelDisp, CANCELBR[#1, 0F]];
	Set[ParamBlkSize, 9];
	Set[Arg0, Sub[17'd, ParamBlkSize]];