Help with accessing array elements in ASM

General discussion on mikroPascal PRO for PIC32.
Post Reply
Author
Message
bobspencerr
Posts: 78
Joined: 17 Jun 2008 13:38

Help with accessing array elements in ASM

#1 Post by bobspencerr » 12 Jun 2011 12:30

Can anyone tell me how to use a variable position within ASM in PIC32 to access an array?
Here is the line that is causing me grief which accesses an array zservo one element at a time in a loop.

LHU R10, Offset(_zservo + 0)(GP)

I have tried substituting the +0 with a variable (R23) but it fails in the compiler.

LHU R10, Offset(_zservo + R23)(GP)


Is this even possible?
What is the (GP) part of the statement for? :wink:

bobspencerr
Posts: 78
Joined: 17 Jun 2008 13:38

Re: Help with accessing array elements in ASM

#2 Post by bobspencerr » 13 Jun 2011 04:40

Thanks to anyone looking at this one but I have resolved it now.

Cheers

:o

Post Reply

Return to “mikroPascal PRO for PIC32 General”