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

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
form, syntax 3, of
to the
used for the Size field in that description.
Reading/Writing Bytes 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
Since
is post incremented with
effectively
Similar to the above, we can use the
example.
PUB GetData | Index, Temp
Temp := MyData
<do something with Temp>
Index := 0
repeat
while Temp > 0
Temp := BYTE[@MyData]
<do something with Temp>
Index := 0
repeat
while Temp > 0
PUB
Temp := MyString[Index++]
Temp := MyString[Index++]
<do something with Temp>
Temp := BYTE[@MyString][Index++] 'Read chars into Temp
<do something with Temp>
Index
DAT
and
list (the byte-sized value 64) and stores it in
section’s Declaring Data (Syntax 1) on page 208, and keep in mind that
MyString
PRI
is earlier set to 0, the first byte of
blocks, syntax 3 of
BYTE
+
1
(see below). For more information about using
(the “e”), and the next time
++
GetData
, so the next time through the loop it reads the next byte,
line reads a byte of from the location of
BYTE
BYTE
method,
is used to read or write byte-sized values of main
declaration to achieve our goal, as in the following
4: Spin Language Reference –
MyString
Temp := MyData
'Read 1st byte of MyData to Temp
'Perform task with Temp
'Read chars into Temp
'Perform task with character
'Loop until end found
'Read 1st byte of MyData to Temp
'Perform task with Temp
'Perform task with character
'Loop until end found
Temp
MyString
is read, “H”. On that same line
. Further down, in the
+
Propeller Manual v1.0 · Page 167
, reads the first value in the
2
(the “l”), etc.
BYTE
MyString + Index
in this way, refer
REPEAT
DAT
BYTE
Index
block
loop,
is
.

Related parts for 122-32000