ByteBlt.mesa (last edited by: Plass on: August 31, 1984 11:47:00 am PDT)
Cedar PilotBridge version
Copyright (C) Xerox Corporation 1982. All rights reserved.
DIRECTORY
Environment USING [Block],
PrincOpsUtils USING [ByteBlt];
ByteBlt: DEFINITIONS IMPORTS PrincOpsUtils=
BEGIN
ByteBlt: PROCEDURE [to, from: Environment.Block, overLap: OverLapOption ← ripple]
RETURNS [nBytes: CARDINAL] ~ INLINE {
IF overLap # ripple THEN ERROR
ELSE nBytes ← PrincOpsUtils.ByteBlt[to: LOOPHOLE[to], from: LOOPHOLE[from]]
};
Moves as much as it can, and tells you how much that was. 0 length in either to or
from is ok, it will just return 0. If you startIndex>stopIndexPlusOne in either to
or from, it will complain since that doesn't make sense. "overLap" indicates the
means for moving the bytes. It only has a noticable effect if to and from define
overlapping fields. If overLap = ripple, a low address to high address move takes
place with no attempt to deal with the overlapping (i.e., after the move (to+i)^ may
not be the same as (from+i)^ was before the move). overLap = ripple is useful for
initializing a block of storage to some value. If overlap = move, then ByteBlt
preserves the contents of from (i.e., (to+i)^ after the move will be the same as
(from+i)^ was before the move). It does a BLT for the easy cases and BitBlt whenever
possible for other cases. In some instances, overLap = move may result in a Mesa
DO...ENDLOOP construct being used to do the ripple.
OverLapOption: TYPE = {ripple, move};
StartIndexGreaterThanStopIndexPlusOne: ERROR;
END.
LOG
Time: July 9, 1979 12:03 PM  By: Gobbel
Created file
Time: January 25, 1980 4:04 PM  By: McJones
Add StartIndexGreaterThanStopIndexPlusOne
Time: 11-Aug-81 10:13:58  By: Luniewski
Added overLap option to ByteBlt to permit explicit dealing with overlapping fields.
Time: August 31, 1984 11:47:34 am PDT By: Plass Action: Created Cedar PilotBridge version from version of 12-Nov-81 09:49:05 PST