Datasheet

Propeller™ P8X32A Datasheet www.parallax.com
Copyright © Parallax Inc. Page 24 of 37 Rev 1.1 9/12/2008
6.4.1. Assembly Conditions
Condition Instruction Executes
IF_ALWAYS
always
IF_NEVER
never
IF_E
if equal (Z)
IF_NE
if not equal (!Z)
IF_A
if above (!C & !Z)
IF_B
if below (C)
IF_AE
if above/equal (!C)
IF_BE
if below/equal (C | Z)
IF_C
if C set
IF_NC
if C clear
IF_Z
if Z set
IF_NZ
if Z clear
IF_C_EQ_Z
if C equal to Z
IF_C_NE_Z
if C not equal to Z
IF_C_AND_Z
if C set and Z set
IF_C_AND_NZ
if C set and Z clear
IF_NC_AND_Z
if C clear and Z set
IF_NC_AND_NZ
if C clear and Z clear
IF_C_OR_Z
if C set or Z set
IF_C_OR_NZ
if C set or Z clear
IF_NC_OR_Z
if C clear or Z set
IF_NC_OR_NZ
if C clear or Z clear
IF_Z_EQ_C
if Z equal to C
IF_Z_NE_C
if Z not equal to C
IF_Z_AND_C
if Z set and C set
IF_Z_AND_NC
if Z set and C clear
IF_NZ_AND_C
if Z clear and C set
IF_NZ_AND_NC
if Z clear and C clear
IF_Z_OR_C
if Z set or C set
IF_Z_OR_NC
if Z set or C clear
IF_NZ_OR_C
if Z clear or C set
IF_NZ_OR_NC
if Z clear or C clear
6.4.2. Assembly Directives
Directive Description
FIT Address
Validate previous instr/data fit below an
address.
ORG Address
Adjust compile-time cog address
pointer.
Symbol RES Count Reserve next long(s) for symbol.
6.4.3. Assembly Effects
Effect Results In
WC
C Flag modified
WZ
Z Flag modified
WR
Destination Register modified
NR
Destination Register not modified
6.4.4. Assembly Operators
Propeller Assembly code can contain constant
expressions, which may use any operators that are
allowed in constant expressions. The table (a subset of
Table 17) lists the operators allowed in Propeller
Assembly.
Operator
Description
+
Add
+
Positive (+X); unary form of Add
-
Subtract
-
Negate (-X); unary form of Subtract
*
Multiply and return lower 32 bits (signed)
**
Multiply and return upper 32 bits (signed)
/
Divide (signed)
//
Modulus (signed)
#>
Limit minimum (signed)
<#
Limit maximum (signed)
^^
Square root; unary
||
Absolute value; unary
~>
Shift arithmetic right
|<
Bitwise: Decode value (0-31) into single-high-bit
long; unary
>|
Bitwise: Encode long into value (0 - 32) as high-
bit priority; unary
<<
Bitwise: Shift left
>>
Bitwise: Shift right
<-
Bitwise: Rotate left
->
Bitwise: Rotate right
><
Bitwise: Reverse
&
Bitwise: AND
|
Bitwise: OR
^
Bitwise: XOR
!
Bitwise: NOT; unary
AND
Boolean: AND (promotes non-0 to -1)
OR
Boolean: OR (promotes non-0 to -1)
NOT
Boolean: NOT (promotes non-0 to -1); unary
==
Boolean: Is equal
<>
Boolean: Is not equal
<
Boolean: Is less than (signed)
>
Boolean: Is greater than (signed)
=<
Boolean: Is equal or less (signed)
=>
Boolean: Is equal or greater (signed)
@
Symbol address; unary