Rorc (rotate right through carry) – Echelon Neuron User Manual
Page 123
![background image](/manuals/735710/123/background.png)
RORC (Rotate Right through Carry)
The RORC instruction rotates the byte in TOS one bit to the right, using the
Carry flag as an input bit. The RORC instruction uses the implicit addressing
mode. Bit 7 is loaded from the Carry flag. After the operation completes, the
Carry flag contains the value from bit 0.
Figure 10 shows the operation of the RORC instruction.
TOS
7
0
C
Figure 10. The RORC Instruction
The RORC instruction applies to Series 3100, 5000, and 6000 devices.
Syntax:
The RORC instruction requires no operands:
RORC
Table 47 describes the attributes of the RORC instruction.
Table 47. RORC Instruction
Instruction
Hexadecimal
Opcode
Instruction
Size (Bytes)
CPU Cycles
Required
Affect on
Carry Flag
RORC
38
1
2
Used, modified
Example:
The following example pushes the number 150 (h’96) onto the data stack, and
then uses the RORC instruction to rotate the TOS value right through the Carry
flag. This example assumes that the Carry flag is not set (has value 0). After the
RORC instruction completes, TOS has the value 75 (h’4B) and the Carry flag is
not set (has value 0 from bit 0 of the original h’96 in TOS).
push #d’150 ; ( d’150, -- )
rorc ; ( d’75, -- )
Neuron Assembly Language Reference
113