Parallax P2 Edge Module - Datasheet

D[31]. *
SAR D,{#}S {WC/WZ/WCZ}
Shift arithmetic right. D = [31:0] of ({{32{D[31]}}, D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else
D[0]. *
2
SCA D,{#}S {WZ}
Next instruction's S value = unsigned (D[15:0] * S[15:0]) >> 16. *
2
SCAS D,{#}S {WZ}
Next instruction's S value = signed (D[15:0] * S[15:0]) >> 14. In this scheme, $4000 = 1.0 and $C000 = -1.0. *
2
SETBYTE {#}S
Set S[7:0] into byte established by prior ALTSB instruction.
2
SETBYTE D,{#}S,#N
Set S[7:0] into byte N in D, keeping rest of D same.
2
SETD D,{#}S
Set D field of D to S[8:0]. D = {D[31:18], S[8:0], D[8:0]}.
2
SETNIB {#}S
Set S[3:0] into nibble established by prior ALTSN instruction.
2
SETNIB D,{#}S,#N
Set S[3:0] into nibble N in D, keeping rest of D same.
2
SETR D,{#}S
Set R field of D to S[8:0]. D = {D[31:28], S[8:0], D[18:0]}.
2
SETS D,{#}S
Set S field of D to S[8:0]. D = {D[31:9], S[8:0]}.
2
SETWORD {#}S
Set S[15:0] into word established by prior ALTSW instruction.
2
SETWORD D,{#}S,#N
Set S[15:0] into word N in D, keeping rest of D same.
2
SEUSSF D
Relocate and periodically invert bits within D. Returns to original value on 32nd iteration. Forward pattern.
2
SEUSSR D
Relocate and periodically invert bits within D. Returns to original value on 32nd iteration. Reverse pattern.
2
SHL D,{#}S {WC/WZ/WCZ}
Shift left. D = [63:32] of ({D[31:0], 32'b0} << S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[31]. *
2
SHR D,{#}S {WC/WZ/WCZ}
Shift right. D = [31:0] of ({32'b0, D[31:0]} >> S[4:0]). C = last bit shifted out if S[4:0] > 0, else D[0]. *
2
SIGNX D,{#}S {WC/WZ/WCZ}
Sign-extend D from bit S[4:0]. C = MSB of result. *
2
SPLITB D
Split every 4th bit of D into bytes. D = {D[31], D[27], D[23], D[19], ...D[12], D[8], D[4], D[0]}.
2
SPLITW D
Split odd/even bits of D into words. D = {D[31], D[29], D[27], D[25], ...D[6], D[4], D[2], D[0]}.
2
SUB D,{#}S {WC/WZ/WCZ}
Subtract S from D. D = D - S. C = borrow of (D - S). *
2
SUBR D,{#}S {WC/WZ/WCZ}
Subtract D from S (reverse). D = S - D. C = borrow of (S - D). *
2
SUBS D,{#}S {WC/WZ/WCZ}
Subtract S from D, signed. D = D - S. C = correct sign of (D - S). *
2
SUBSX D,{#}S {WC/WZ/WCZ}
Subtract (S + C) from D, signed and extended. D = D - (S + C). C = correct sign of (D - (S + C)). Z = Z AND (result
== 0).
2
SUBX D,{#}S {WC/WZ/WCZ}
Subtract (S + C) from D, extended. D = D - (S + C). C = borrow of (D - (S + C)). Z = Z AND (result == 0).
2
SUMC D,{#}S {WC/WZ/WCZ}
Sum +/-S into D by C. If C = 1 then D = D - S, else D = D + S. C = correct sign of (D +/- S). *
2
SUMNC D,{#}S {WC/WZ/WCZ}
Sum +/-S into D by !C. If C = 0 then D = D - S, else D = D + S. C = correct sign of (D +/- S). *
2
SUMNZ D,{#}S {WC/WZ/WCZ}
Sum +/-S into D by !Z. If Z = 0 then D = D - S, else D = D + S. C = correct sign of (D +/- S). *
2
SUMZ D,{#}S {WC/WZ/WCZ}
Sum +/-S into D by Z. If Z = 1 then D = D - S, else D = D + S. C = correct sign of (D +/- S). *
2
TEST D {WC/WZ/WCZ}
Test D. C = parity of D. Z = (D == 0).
2
TEST D,{#}S {WC/WZ/WCZ}
Test D with S. C = parity of (D & S). Z = ((D & S) == 0).
2
TESTB D,{#}S WC/WZ
Test bit S[4:0] of D, write to C/Z. C/Z = D[S[4:0]].
2
TESTB D,{#}S ORC/ORZ
Test bit S[4:0] of D, OR into C/Z. C/Z = C/Z OR D[S[4:0]].
2
TESTB D,{#}S ANDC/ANDZ
Test bit S[4:0] of D, AND into C/Z. C/Z = C/Z AND D[S[4:0]].
2
TESTB D,{#}S XORC/XORZ
Test bit S[4:0] of D, XOR into C/Z. C/Z = C/Z XOR D[S[4:0]].
2
TESTBN D,{#}S WC/WZ
Test bit S[4:0] of !D, write to C/Z. C/Z = !D[S[4:0]].
2
TESTBN D,{#}S ORC/ORZ
Test bit S[4:0] of !D, OR into C/Z. C/Z = C/Z OR !D[S[4:0]].
2
TESTBN D,{#}S ANDC/ANDZ
Test bit S[4:0] of !D, AND into C/Z. C/Z = C/Z AND !D[S[4:0]].
2
TESTBN D,{#}S XORC/XORZ
Test bit S[4:0] of !D, XOR into C/Z. C/Z = C/Z XOR !D[S[4:0]].
2
TESTN D,{#}S {WC/WZ/WCZ}
Test D with !S. C = parity of (D & !S). Z = ((D & !S) == 0).
2
WRC D
Write 0 or 1 to D, according to C. D = {31'b0, C).
2
WRNC D
Write 0 or 1 to D, according to !C. D = {31'b0, !C).
2
WRNZ D
Write 0 or 1 to D, according to !Z. D = {31'b0, !Z).
2
WRZ D
Write 0 or 1 to D, according to Z. D = {31'b0, Z).
2
XOR D,{#}S {WC/WZ/WCZ}
XOR S into D. D = D ^ S. C = parity of result. *
2
XORO32 D
Iterate D with xoroshiro32+ PRNG algorithm and put PRNG result into next instruction's S.
2
ZEROX D,{#}S {WC/WZ/WCZ}
Zero-extend D above bit S[4:0]. C = MSB of result. *
2
Copyright © Parallax Inc. 2021/05/27 Parallax Propeller 2 (P2X8C4M64P) Datasheet Page 35