backup loop with put
Archiver
Posts: 46,084
Heinz-
I think you want:
backup:
for b25 = 50 to 74
put b25,b0(b25 - 50)
next
That should store b0 through b24 in scratchpad locations 50 through
74.
Regards,
Steve
H Schwenk GMX wrote:
> If I wont to save all variables in the scratch Ram
> on the address 50 to 74 (stamp 2p)
> can I use this subroutine
> backup:
> for b25 = 50 to 74
> put b25,b0(b25)
> next
> return
> dos the compiler understand that I wont to store
> b0 in the ram on the address 50
> b1 in the ram on the address 51...
I think you want:
backup:
for b25 = 50 to 74
put b25,b0(b25 - 50)
next
That should store b0 through b24 in scratchpad locations 50 through
74.
Regards,
Steve
H Schwenk GMX wrote:
> If I wont to save all variables in the scratch Ram
> on the address 50 to 74 (stamp 2p)
> can I use this subroutine
> backup:
> for b25 = 50 to 74
> put b25,b0(b25)
> next
> return
> dos the compiler understand that I wont to store
> b0 in the ram on the address 50
> b1 in the ram on the address 51...
Comments
I am not sure if I understand well ????
Somebody maybe like to tell me?
If I wont to save all variables in the scratch Ram
on the address 50 to 74 (stamp 2p)
can I use this subroutine
backup:
for b25 = 50 to 74
put b25,b0(b25)
next
return
dos the compiler understand that I wont to store
b0 in the ram on the address 50
b1 in the ram on the address 51
b2 in the ram on the address 52
and so on ???
Thanks Heinz
> put b25,b0(b25)
>next
Yes, that will store 25 RAM bytes in the scratchpad.