STM8 "Shift / Rotate / Swap" Befehle



Funktion Mnemonic Beispiel OP-Code
Rotate Byte in X, Left through CARRY RLC RLC ([$1234.w],X) 72 69 ww bb
Rotate Word in X, Left through CARRY RLCW RLCW X 59
Rotate Word in X, Left through ACCU RLWA RLWA X 02
Rotate Byte in X, Right through CARRY RRC RRC ([$1234.w],X) 72 66 ww bb
Rotate Word in X, Right through CARRY RRCW RRCW X ???? 56
Rotate Word in X, Right through ACCU RRWA RRWA X 01
Shift Byte in X, Left Arithmetic SLA SLA ([$1234.w],X) 72 68 ww bb
Shift Word in X, Left Arithmetic SLAW SLAW X 58
Shift Byte in X, Left Logical SLL SLL ([$1234.w],X) 72 68 ww bb ????
Shift Word in X, Left Logical SLLW SLLW X 58 ????
Shift Byte in X, Right Arithmetic SRA SRA ([$1234.w],X) 72 67 ww bb
Shift Word in X, Right Arithmetic SRAW SRAW X 57
Shift Byte in X, Right Logical SRL SRL ([$1234.w],X) 72 64 ww bb
Shift Word in X, Right Logical SRLW SRLW X 57
Swap bytes SWAPW SWAPW X 5E