MesaBasics.mesa
Copyright Ó 1989, 1991 by Xerox Corporation. All rights reserved.
JKF December 20, 1989 2:04:05 pm PST
Willie-s, August 5, 1991 5:27 pm PDT
DIRECTORY
Basics USING [RawCards, RawChars];
MesaBasics: DEFINITIONS = {
CHARPtr: TYPE ~ ORDERED POINTER TO Basics.RawChars;
WORDPtr: TYPE ~ ORDERED POINTER TO Basics.RawCards;
MoveWords Moves len words (where a word is an 'int') from src to dst. The caller does not assure disjointness.
(Actually, the current implementation does not require disjointedness.)
MoveWords: PROC [dst, src: WORDPtr, len: CARDINAL];
MoveWordsDisjoint Moves len words (where a word is an 'int') from src to dst. For efficiency, the caller assures disjointedness.
MoveWordsDisjoint: PROC [dst, src: WORDPtr, len: CARDINAL];
Tests the two multi-word variables for equality.
EqualWords: PROC [src1, src2: WORDPtr, len: CARDINAL] RETURNS[CARD];
MoveBytes Moves len bytes from src to dest, and returns src. No assumptions are made about disjointedness. The pointers are not aligned on word boundaries
MoveBytes: PROC [dest, src: CHARPtr, len: CARDINAL];
MoveBytesDisjoint Moves len bytes from src to dest, and returns src. For efficiency, the caller assures disjointedness.
(Actually, the current implementation does not require disjointedness.)
MoveBytesDisjoint: PROC [dest, src: CHARPtr, len: CARDINAL];
ExtractField Extracts the field from any base pointer (pointer to word) at any bit offset. The word given has the bits right-justified. The other bits are set to zero.
ExtractField: PROC [base: WORDPtr, offset: INT, bits: CARD] RETURNS [WORD];
DepositField Deposits the field to any base pointer at any bit offset. The word given has the bits right-justified. The other bits are ignored.
DepositField: PROC[base: WORDPtr, offset: INT, bits: CARD, w: WORD];
MoveField Moves 'bits' bits from src to dest. Uses RasterOp.
MoveField: PROC [dst: WORDPtr, dstOffset: INT, src: WORDPtr, srcOffset: INT, bits: CARD];
EqualFields Tests bitfields for equality.
EqualFields: PROC[x: WORDPtr, xOffset: INT, y: WORDPtr, yOffset: INT, bits: CARD] RETURNS [CARD];
FillFields Fills contiguous fields that each are bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value will be right-justified in value.
FillFields: PROC [dst: WORDPtr, dstOffset: INT, bits: CARD, times: CARD, value: CARD];
FillLongFields Fills contiguous fields that each are bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value is taken from the src address (plus srcOffset bits).
FillLongFields: PROC[dst: WORDPtr, dstOffset: INT, src: WORDPtr, srcOffset: INT, bits: CARD, times: CARD];
FillWords Fills times words at the destination with value.
FillWords: PROC[dst: WORDPtr, times: CARD, value: CARD];
FillLongWords Fills times nWords fields at the destination (dst) with the nWords field at the src.
FillLongWords: PROC[dst, src: WORDPtr, nWords, times: CARD];
}...