inglewoodpete
Senior Member
I am using the scratchpad of a 28X2 (AXE401 Shield) for more than one function.
The easiest way to access this data is to use the ptr (as @ptr, @ptrinc) variable. In order to use different areas of the scratchpad for each data table, I want to preserve the ptr in user RAM before and after use, using the Peek and Poke commands.
The scratchpad in the 28X2 has 1024 bytes, so I need to store the ptr's 10 bits as a word in user RAM.
The complier (PE vers 5.5.1) rejects the following command:
...but accepts:
Obviously, I know the workaround but is this a compiler bug?
The easiest way to access this data is to use the ptr (as @ptr, @ptrinc) variable. In order to use different areas of the scratchpad for each data table, I want to preserve the ptr in user RAM before and after use, using the Peek and Poke commands.
The scratchpad in the 28X2 has 1024 bytes, so I need to store the ptr's 10 bits as a word in user RAM.
The complier (PE vers 5.5.1) rejects the following command:
Code:
#PICAXE 28X2
Peek 44, Word Ptr
Code:
Peek 44, Word Ptr
^
Error: Word variable required!
Code:
#PICAXE 28X2
Peek 44, ptrh, ptrl
Last edited: