AnsweredAssumed Answered

dm(variable) issue what am i doing.

Question asked by BartW on Sep 1, 2010
Latest reply on Sep 9, 2010 by BartW

I'm working on a asmebler project and am having some issues with memory storage using dm();

basically i read from the variable a pointer uses it then save it back. However when debugging it saves it into the next address.

 

In Main.asm i have defined them as...

.global rnd_i1;
.var rnd_i1;

.global rnd_j1;
.var rnd_j1;

 

In my function i do.

i0 = dm(rnd_i1);
i1 = dm(rnd_j1);
...

removed code nothing but some simple maths  changing i0 and i1

...

dm(rnd_i1) = i0;    //save i

dm(rnd_j1) = i1;    //save j

 

so in the above example dm(rnd_i1) = i0 save to location J...

and dm(rnd_j1) = i1; saves into adjacent memory.

 

Any Ideas????

Cheers

Bart

Outcomes