Datasheet

Propeller™ P8X32A Datasheet www.parallax.com
Copyright © Parallax Inc. Page 20 of 37 Rev 1.1 9/12/2008
Spin Command
Returns
Value
Description
((IF IFNOT)) Condition(s)
IfStatement(s)
ELSEIF Condition(s)
ElseIfStatement(s)
ELSEIFNOT Condition(s)
ElseIfStatement(s)
ELSE
ElseStatement(s)
Test condition(s) and execute block of code if valid.
IF and ELSEIF each test for TRUE. IFNOT and ELSEIFNOT each test for
FALSE.
INA [Pin(s)] 9 Input register for 32-bit ports A.
LOCKCLR (ID) 9 Clear semaphore to false and get its previous state; TRUE or FALSE.
LOCKNEW 9 Check out new semaphore and get its ID; 0-7, or -1 if none were available.
LOCKRET (ID)
Return semaphore back to semaphore pool, releasing it for future
LOCKNEW requests.
LOCKSET (ID) 9 Set semaphore to true and get its previous state; TRUE or FALSE.
LONG Symbol [Count] Declare long-sized symbol in VAR block.
Symbol LONG Data [Count] Declare long-aligned and/or long-sized data in DAT block.
LONG [BaseAddress] [Offset] 9 Read/write long of main memory.
LONGFILL (StartAddress, Value, Count) Fill longs of main memory with a value.
LONGMOVE (DestAddress, SrcAddress, Count) Copy longs from one region to another in main memory.
LOOKDOWN (Value:ExpressionList) 9 Get the one-based index of a value in a list.
LOOKDOWNZ (Value:ExpressionList) 9 Get the zero-based index of a value in a list.
LOOKUP (Index:ExpressionList) 9 Get value from a one-based index position of a list.
LOOKUPZ (Index:ExpressionList) 9 Get value from a zero-based index position of a list.
NEXT
Skip remaining statements of REPEAT loop and continue with the next
loop iteration.
OBJ
Symbol
[Count]:"Object" Symbol [Count]: "Object"
Declare symbol object references.
OUTA [Pin(s)] 9 Output register for 32-bit port A. Default is 0 (ground) upon cog startup.
PAR 9 Cog Boot Parameter register.
PHSA 9 Counter A Phase Lock Loop (PLL) register.
PHSB 9 Counter B Phase Lock Loop (PLL) register.
PRI Name (Par ,Par) :RVal | LVar [Cnt]〉〉 ,LVar [Cnt]〉〉
SourceCodeStatements
Declare private method with optional parameters, return value and local
variables.
PUB Name (Par ,Par) :RVal | LVar [Cnt]〉〉 ,LVar [Cnt]〉〉
SourceCodeStatements
Declare public method with optional parameters, return value and local
variables.
QUIT Exit from REPEAT loop immediately.
REBOOT Reset the Propeller chip.
REPEAT Count
Statement(s)
Execute code block repetitively, either infinitely, or for a finite number of
iterations.
REPEAT Variable FROM Start TO Finish STEP Delta
Statement(s)
Execute code block repetitively, for finite, counted iterations.
REPEAT ((UNTIL WHILE)) Condition(s)
Statement(s)
Execute code block repetitively, zero-to-many conditional iterations.
REPEAT
Statement(s)
((
UNTIL WHILE)) Condition(s)
Execute code block repetitively, one-to-many conditional iterations.
RESULT 9 Return value variable for PUB/PRI methods.
RETURN Value 9 Exit from PUB/PRI method with optional return Value.
ROUND (FloatConstant) 9
Round floating-point constant to the nearest integer at compile-time, in any
block.
SPR [Index] 9 Special Purpose Register array.
STRCOMP (StringAddress1, StringAddress2) 9 Compare two strings for equality.
STRING (StringExpression) 9 Declare in-line string constant and get its address.