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]] }; 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 hByteBlt.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. 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. Ê{˜JšœH™HJ™J˜Jšœ:™:J˜šÏk ˜ Jšœ œ ˜Jšœœ ˜J˜—Jšœ œœ˜+˜Jš˜J˜šÏnœ œ?˜Qšœ œœ˜%Jšœœ˜Jšœ$œ œ˜KJšœ˜—JšœS™SJšœS™SJšœQ™QJšœQ™QJšœQ™QJšœT™TJšœR™RJšœO™OJšœP™PJšœU™UJšœQ™QJšœ3™3J˜—Jšœœ˜%J˜Jšœ'œ˜-J˜Jšœ˜J˜J˜J˜J˜—Jš˜J˜šœœ ˜(J˜ —šœœ ˜,J˜)—˜'J˜S—šœ€˜€J˜——…—R 5