Shop OBEX P1 Docs P2 Docs Learn Events
scratchpad prob. eg. — Parallax Forums

scratchpad prob. eg.

ArchiverArchiver Posts: 46,084
edited 2003-03-06 15:35 in General Discussion
This example is an appendage to the previous inquire : 'scratchpad
ram'.

Let's say in slot 0 we place the values x, y, z in the scratchpad
locations 2, 4, and 5.


'Slot 0:
'
START:
'various code
....
....

'somewhere in slot 0

PUT 2, x
PUT 3, y
PUT 4, z

RUN 1

END
'
During the course of the program we end up in slot 1 and try to
retreive the values 'PUT' in scratchpad while in slot 0 and place them
in the variables a, b, c.


'Slot 1:
'
START:

'somewhere in slot 1

GET 2, a
GET 3, b
GET 4, c

'various code
....
....
....

END
'
My problem is that the values I expected at locations 2, 3, & 4 are
now at locations 7, 8, & 9 (or in some cases not to be found).

Any ideas?

ninjahtek
Sign In or Register to comment.