Searching \ for ' Array Location in Assembly for "C"' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=array+location+assembly
Search entire site for: 'Array Location in Assembly for "C"'.

No exact or substring matches. trying for part
PICList Thread
'[PICLIST] Array Location in Assembly for "C"'
2000\10\05@202007 by Peter Schultz

flavicon
face
Greetings,
  How do I define the memory location of an array in HI-TECH C so that when
I reference the array in assembly, I can appropriately use the _INDF and
_FSR registers in assembly for array manipulation?
In my particular example, I have identified arrays in C as follows:

static bank1 unsigned char data1[59];
unsigned char data2[48];

Thanks
Peter Schultz
Minimed Inc.
12744 San Fernando Road,
Sylmar, CA 91342
Phone: (818) 362-2358x3837
Pager:  (818) 589-3148
E-mail: spam_OUTPeterSTakeThisOuTspamminimed.com

--
http://www.piclist.com hint: The list server can filter out subtopics
(like ads or off topics) for you. See http://www.piclist.com/#topics


2000\10\06@094207 by Michael Rigby-Jones

flavicon
face
> -----Original Message-----
> From: Peter Schultz [SMTP:.....PeterSKILLspamspam@spam@MINIMED.COM]
> Sent: Friday, October 06, 2000 1:15 AM
> To:   PICLISTspamKILLspamMITVMA.MIT.EDU
> Subject:      Array Location in Assembly for "C"
>
> Greetings,
>    How do I define the memory location of an array in HI-TECH C so that
> when
> I reference the array in assembly, I can appropriately use the _INDF and
> _FSR registers in assembly for array manipulation?
> In my particular example, I have identified arrays in C as follows:
>
> static bank1 unsigned char data1[59];
> unsigned char data2[48];
>
> Thanks
> Peter Schultz
> Minimed Inc.
>
I don't see the problem, you surely just use the name of the array with an
underscore like so:

#include <pic.h>

unsigned char data2[48];

void main()
{
       #asm
               movf    _data2,w;
               movwf   _FSR;
               movf    0,w;
               movwf   _PORTB;
       #endasm
}

Regards

Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


More... (looser matching)
- Last day of these posts
- In 2000 , 2001 only
- Today
- New search...