DIRECTORY RunRegressions, XMesaProcs; XMesaCmplr27: PROGRAM IMPORTS RunRegressions, XMesaProcs = { RawCards: TYPE = RECORD [SEQUENCE COMPUTED CARD OF CARD]; RawChars: TYPE = RECORD [PACKED SEQUENCE COMPUTED CARD OF CHAR]; CHARPtr: TYPE ~ ORDERED POINTER TO RawChars; WORDPtr: TYPE ~ ORDERED POINTER TO RawCards; filename: LONG STRING = "TestMesaBasics"; MoveWords: PROC [dst, src: WORDPtr, len: CARDINAL] = TRUSTED MACHINE CODE { "XR_MoveWords" }; MoveWordsDisjoint: PROC [dst, src: WORDPtr, len: CARDINAL] = TRUSTED MACHINE CODE { "XR_MoveWordsDisjoint" }; EqualWords: PROC [src1, src2: WORDPtr, len: CARDINAL] RETURNS[CARD] = TRUSTED MACHINE CODE { "XR_EqualWords" }; MoveBytes: PROC [dest, src: CHARPtr, len: CARDINAL] = TRUSTED MACHINE CODE { "XR_MoveBytes" }; MoveBytesDisjoint: PROC [dest, src: CHARPtr, len: CARDINAL] = TRUSTED MACHINE CODE { "XR_MoveBytesDisjoint" }; ExtractField: PROC [base: WORDPtr, offset: INT, bits: CARD] RETURNS [WORD] = TRUSTED MACHINE CODE { "XR_ExtractField" }; DepositField: PROC[base: WORDPtr, offset: INT, bits: CARD, w: WORD] = TRUSTED MACHINE CODE { "XR_DepositField" }; MoveField: PROC [dst: WORDPtr, dstOffset: INT, src: WORDPtr, srcOffset: INT, bits: CARD] = TRUSTED MACHINE CODE { "XR_MoveField" }; EqualFields: PROC[x: WORDPtr, xOffset: INT, y: WORDPtr, yOffset: INT, bits: CARD] RETURNS [CARD] = TRUSTED MACHINE CODE { "XR_EqualFields" }; FillFields: PROC [dst: WORDPtr, dstOffset: INT, bits: CARD, times: CARD, value: CARD] = TRUSTED MACHINE CODE { "XR_FillFields" }; FillLongFields: PROC[dst: WORDPtr, dstOffset: INT, src: WORDPtr, srcOffset: INT, bits: CARD, times: CARD] = TRUSTED MACHINE CODE { "XR_FillLongFields" }; FillWords: PROC[dst: WORDPtr, times: CARD, value: CARD] = TRUSTED MACHINE CODE { "XR_FillWords" }; FillLongWords: PROC[dst, src: WORDPtr, nWords, times: CARD] = TRUSTED MACHINE CODE { "XR_FillLongWords" }; TestMoveBytes: PROC = { SingleByteTest: PROC = { buff: PACKED ARRAY [0..100] OF CHAR _ ALL[0C]; s1: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 32]; s2: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 33]; FOR i: CARD IN [33..100] DO buff[i] _ LAST[CHAR]; ENDLOOP; [] _ MoveBytes[s2, s1, 1]; XMesaProcs.Ischarequal[buff[31], 0C, 20, filename]; XMesaProcs.Ischarequal[buff[32], 0C, 21, filename]; XMesaProcs.Ischarequal[buff[33], 0C, 22, filename]; XMesaProcs.Ischarequal[buff[34], LAST[CHAR], 23, filename]; XMesaProcs.Ischarequal[buff[35], LAST[CHAR], 20, filename]; }; DoubleByteTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF INT _ ALL[-1]; s1: CHARPtr _ LOOPHOLE[@ones[30]]; s2: CHARPtr _ LOOPHOLE[@zeros[10]]; s3: CHARPtr _ LOOPHOLE[@zeros[9]]; [] _ MoveBytes[s2, s1, 2]; XMesaProcs.Ischarequal[s3[3], 0C, 30, filename]; XMesaProcs.Ischarequal[s3[4], LAST[CHAR], 31, filename]; XMesaProcs.Ischarequal[s3[5], LAST[CHAR], 32, filename]; XMesaProcs.Ischarequal[s3[6], 0C, 33, filename]; }; TripleByteTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF INT _ ALL[-1]; s1: CHARPtr _ LOOPHOLE[@ones[30]]; s2: CHARPtr _ LOOPHOLE[@zeros[10]]; s3: CHARPtr _ LOOPHOLE[@zeros[9]]; [] _ MoveBytes[s2, s1, 3]; XMesaProcs.Ischarequal[s3[3], 0C, 40, filename]; XMesaProcs.Ischarequal[s3[4], LAST[CHAR], 41, filename]; XMesaProcs.Ischarequal[s3[5], LAST[CHAR], 42, filename]; XMesaProcs.Ischarequal[s3[6], LAST[CHAR], 43, filename]; XMesaProcs.Ischarequal[s3[7], 0C, 44, filename]; }; WordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF INT _ ALL[-1]; s1: CHARPtr _ LOOPHOLE[@ones[30]]; s2: CHARPtr _ LOOPHOLE[@zeros[10]]; s3: CHARPtr _ LOOPHOLE[@zeros[9]]; [] _ MoveBytes[s2, s1, 4]; XMesaProcs.Ischarequal[s3[3], 0C, 10, filename]; XMesaProcs.Ischarequal[s3[4], LAST[CHAR], 11, filename]; XMesaProcs.Ischarequal[s3[5], LAST[CHAR], 12, filename]; XMesaProcs.Ischarequal[s3[6], LAST[CHAR], 13, filename]; XMesaProcs.Ischarequal[s3[7], LAST[CHAR], 14, filename]; XMesaProcs.Ischarequal[s3[8], 0C, 15, filename]; }; MultiWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF INT _ ALL[-1]; s1: CHARPtr _ LOOPHOLE[@ones[30]]; s2: CHARPtr _ LOOPHOLE[@zeros[10]]; s3: CHARPtr _ LOOPHOLE[@zeros[9]]; [] _ MoveBytes[s2, s1, 10]; XMesaProcs.Ischarequal[s3[3], 0C, 50, filename]; XMesaProcs.Ischarequal[s3[4], LAST[CHAR], 51, filename]; XMesaProcs.Ischarequal[s3[5], LAST[CHAR], 52, filename]; XMesaProcs.Ischarequal[s3[6], LAST[CHAR], 53, filename]; XMesaProcs.Ischarequal[s3[7], LAST[CHAR], 54, filename]; XMesaProcs.Ischarequal[s3[8], LAST[CHAR], 55, filename]; XMesaProcs.Ischarequal[s3[9], LAST[CHAR], 56, filename]; XMesaProcs.Ischarequal[s3[10], LAST[CHAR], 57, filename]; XMesaProcs.Ischarequal[s3[11], LAST[CHAR], 58, filename]; XMesaProcs.Ischarequal[s3[12], LAST[CHAR], 59, filename]; XMesaProcs.Ischarequal[s3[13], LAST[CHAR], 60, filename]; XMesaProcs.Ischarequal[s3[14], 0C, 61, filename]; XMesaProcs.Ischarequal[s3[15], 0C, 62, filename]; XMesaProcs.Ischarequal[s3[16], 0C, 63, filename]; }; OverlappedDoubleByteTest: PROC = { buff: PACKED ARRAY [0..100] OF CHAR _ ALL[0C]; s1: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 32]; s2: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 33]; FOR i: CARD IN [33..100] DO buff[i] _ LAST[CHAR]; ENDLOOP; [] _ MoveBytes[s2, s1, 2]; XMesaProcs.Ischarequal[buff[31], 0C, 70, filename]; XMesaProcs.Ischarequal[buff[32], 0C, 71, filename]; XMesaProcs.Ischarequal[buff[33], 0C, 72, filename]; XMesaProcs.Ischarequal[buff[34], LAST[CHAR], 73, filename]; XMesaProcs.Ischarequal[buff[35], LAST[CHAR], 74, filename]; }; OverlappedTripleByteTest: PROC = { buff: PACKED ARRAY [0..100] OF CHAR _ ALL[0C]; s1: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 31]; s2: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 33]; FOR i: CARD IN [33..100] DO buff[i] _ LAST[CHAR]; ENDLOOP; [] _ MoveBytes[s2, s1, 3]; XMesaProcs.Ischarequal[buff[31], 0C, 80, filename]; XMesaProcs.Ischarequal[buff[32], 0C, 81, filename]; XMesaProcs.Ischarequal[buff[33], 0C, 82, filename]; XMesaProcs.Ischarequal[buff[34], 0C, 83, filename]; XMesaProcs.Ischarequal[buff[35], LAST[CHAR], 84, filename]; }; OverlappedWordTest: PROC = { buff: PACKED ARRAY [0..100] OF CHAR _ ALL[0C]; s1: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 30]; s2: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 33]; FOR i: CARD IN [33..100] DO buff[i] _ LAST[CHAR]; ENDLOOP; [] _ MoveBytes[s2, s1, 4]; XMesaProcs.Ischarequal[buff[31], 0C, 90, filename]; XMesaProcs.Ischarequal[buff[32], 0C, 91, filename]; XMesaProcs.Ischarequal[buff[33], 0C, 92, filename]; XMesaProcs.Ischarequal[buff[34], 0C, 93, filename]; XMesaProcs.Ischarequal[buff[35], 0C, 94, filename]; XMesaProcs.Ischarequal[buff[36], LAST[CHAR], 95, filename]; }; OverlappedMultiWordTest: PROC = { buff: PACKED ARRAY [0..100] OF CHAR _ ALL[0C]; s1: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 26]; s2: CHARPtr _ LOOPHOLE[LOOPHOLE[@buff, CARD] + 33]; FOR i: CARD IN [33..100] DO buff[i] _ LAST[CHAR]; ENDLOOP; [] _ MoveBytes[s2, s1, 8]; XMesaProcs.Ischarequal[buff[31], 0C, 100, filename]; XMesaProcs.Ischarequal[buff[32], 0C, 101, filename]; XMesaProcs.Ischarequal[buff[33], 0C, 102, filename]; XMesaProcs.Ischarequal[buff[34], 0C, 103, filename]; XMesaProcs.Ischarequal[buff[35], 0C, 104, filename]; XMesaProcs.Ischarequal[buff[36], 0C, 105, filename]; XMesaProcs.Ischarequal[buff[37], 0C, 106, filename]; XMesaProcs.Ischarequal[buff[38], 0C, 107, filename]; XMesaProcs.Ischarequal[buff[39], 0C, 108, filename]; XMesaProcs.Ischarequal[buff[40], LAST[CHAR], 109, filename]; XMesaProcs.Ischarequal[buff[41], LAST[CHAR], 110, filename]; }; WordTest[]; SingleByteTest[]; DoubleByteTest[]; TripleByteTest[]; MultiWordTest[]; OverlappedDoubleByteTest[]; OverlappedTripleByteTest[]; OverlappedWordTest[]; OverlappedMultiWordTest[]; }; TestMoveWords: PROC = { SingleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWords[dst, src, 1]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 110, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 111, filename]; XMesaProcs.IsLongCardEqual[zeros[11], 0, 112, filename]; }; DoubleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWords[dst, src, 2]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 113, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 114, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 115, filename]; XMesaProcs.IsLongCardEqual[zeros[12], 0, 116, filename]; }; TripleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWords[dst, src, 3]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 120, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 121, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 122, filename]; XMesaProcs.IsLongCardEqual[zeros[12], LAST[CARD], 123, filename]; XMesaProcs.IsLongCardEqual[zeros[13], 0, 124, filename]; }; MultiWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWords[dst, src, 10]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 130, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 131, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 132, filename]; XMesaProcs.IsLongCardEqual[zeros[12], LAST[CARD], 133, filename]; XMesaProcs.IsLongCardEqual[zeros[13], LAST[CARD], 134, filename]; XMesaProcs.IsLongCardEqual[zeros[14], LAST[CARD], 135, filename]; XMesaProcs.IsLongCardEqual[zeros[15], LAST[CARD], 136, filename]; XMesaProcs.IsLongCardEqual[zeros[16], LAST[CARD], 137, filename]; XMesaProcs.IsLongCardEqual[zeros[17], LAST[CARD], 138, filename]; XMesaProcs.IsLongCardEqual[zeros[18], LAST[CARD], 139, filename]; XMesaProcs.IsLongCardEqual[zeros[19], LAST[CARD], 140, filename]; XMesaProcs.IsLongCardEqual[zeros[20], 0, 124, filename]; }; OverlappedMultiWordTest: PROC = { buffer: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@buffer[30]]; dst: WORDPtr _ LOOPHOLE[@buffer[31]]; FOR i: CARD IN [31..50] DO buffer[i] _ LAST[CARD]; ENDLOOP; [] _ MoveWords[dst, src, 3]; XMesaProcs.IsLongCardEqual[buffer[30], 0, 140, filename]; XMesaProcs.IsLongCardEqual[buffer[31], 0, 141, filename]; XMesaProcs.IsLongCardEqual[buffer[32], LAST[CARD], 142, filename]; XMesaProcs.IsLongCardEqual[buffer[33], LAST[CARD], 143, filename]; }; SingleWordTest[]; DoubleWordTest[]; TripleWordTest[]; MultiWordTest[]; OverlappedMultiWordTest[]; }; TestMoveWordsDisjoint: PROC = { SingleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWordsDisjoint[dst, src, 1]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 200, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 201, filename]; XMesaProcs.IsLongCardEqual[zeros[11], 0, 202, filename]; }; DoubleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWordsDisjoint[dst, src, 2]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 203, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 204, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 205, filename]; XMesaProcs.IsLongCardEqual[zeros[12], 0, 206, filename]; }; TripleWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWordsDisjoint[dst, src, 3]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 207, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 208, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 209, filename]; XMesaProcs.IsLongCardEqual[zeros[12], LAST[CARD], 210, filename]; XMesaProcs.IsLongCardEqual[zeros[13], 0, 211, filename]; }; MultiWordTest: PROC = { zeros: ARRAY [0..50] OF CARD _ ALL[0]; ones: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@ones[30]]; dst: WORDPtr _ LOOPHOLE[@zeros[10]]; [] _ MoveWordsDisjoint[dst, src, 10]; XMesaProcs.IsLongCardEqual[zeros[9], 0, 212, filename]; XMesaProcs.IsLongCardEqual[zeros[10], LAST[CARD], 213, filename]; XMesaProcs.IsLongCardEqual[zeros[11], LAST[CARD], 214, filename]; XMesaProcs.IsLongCardEqual[zeros[12], LAST[CARD], 215, filename]; XMesaProcs.IsLongCardEqual[zeros[13], LAST[CARD], 216, filename]; XMesaProcs.IsLongCardEqual[zeros[14], LAST[CARD], 217, filename]; XMesaProcs.IsLongCardEqual[zeros[15], LAST[CARD], 218, filename]; XMesaProcs.IsLongCardEqual[zeros[16], LAST[CARD], 219, filename]; XMesaProcs.IsLongCardEqual[zeros[17], LAST[CARD], 220, filename]; XMesaProcs.IsLongCardEqual[zeros[18], LAST[CARD], 221, filename]; XMesaProcs.IsLongCardEqual[zeros[19], LAST[CARD], 222, filename]; XMesaProcs.IsLongCardEqual[zeros[20], 0, 223, filename]; }; SingleWordTest[]; DoubleWordTest[]; TripleWordTest[]; MultiWordTest[]; }; TestEqualWords: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; b2: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; src: WORDPtr _ LOOPHOLE[@b1[0]]; dst: WORDPtr _ LOOPHOLE[@b2[0]]; XMesaProcs.Isequal[EqualWords[dst, src, 50], 1, 230, filename]; FOR i: CARD IN [0..50] DO b1[i] _ 0; ENDLOOP; XMesaProcs.Isequal[EqualWords[dst, src, 50], 0, 231, filename]; FOR i: CARD IN [0..50] DO b2[i] _ 0; ENDLOOP; XMesaProcs.Isequal[EqualWords[dst, src, 50], 1, 232, filename]; }; TestExtractField: PROC = { SimpleExtract: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; c: INT; b1[10] _ 0FF00FFH; c _ ExtractField[src,12,4]; XMesaProcs.Isequal[c, 0FH, 240, filename]; }; WordCrossingExtract: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; c: INT; b1[10] _ 0FF00FFH; b1[11] _ 0FF00FFH; c _ ExtractField[src,16,32]; XMesaProcs.Isequal[c, 0FF00FFH, 241, filename]; }; SimpleExtract[]; WordCrossingExtract[]; }; TestDepositField: PROC = { SimpleDeposit: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; b1[10] _ 0FF00FFH; DepositField[src,12,4,0]; XMesaProcs.IsLongCardEqual[b1[10], 0F000FFH, 250, filename]; }; WordCrossingDeposit: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; b1[10] _ 0FF00FFH; b1[11] _ 0FF00FFH; DepositField[src,16,32,0]; XMesaProcs.IsLongCardEqual[b1[10], 0FF0000H, 251, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FFH, 252, filename]; }; SimpleDeposit[]; WordCrossingDeposit[]; }; TestMoveField: PROC = { SimpleMove: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; b1[10] _ 0FF00FFH; b1[11] _ 0FF00FFH; [] _ MoveField[src, 56, src, 16, 8]; XMesaProcs.IsLongCardEqual[b1[11], 0FF0000H, 260, filename]; }; TwoWordFieldMove: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; b1[10] _ 0FF00FFH; b1[11] _ 0FF00FFH; b1[12] _ 0FF00FFH; [] _ MoveField[src, 112, src, 16, 64]; XMesaProcs.IsLongCardEqual[b1[10], 0FF00FFH, 261, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FF00FFH, 262, filename]; XMesaProcs.IsLongCardEqual[b1[12], 0FF00FFH, 263, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFH, 264, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0FF00FFH, 265, filename]; XMesaProcs.IsLongCardEqual[b1[15], 0FF0000H, 266, filename]; }; NegOffsetFieldMove: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; src: WORDPtr _ LOOPHOLE[@b1[10]]; b1[9] _ 0FF00FFH; b1[10] _ 0FF00FFH; [] _ MoveField[src, 32, src, -8, 8]; XMesaProcs.IsLongCardEqual[b1[11], 0FF000000H, 268, filename]; }; ByteFieldMove: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; b2: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; src: WORDPtr _ LOOPHOLE[@b2[10]]; [] _ MoveField[dst, 16, src, 0, 96]; XMesaProcs.IsLongCardEqual[b1[10], 0FFFFH, 270, filename]; XMesaProcs.IsLongCardEqual[b1[11], LAST[CARD], 271, filename]; XMesaProcs.IsLongCardEqual[b1[12], LAST[CARD], 272, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFF0000H, 273, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0, 274, filename]; }; BigFieldMove: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; b2: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; src: WORDPtr _ LOOPHOLE[@b2[10]]; [] _ MoveField[dst, 28, src, 0, 96]; XMesaProcs.IsLongCardEqual[b1[10], 0FH, 275, filename]; XMesaProcs.IsLongCardEqual[b1[11], LAST[CARD], 276, filename]; XMesaProcs.IsLongCardEqual[b1[12], LAST[CARD], 277, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFFFFF0H, 278, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0, 279, filename]; }; SimpleMove[]; TwoWordFieldMove[]; NegOffsetFieldMove[]; ByteFieldMove[]; BigFieldMove[]; }; TestEqualFields: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; b2: ARRAY [0..50] OF CARD _ ALL[LAST[CARD]]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; src: WORDPtr _ LOOPHOLE[@b2[10]]; res: CARD _ EqualFields[dst, 0, src, 0, 96]; XMesaProcs.IsLongCardEqual[res, 1, 275, filename]; b1[11] _ 0; res _ EqualFields[dst, 0, src, 0, 96]; XMesaProcs.IsLongCardEqual[res, 0, 275, filename]; }; TestFillFields: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; [] _ FillFields[dst, 16, 16, 8, LAST[CARD]]; XMesaProcs.IsLongCardEqual[b1[10], 0FFFFH, 280, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FFFFFFFFH, 281, filename]; XMesaProcs.IsLongCardEqual[b1[12], 0FFFFFFFFH, 282, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFFFFFFH, 283, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0FFFF0000H, 284, filename]; }; TestFillLongFields: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; src: WORDPtr _ LOOPHOLE[@b1[1]]; b1[1] _ LAST[CARD]; b1[2] _ LAST[CARD]; [] _ FillLongFields[dst, 16, src, 0, 64, 2]; XMesaProcs.IsLongCardEqual[b1[10], 0FFFFH, 290, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FFFFFFFFH, 291, filename]; XMesaProcs.IsLongCardEqual[b1[12], 0FFFFFFFFH, 292, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFFFFFFH, 293, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0FFFF0000H, 284, filename]; }; TestFillWords: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; [] _ FillWords[dst, 10, LAST[CARD]]; XMesaProcs.IsLongCardEqual[b1[9], 0, 300, filename]; XMesaProcs.IsLongCardEqual[b1[10], 0FFFFFFFFH, 301, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FFFFFFFFH, 302, filename]; XMesaProcs.IsLongCardEqual[b1[12], 0FFFFFFFFH, 303, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFFFFFFH, 304, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0FFFFFFFFH, 305, filename]; XMesaProcs.IsLongCardEqual[b1[15], 0FFFFFFFFH, 306, filename]; XMesaProcs.IsLongCardEqual[b1[16], 0FFFFFFFFH, 307, filename]; XMesaProcs.IsLongCardEqual[b1[17], 0FFFFFFFFH, 308, filename]; XMesaProcs.IsLongCardEqual[b1[18], 0FFFFFFFFH, 309, filename]; XMesaProcs.IsLongCardEqual[b1[19], 0FFFFFFFFH, 310, filename]; XMesaProcs.IsLongCardEqual[b1[20], 0, 311, filename]; }; TestFillLongWords: PROC = { b1: ARRAY [0..50] OF CARD _ ALL[0]; dst: WORDPtr _ LOOPHOLE[@b1[10]]; src: WORDPtr _ LOOPHOLE[@b1[1]]; b1[1] _ LAST[CARD]; b1[2] _ LAST[CARD]; [] _ FillLongWords[dst, src, 2, 2]; XMesaProcs.IsLongCardEqual[b1[9], 0, 312, filename]; XMesaProcs.IsLongCardEqual[b1[10], 0FFFFFFFFH, 313, filename]; XMesaProcs.IsLongCardEqual[b1[11], 0FFFFFFFFH, 314, filename]; XMesaProcs.IsLongCardEqual[b1[12], 0FFFFFFFFH, 315, filename]; XMesaProcs.IsLongCardEqual[b1[13], 0FFFFFFFFH, 316, filename]; XMesaProcs.IsLongCardEqual[b1[14], 0, 317, filename]; }; TestXMesa2: PROCEDURE = { --Subrange types n: CARDINAL [0..10] _ 10; signalRaised: BOOLEAN _ FALSE; BEGIN ENABLE ANY => {signalRaised _ TRUE; CONTINUE}; n _ n + 1; END; XMesaProcs.Isboolequal[signalRaised, TRUE, 1120, filename]; signalRaised _ FALSE; }; XMesaCall27: PROCEDURE = { TestMoveBytes[]; TestMoveWords[]; TestMoveWordsDisjoint[]; TestEqualWords[]; TestExtractField[]; TestDepositField[]; TestMoveField[]; TestEqualFields[]; TestFillFields[]; TestFillLongFields[]; TestFillWords[]; TestFillLongWords[]; TestXMesa2[]; }; RunRegressions.RegisterTest[XMesaCall27, "test27"]; }... , s1 to s2 s1 to s2 s1 to s2 mainline Ê‹•NewlineDelimiter ™J˜J˜JšÏk ˜ J˜J˜ J˜JšÏn œœœ˜J˜Jšž œœ˜Jš œœ œœœ˜#Jš œœ œœœœœ˜,Jšœœ ˜!Jšœœ ˜!J˜J˜$J˜:Jšœ#œœ˜>Jšœ#œœ˜>J˜>J˜5J˜Jšž œœ˜Jš œœ œœœ˜#Jš œœ œœœœœ˜,Jšœœ ˜!Jšœœ ˜!J˜J˜$J˜7Jšœ#œœ˜>Jšœ#œœ˜>J˜>J˜5J˜J˜J˜ J˜J˜J˜J˜J˜J˜Jšžœœ˜Jš œœ œœœœœ˜,Jš œœ œœœœœ˜,Jšœœ ˜!Jšœœ ˜!Jšœœ#˜,J˜J˜2J˜ J˜&J˜2J˜J˜Jšžœœ˜Jš œœ œœœ˜#Jšœœ ˜!J˜Jšœ œœ˜,J˜:J˜>J˜>J˜>J˜>J˜J˜Jšžœœ˜Jš œœ œœœ˜#Jšœœ ˜!Jšœœ ˜ J˜Jšœœœ˜Jšœœœ˜J˜,J˜:J˜>J˜>J˜>J˜>J˜J˜Jšž œœ˜Jš œœ œœœ˜#Jšœœ ˜!J˜Jšœœœ˜$J˜4J˜>J˜>J˜>J˜>J˜>J˜>J˜>J˜>J˜>J˜>J˜5J˜J˜Jšžœœ˜Jš œœ œœœ˜#Jšœœ ˜!Jšœœ ˜ J˜Jšœœœ˜Jšœœœ˜J˜#J˜4J˜>J˜>J˜>J˜>J˜5J˜Jšž œ œÏc˜+Jšœœ˜Jšœœœ˜J˜Jš˜Jšœœœœ˜.J˜ Jšœ˜Jšœ%œ˜;Jšœœ˜J˜J˜šž œ œ˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜J˜ J˜J˜—J™J˜3J˜J˜J˜—…—O¶fm