Q-Code User Manual
Ver. 7.0 2021/11/30
147
4.3.15 Px.n = Ri.n
Assign the n
th
bit of Ri to the n
th
pin of Px.
Ex.
PB=0x0, R0=0x5, PB.2=R0.0
; PB=0x4
4.3.16 Px.n = Py.n
Assign the value of the n
th
pin of Py to the n
-th
pin of Px.
Ex.
PB=0x0, PA=0x5, PB.2=PA.0
; PB=0x4
4.3.17 Px = Py + Ri
Sum up the values of Py and Ri, and then assign output value to Px.
Ex.
PB=0x3, R0=0x4, PB=PB+R0
; PB=0x7
4.3.18 Px = Py – Ri
Subtract Rj from Py, and then assign output value to Px.
Ex.
PB=0x3, R0=0x2, PB=PB-R0
; PB=0x1
4.3.19 Px = Py | Ri
Py OR Ri, and then assign output value to Px.
Ex.
PB=0x3, R0=0x4, PB=PB | R0
; PB=0x7
4.3.20 Px = Py ^ Ri
Py XOR Ri, and then assign output value to Px.
Ex.
PB=0x3, R0=0x4, PB=PB^R0
; PB=0x7
4.3.21 Px = Py & Ri
Py AND Ri, and then assign output value to Px.
Ex.
PB=0x3, R0=0x4, PB=PB&R0
; PB=0x0
4.3.22 Ri = Px + Rj
Sum up the values of Px and Rj and keep it in Ri.
Ex.
R0=0x3, PB=0x4, R1=PB+R0
; R1=0x7