3-593
INSTRUCTION SET REFERENCE
RCL/RCR/ROL/ROR-Rotate (Continued)
WHILE (tempCOUNT
?
0)
DO
tempCF
<
MSB(DEST);
DEST
<
(DEST
?
2) + CF;
CF
<
tempCF;
tempCOUNT
<
tempCOUNT 1;
OD;
ELIHW;
IF COUNT = 1
THEN OF
<
MSB(DEST) XOR CF;
ELSE OF is undefined;
FI;
(* RCR instruction operation *)
IF COUNT = 1
THEN OF
<
MSB(DEST) XOR CF;
ELSE OF is undefined;
FI;
WHILE (tempCOUNT
?
0)
DO
tempCF
<
LSB(SRC);
DEST
<
(DEST / 2) + (CF * 2
SIZE
);
CF
<
tempCF;
tempCOUNT
<
tempCOUNT 1;
OD;
(* ROL and ROR instructions *)
SIZE
<
OperandSize
CASE (determine count) OF
SIZE = 8:tempCOUNT
<
COUNT MOD 8;
SIZE = 16:tempCOUNT
<
COUNT MOD 16;
SIZE = 32:tempCOUNT
<
COUNT MOD 32;
ESAC;
(* ROL instruction operation *)
WHILE (tempCOUNT
?
0)
DO
tempCF
<
MSB(DEST);
DEST
<
(DEST
?
2)
+
tempCF;
tempCOUNT
<
tempCOUNT 1;
OD;
ELIHW;
CF
<
LSB(DEST);
IF COUNT = 1
THEN OF
<
MSB(DEST) XOR CF;
ELSE OF is undefined;
FI;