PIC Assembly RRF

Tanım

  • RRF ( Rotate Right f trough carry ) komutu, f saklayıcısını 1 bit sağa kaydırır.
  • Eğer f saklayıcısının en sağındaki 0.bit 1 ise STATUS carry biti 1 olur.


Yazım kuralı

RRF f,d

f : f saklayıcısının adresi yani, File registerleri arasında bulunduğu konumun adresdir.

d : Eğer 0 ise W saklayıcısına, 1 ise f saklayıcısına yerleştirilir.


Örnek

W saklayıcısının değeri

00000000

Adres 0x20'deki saklayıcısının değeri

10000000

Kod

RRF 0x20,0

Kod çalıştırıldıktan sonra W saklayıcının değeri

01000000

Kod çalıştırıldıktan sonra adres 0x20'deki saklayıcının değeri

10000000