Xilinx UG129 Answering Machine User Manual


 
108 www.xilinx.com PicoBlaze 8-bit Embedded Microcontroller
UG129 (v1.1.2) June 24, 2008
Appendix : PicoBlaze Instruction Set and Event Reference
R
RL sX — Rotate Left Register sX
The rotate left instruction operates on any single data register. Each bit in the specified
register is shifted left by one bit position, as shown in Table C-5. The most-significant bit,
bit 7, shifts both into the CARRY bit and into the least-significant bit, bit 0.
Example
RL sX; Rotate left. Bit sX[7] copied into CARRY.
Pseudocode
CARRY Å sX[7]
sX Å { sX[6:0], sX[7]}
if ( sX = 0 ) then
ZERO Å 1
else
ZERO Å 0
endif
PC Å PC + 1
Registers/Flags Altered
Registers: sX, PC
Flags: CARRY, ZERO
RR sX — Rotate Right Register sX
The rotate right instruction operates on any single data register. Each bit in the specified
register is shifted right by one bit position, as shown in Table C-6. The least-significant bit,
bit 0, shifts both into the CARRY bit and into the most-significant bit, bit 7.
Table C-5: Rotate Left (RL) Operation
Rotate Left
RL sX
7 6 5 4 3 2 1 0
Register sXCARRY
Table C-6: Rotate Right (RR) Operation
Rotate Right
RR sX
7 6 5 4 3 2 1 0
CARRYRegister sX