Clearing Ram
Hello,
I'm switching between program banks for the first time, and I'm wondering if
there is an easy way to clear all the variable space ram to 0 so I can start
fresh when the program switches over?
Thanks,
stewart
--
Stewart Mayer, stewlist@k... on 12/10/2001
I'm switching between program banks for the first time, and I'm wondering if
there is an easy way to clear all the variable space ram to 0 so I can start
fresh when the program switches over?
Thanks,
stewart
--
Stewart Mayer, stewlist@k... on 12/10/2001
Comments
stewlist@k... writes:
> I'm switching between program banks for the first time, and I'm wondering if
> there is an easy way to clear all the variable space ram to 0 so I can
> start
>
This little routine takes advantage of the Stamp's flexibility with memory
indexing.
ram VAR Word
FOR ram = 1 TO 12
ram(ram) = 0
NEXT
ram = 0
-- Jon Williams
-- Parallax
[noparse][[/noparse]Non-text portions of this message have been removed]
Thanks,
Stewart
On Mon, 10 Dec 2001 18:25:03 EST, jonwms@a... wrote:
>In a message dated 12/10/01 4:25:14 PM Central Standard Time,
>stewlist@k... writes:
>
>
>>I'm switching between program banks for the first time, and I'm wondering if
>>there is an easy way to clear all the variable space ram to 0 so I can
>>start
>>
>
>
>This little routine takes advantage of the Stamp's flexibility with memory
>indexing.
>
>ram VAR Wordx
>
>FOR ram = 1 TO 12
>ram(ram) = 0
>NEXT
>ram = 0
>
>-- Jon Williams
>-- Parallax
>
>
>[noparse][[/noparse]Non-text portions of this message have been removed]
>
>
>To UNSUBSCRIBE, just send mail to:
>basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. ·Text in the Subject and Body
of the message will
>be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
--
Stewart Mayer, stewlist@k... on 12/11/2001
would be a good idea. Here's the updated version:
ram VAR W0
FOR ram = 1 TO 12
ram(ram) = 0
NEXT
ram = 0
The other version of the program could give you grief if there was a word
variable defined before "ram." By using aliasing of the internal variable
name W0, this new version is guaranteed to work, no matter what other
variables you have defined or in what order.
-- Jon Williams
-- Parallax
In a message dated 12/11/01 8:07:51 AM Central Standard Time,
stewlist@k... writes:
> Wonderful!
>
> Thanks,
> Stewart
>
> On Mon, 10 Dec 2001 18:25:03 EST, jonwms@a... wrote:
> >In a message dated 12/10/01 4:25:14 PM Central Standard Time,
> >stewlist@k... writes:
> >
> >
> >>I'm switching between program banks for the first time, and I'm wondering
> if
> >>there is an easy way to clear all the variable space ram to 0 so I can
> >>start
> >>
> >
> >
> >This little routine takes advantage of the Stamp's flexibility with memory
> >indexing.
> >
> >ram VAR Wordx
> >
> >FOR ram = 1 TO 12
> >ram(ram) = 0
> >NEXT
> >ram = 0
> >
> >-- Jon Williams
> >-- Parallax
>
[noparse][[/noparse]Non-text portions of this message have been removed]