DIRECTORY CD, Rope, SoftHdwBasics, ViewerClasses; SoftHdwAssembly: CEDAR DEFINITIONS = BEGIN ArrayPositions: TYPE = SoftHdwBasics.ArrayPositions; ArrayPosition: TYPE = SoftHdwBasics.ArrayPosition; ArrayPositionRec: TYPE = SoftHdwBasics.ArrayPositionRec; Orientation: TYPE = SoftHdwBasics.Orientation; Position: TYPE = SoftHdwBasics.Position; NodeType: TYPE = SoftHdwBasics.NodeType; TileType: TYPE = NodeType[OToP..RAMOdd]; Programs: TYPE = LIST OF Program; Program: TYPE = REF ProgramRec; ProgramRec: TYPE = RECORD [ instances: ProgramInstances _ NIL, tiles: ArrayPositions _ NIL, object: CD.Object _ NIL]; ProgramInstances: TYPE = LIST OF ProgramInstance; ProgramInstance: TYPE = REF ProgramInstanceRec; ProgramInstanceRec: TYPE = RECORD [ program: Program, chip: Position, minorArray: Position]; Create: PROC [instances: ProgramInstances _ NIL, tiles: ArrayPositions _ NIL, object: CD.Object _ NIL] RETURNS [program: Program]; Instance: PROC [program: Program, minorArray: Position _ [0, 0], chip: Position _ [0, 0]] RETURNS [instance: ProgramInstance]; CPI: PROC [old: ProgramInstances, program: Program, minorArray: Position _ [0, 0], chip: Position _ [0, 0]] RETURNS [new: ProgramInstances]; CTI: PROC [old: ArrayPositions, type: TileType, orientation: Orientation, grain: Position, minorArray: Position _ [0, 0], chip: Position _ [0, 0]] RETURNS [new: ArrayPositions]; AbutX: PROC [t1, t2, t3, t4, t5, t6: Program _ NIL] RETURNS [program: Program]; AbutY: PROC [t1, t2, t3, t4, t5, t6: Program _ NIL] RETURNS [program: Program]; ArrayX: PROC [program: Program, nx: INT] RETURNS [array: Program]; ArrayY: PROC [program: Program, ny: INT] RETURNS [array: Program]; Size: PROC [program: Program] RETURNS [size: Position]; Parse: PROC [object: CD.Object] RETURNS [program: Program]; EnumerateTiles: PROC [program: Program, eachTile: EachTileProc]; EachTileProc: TYPE = PROC [position: ArrayPosition]; Print: PROC [program: Program] RETURNS [object: CD.Object]; PrintAndDraw: PROC [program: Program] RETURNS [design: CD.Design]; CDToArrayPosition: PROC [minorArrayHeight: INT, mouse: Position] RETURNS [ambiguous: BOOL, position: ArrayPosition]; OpenDesign: PROC [designName: Rope.ROPE] RETURNS [design: CD.Design]; HighlightDesign: PROC [design: CD.Design, minorArrayHeight, minorArrayWidth: INT, positions: ArrayPositions _ NIL, viewer: ViewerClasses.Viewer _ NIL, label: Rope.ROPE _ NIL]; LoadTile: PROC [design: CD.Design, tileName: Rope.ROPE] RETURNS [program: Program]; END. zSoftHdwAssembly.mesa Copyright Σ 1988 by Xerox Corporation. All rights reserved. Barth, July 14, 1989 5:29:35 pm PDT Program Creation all tile.types must be in TileType. builds from left to right. builds from top to bottom. Aligns nx tiles in the X direction. Aligns ny tiles in the Y direction. Parse And Print The unit of size is minor array. Utilities If viewer is NIL then applies to all viewers of design. positions=NIL removes all previous highlight. Viewers scale to the best zoom on the highlighted area. Does PutSizes[object, NEW[ArrayPositionRec _ [ chip: [0, 0], minorArray: Size[program], grain: [4, 4]]]] Κ‚˜codešœ™K™