EUArith.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Louis Monier March 31, 1986 11:25:16 am PST
McCreight, March 27, 1986 3:01:53 pm PST
DIRECTORY EUUtils, Dragon, DragOpsCross, Core, Rope;
EUArith: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE = Rope.ROPE;
-- Big Endians reservation: 0 is the high-order bit!
-- A CARD is a long cardinal with bytes in the (wrong) Dorado order; it is the correct representation for doing arithmetic
CARD: TYPE = LONG CARDINAL;
-- A Word is an array of bits in the Dragon order; it is the right representation for bit manipulations
Word: TYPE = DragOpsCross.Word;
Byte: TYPE = DragOpsCross.Byte;
EBFLC: PUBLIC PROC [c: CARD, index: [0..32)] RETURNS [BOOL];
EByteFLC: PUBLIC PROC [c: CARD, index: [0..4)] RETURNS[CARDINAL];
DoubleADD: PUBLIC PROC [a, b: CARD, carry: BOOL] RETURNS [s: CARD, c32: BOOL];
WordNot: PUBLIC PROC [c: CARD] RETURNS [CARD];
WordAnd: PUBLIC PROC [a, b: CARD] RETURNS [CARD];
WordOr: PUBLIC PROC [a, b: CARD] RETURNS [CARD];
WordXor: PUBLIC PROC [a, b: CARD] RETURNS [CARD];
LispTest: PUBLIC PROC [c: CARD] RETURNS [bogus: BOOL];
FieldOp: PUBLIC PROC [left, right, fieldDesc: CARD] RETURNS [result: CARD];
ApplyAluOp: PUBLIC PROC [op: EUUtils.ALUOpcode, a, b: CARD, carryIn: BOOL] RETURNS [res: CARD, c32: BOOL];
OpToCarryOut: PUBLIC PROC [op: Dragon.ALUOps, computedC, prevC: BOOL] RETURNS [BOOL];
OpToCarryIn: PUBLIC PROC [op: Dragon.ALUOps, c: BOOL] RETURNS [BOOL];
ALUOperation: PUBLIC PROC [aluOp: Dragon.ALUOps, a, b: CARD, prevC: BOOL] RETURNS [res: CARD, c32, nextC: BOOL];
ExplodeKReg: PUBLIC PROC [k: CARD] RETURNS [a, b, c: CARD, st3AIsC: BOOL, lSrc, rSrc, stSrc: NAT];
END.