Mover Datos Dentro del Acumulador 8085: Instrucciones de Rotación (RLC, RAL, RRC, RAR)

El acumulador (A) del 8085 no puede "moverse" internamente como una copia de registro a registro, pero sus bits pueden ser rotados—reubicando efectivamente los datos dentro del mismo registro.

Cuatro Instrucciones de Rotación

MnemónicoAcciónBandera de Acarreo
RLCRotar a la Izquierda (bit 7 → bit 0)Bit 7 copiado a CY
RALRotar a la Izquierda a través de Acarreo (bit 7 → CY, CY → bit 0)Bit 7 → CY; CY antiguo → bit 0
RRCRotar a la Derecha (bit 0 → bit 7)Bit 0 copiado a CY
RARRotar a la Derecha a través de Acarreo (bit 0 → CY, CY → bit 7)Bit 0 → CY; CY antiguo → bit 7

Ejemplo: Intercambiar Nibbles

; A = 0xAB (1010 1011) RLC ; 0101 0111 CY=1 RLC ; 1010 1111 CY=0 RLC ; 0101 1110 CY=1 RLC ; 1011 1101 CY=0 → nibbles intercambiados (0xBA) 

Punto Clave

Las rotaciones son la única forma de un solo comando de reorganizar bits dentro de A sin usar otro registro o memoria. Se ejecutan en 4 T-estados (1 µs @ 4 MHz).