Datasheet
Propeller™ P8X32A Datasheet www.parallax.com
Copyright © Parallax Inc. Page 17 of 37 Rev 1.1 9/12/2008
6.0 PROGRAMMING LANGUAGES
The Propeller chip is programmed using two languages designed specifically for it: 1) Spin, a high-level object-based
language, and 2) Propeller Assembly, a low-level, highly-optimized assembly language. There are many hardware-based
commands in Propeller Assembly that have direct equivalents in the Spin language.
The Spin language is compiled by the Propeller Tool software into tokens that are interpreted at run time by the Propeller
chip’s built-in Spin Interpreter. The Propeller Assembly language is assembled into pure machine code by the Propeller Tool
and is executed in its pure form at run time.
Propeller Objects can be written entirely in Spin or can use various combinations of Spin and Propeller Assembly. It is often
advantageous to write objects almost entirely in Propeller Assembly, but at least two lines of Spin code are required to launch
the final application.
6.1. Reserved Word List
All words listed are always reserved, whether programming in Spin or in Propeller Assembly. As of Propeller Tool v1.05:
Table 16: Reserved Word List
_CLKFREQ
s
_CLKMODE
s
_FREE
s
_STACK
s
_XINFREQ
s
ABORT
s
ABS
a
ABSNEG
a
ADD
a
ADDABS
a
ADDS
a
ADDSX
a
ADDX
a
AND
d
ANDN
a
BYTE
s
BYTEFILL
s
BYTEMOVE
s
CALL
a
CASE
s
CHIPVER
s
CLKFREQ
s
CLKMODE
s
CLKSET
d
CMP
a
CMPS
a
CMPSUB
a
CMPSX
a
CMPX
a
CNT
d
COGID
d
COGINIT
d
COGNEW
s
COGSTOP
d
CON
s
CONSTANT
s
CTRA
d
CTRB
d
DAT
s
DIRA
d
DIRB
d#
DJNZ
a
ELSE
s
ELSEIF
s
ELSEIFNOT
s
ENC
a#
FALSE
d
FILE
s
FIT
a
FLOAT
s
FROM
s
FRQA
d
FRQB
d
HUBOP
a
IF
s
IFNOT
s
IF_A
a
IF_AE
a
IF_ALWAYS
a
IF_B
a
IF_BE
a
IF_C
a
IF_C_AND_NZ
a
IF_C_AND_Z
a
IF_C_EQ_Z
a
IF_C_NE_Z
a
IF_C_OR_NZ
a
IF_C_OR_Z
a
IF_E
a
IF_NC
a
IF_NC_A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s
WORD
s
WORDFILL
s
WORDMOVE
s
WR
a
WRBYTE
a
WRLONG
a
WRWORD
a
WZ
a
XINPUT
s
XOR
a
XTAL1
s
XTAL2
s
XTAL3
s
a = Assembly element; s = Spin element; d = dual (available in both languages); # = reserved for future use
6.1.1. Words Reserved for Future Use
• DIRB, INB, and OUTB: Reserved for future use with a possible 64 I/O pin model. When used with the P8X32A, these
labels can be used to access Cog RAM at those locations for general-purpose use.
• ENC, MUL, MULS, ONES: Use with the current P8X32A architecture yields indeterminate results.