Datasheet

Propeller™ P8X32A Datasheet www.parallax.com
Copyright © Parallax Inc. Page 21 of 37 Rev 1.1 9/12/2008
Spin Command
Returns
Value
Description
STRSIZE (StringAddress) 9 Get size, in bytes, of zero-terminate string.
TRUNC (FloatConstant) 9
Remove fractional portion from floating-point constant at compile-time, in
any block.
VAR
Size Symbol [Count] ((, Size )) Symbol [Count]〉〉
Declare symbolic global variables.
VCFG 9 Video Configuration register.
VSCL 9 Video Scale register.
WAITCNT (Value) Pause cog’s execution temporarily.
WAITPEQ (State, Mask, Port) Pause cog’s execution until I/O pin(s) match designated state(s).
WAITPNE (State, Mask, Port) Pause cog’s execution until I/O pin(s) do not match designated state(s).
WAITVID (Colors, Pixels) Pause cog’s execution until its Video Generator is available for pixel data.
WORD Symbol [Count] Declare word-sized symbol in VAR block.
Symbol WORD Data [Count] Declare word-aligned and/or word-sized data in DAT block.
WORD [BaseAddress] [Offset] 9 Read/write word of main memory.
Symbol.WORD [Offset] 9 Read/write word-sized component of long-sized variable.
WORDFILL (StartAddress, Value, Count) Fill words of main memory with a value.
WORDMOVE (DestAddress, SrcAddress, Count) Copy words from one region to another in main memory.
6.3.1. Constants
Constants (pre-defined)
Constant
1
Description
_CLKFREQ Settable in Top Object File to specify System Clock frequency.
_CLKMODE Settable in Top Object File to specify application’s clock mode.
_XINFREQ Settable in Top Object File to specify external crystal frequency.
_FREE Settable in Top Object File to specify application’s free space.
_STACK Settable in Top Object File to specify application’s stack space.
TRUE Logical true: -1 ($FFFFFFFF)
FALSE Logical false: 0 ($00000000)
POSX Max. positive integer: 2,147,483,647 ($7FFFFFFF)
NEGX Max. negative integer: -2,147,483,648 ($80000000)
PI Floating-point PI: 3.141593 ($40490FDB)
RCFAST Internal fast oscillator: $00000001 (%00000000001)
RCSLOW Internal slow oscillator: $00000002 (%00000000010)
XINPUT External clock/oscillator: $00000004 (%00000000100)
XTAL1 External low-speed crystal: $00000008 (%00000001000)
XTAL2 External medium-speed crystal: $00000010 (%00000010000)
XTAL3 External high-speed crystal: $00000020 (%00000100000)
PLL1X External frequency times 1: $00000040 (%00001000000)
PLL2X External frequency times 2: $00000080 (%00010000000)
PLL4X External frequency times 4: $00000100 (%00100000000)
PLL8X External frequency times 8: $00000200 (%01000000000)
PLL16X External frequency times 16: $00000400 (%10000000000)
1
“Settable” constants are defined in Top Object File’s CON block. See Valid Clock Modes for _CLKMODE. Other settable constants use whole numbers.