scratchpad ram
Archiver
Posts: 46,084
I have a program that uses multiply slots on a BS2e. I am trying to
pass values from one slot to another using scratchpad ram. However,
when I try to retreive them from the scratchpad in another slot, their
location has changed or do not show. Can anyone help me with this?
Thanx, ninjahtek
pass values from one slot to another using scratchpad ram. However,
when I try to retreive them from the scratchpad in another slot, their
location has changed or do not show. Can anyone help me with this?
Thanx, ninjahtek
Comments
"package" being stored in SPRAM. make sure you're actually writing to the
locations that you think you are.
-- Jon Williams
-- Parallax
In a message dated 3/6/2003 8:23:12 AM Central Standard Time,
kraftcom@a... writes:
> I have a program that uses multiply slots on a BS2e. I am trying to
> pass values from one slot to another using scratchpad ram. However,
> when I try to retreive them from the scratchpad in another slot, their
> location has changed or do not show. Can anyone help me with this?
>
[noparse][[/noparse]Non-text portions of this message have been removed]
I need to store a WORD variable in 2 bytes of scratch RAM on a BS2p.
I have not been able to find any references to this. Can anyone point
me in the right direction?
Thanks for the help.
Harris Pate
If you open it up, you'll find that the PUT keyword, under $PBASIC 2.5
syntax rules let's you do this:
PUT 0, Word $1234
This will put $34 in SP location 0, and $12 in location 1 (words are
stored little-endian). Under 2.0 syntax rules you would have to do
this:
PUT 0, myWordVar.LOWBYTE
PUT 1, myWordVar.HIGHBYTE
-- Jon Williams
-- Applications Engineer, Parallax
-- Dallas Office
Original Message
From: hbpate [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=CyHUzodHHLohKKvc3lvQAB2WpgOFeqvUtSWMLjS1qTfeDSp3vMOz152XHUrhGm0Y1JSJ9xlAcrrO4x8]hbpate@m...[/url
Sent: Thursday, June 24, 2004 8:43 AM
To: basicstamps@yahoogroups.com
Subject: [noparse][[/noparse]basicstamps] Scratchpad RAM
Help!
I need to store a WORD variable in 2 bytes of scratch RAM on a BS2p.
I have not been able to find any references to this. Can anyone point
me in the right direction?
Thanks for the help.
Harris Pate