DIRECTORY Diablo, PrincOpsUtils USING [BITOR], Printer USING [WritePrinter], Rope USING [ROPE]; DiabloImpl: CEDAR PROGRAM IMPORTS Diablo, PrincOpsUtils, Printer EXPORTS Diablo = BEGIN OPEN Printer; Strobe: WORD = 100000B; Error: PUBLIC ERROR [reason: Rope.ROPE] = CODE; PutChar: PUBLIC SAFE PROC [char: CHAR] = TRUSTED { ENABLE UNWIND => NULL; c: WORD _ LOOPHOLE[char]; timeOutCnt: CARDINAL _ 0; IF Diablo.Fault[] THEN ERROR Error["Diablo has a fault."]; UNTIL Diablo.Ready[] DO ENDLOOP; WritePrinter[c]; -- set up the data WritePrinter[PrincOpsUtils.BITOR[c, Strobe]]; -- strobe the data WritePrinter[c]; -- clear the strobe }; END. $DiabloImpl.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Last Edited: Rumph, May 21, 1984 12:55:31 pm PDT Tim Diebert: September 26, 1985 3:55:22 pm PDT timeOutCnt _ timeOutCnt + 1; IF timeOutCnt = LAST [CARDINAL] THEN ERROR Error["Diablo failed to become ready."]; Κ«˜code™Kšœ Οmœ1™