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

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
This example works just like the previous, except that we use the
byte of main memory from the address of
With a similar syntax, bytes of main memory can be written to as well, as long as they are
RAM locations. For example:
This line writes the character “M” to the first byte of string data at
string to be “Mello”,0.
Accessing Bytes of Larger-Sized Variables (Syntax 4)
In
word-sized or long-sized variables. For example:
VAR
PUB Main
This example accesses the byte-sized components of both
The comments indicate what each line is doing. At the end of the
equal 25,600 and
Page 168 · Propeller Manual v1.0
BYTE[@MyString][0] := "M"
word WordVar
long LongVar
WordVar.byte := 0
WordVar.byte[0] := 0
WordVar.byte[1] := 100
LongVar.byte := 25
LongVar.byte[0] := 25
LongVar.byte[1] := 50
LongVar.byte[2] := 75
LongVar.byte[3] := 100
PUB
and
– Spin Language Reference
PRI
blocks, syntax 4 of
LongVar
will equal 1,682,649,625.
BYTE
'Set first byte of WordVar to 0
'Same as above
'Set second byte of WordVar to 100
'Set first byte of LongVar to 25
'Same as above
'Set second byte of LongVar to 50
'Set third byte of LongVar to 75
'Set fourth byte of LongVar to 100
'Write M to first character of MyString
MyData
is used to read or write byte-sized components of
and the address of
WordVar
Main
and
BYTE
MyString
MyString
LongVar
method,
declaration to read a
+
, changing the
, individually.
Index
WordVar
.
will

Related parts for 122-32000