122-32000 Parallax Inc, 122-32000 Datasheet - Page 333

MANUAL PROPELLER

122-32000

Manufacturer Part Number
122-32000
Description
MANUAL PROPELLER
Manufacturer
Parallax Inc
Datasheets

Specifications of 122-32000

Accessory Type
Manual
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
For Use With/related Products
Propeller Education (PE) Kit
Lead Free Status / Rohs Status
Lead free / RoHS Compliant
(Syntax 1) on page 208 and keep in mind that
description.
Reading/Writing Words of Main Memory (Syntax 3)
In
memory. In the following two examples, we’ll assume our object contained the
from the example above, and we will demonstrate two different ways to access that data.
First, let’s try accessing the data directly using the labels we provided in our data block.
PUB GetData | Index, Temp
The first line inside of the
MyData
the
Index
from
($FF99’s high-byte). Why were bytes read instead of words?
desired data and our data was specified as word-sized data but the symbol
a byte pointer since that data was specified to be byte-aligned.
Perhaps you intended to read word-sized data from
Coincidentally, even though
to be word-aligned as well because the previous declaration finished on a word boundary.
This fact allows us to use the
PUB GetData | Index, Temp
Temp := MyData
<do something with Temp>
repeat Index from 0 to 1
Temp := WORD[@MyData]
<do something with Temp>
repeat Index from 0 to 1
PUB
Temp := MyList[Index]
Temp := MyList[Index]
<do something with Temp>
Temp := WORD[@MyList][Index] 'Read data to Temp 1 word at a time
<do something with Temp>
. The first time through the loop (Index = 0) the value $99 ($FF99’s low-byte) is read
MyList
and
list (the word-sized value 640) and stores it in
PRI
and the second time through the loop (Index = 1) the next byte is read, $FF
blocks, syntax 3 of
line reads a byte of main memory from the location of
GetData
MyList
WORD
declaration to achieve our goal.
WORD
is declared as byte-aligned word data, it is also happens
method,
is used to read or write word-sized values of main
4: Spin Language Reference –
'Read first word of MyData into Temp
'Perform task with Temp
'Repeat two times
'Read data to Temp, 1 byte at a time
'Perform task with value in Temp
'Read first word of MyData into Temp
'Perform task with Temp
'Repeat two times
'Perform task with value in Temp
Temp := MyData
WORD
Temp
MyList
is used for the Size field in that
. Further down, in the
MyList
just like we did from
Propeller Manual v1.0 · Page 333
, reads the first value in the
points at the start of our
MyList
REPEAT
is treated as
DAT
MyList +
MyData
block
loop,
.

Related parts for 122-32000