Poking to RAM

russbow

Senior Member
I am using a 18m2 and need to store values in RAM so that I can use the variables again.
I would like to find an easier way to do this..

poke $60,b11: poke $61,b12: poke $62,b7: poke $63,b8

note the variables are not sequential.

This will need to be done a number of times, each time to sequential RAM addresses but never with sequential variables.

Is there an easier way of doing it. I have tried starting with bptr=$60 'point to first RAM location and then totally got lost in for / next sequences.
 

colinsmurph

New Member
I have been meaning too try using Eprom memory for a while...
I have dodged learning it because of code..
Can we have an example when you have cracked it?
Ordering some tomorrow ��
 

Buzby

Senior Member
Ooops !. Sorry I missed you were on an M.

One other idea is to use peek/poke WORD, as this means less typing !
 

russbow

Senior Member
because the variables are not always sequential I cant use WORD.

I was trying to adapt this from manual 2 as a sort of array

Code:
ptr = 1 ‘ reset scratchpad pointer to 1
for b1 = 1 to 5
sertxd (@ptrinc) ‘ re-transmit those 5 values
next b1
Looks like I'll have to type the long winded way
 

AllyCat

Senior Member
Hi,

If the variables are non-sequential, then I think the best you can do (for your example) is :

poke $60,b11,b12,b7,b8

Or the equivalent using bptr is:

@bptrinc = b11 : @bptrinc = b12 : @bptrinc = b7 : @bptrinc = b8

Cheers, Alan.
 
Top