CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

set functions at a predefined location

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
Eldert Besseling



Joined: 07 Oct 2003
Posts: 7

View user's profile Send private message

set functions at a predefined location
PostPosted: Tue Jan 13, 2004 5:28 am     Reply with quote

Hi,

What is the best way to set a function in a pre defined location in ROM
i use #org statement but i have not a good result.

My intention is:

# set location in ROM
void function( void )
{
...
}

Can anyone help me?

Regards Eldert
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Tue Jan 13, 2004 7:14 am     Reply with quote

The answer:

#org

Post an example and someone might be able to tell you what the problem is.
Guest








PostPosted: Tue Jan 13, 2004 8:22 am     Reply with quote

I try the following code

#separate
void Communications(void);

#org 0x100, 0x150
void Communications(void)
{
....
}


my compiler generate an out of ROM error
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

View user's profile Send private message Send e-mail

PostPosted: Tue Jan 13, 2004 8:52 am     Reply with quote

Anonymous wrote:

my compiler generate an out of ROM error


Probably because Communications() is larger than 0x50 bytes.

Also, if you're using an interrupt the compiler may be trying to use those ROM locations.

Also, you don't have to use #separate with #org. #separate is implied when using #org.
Eldert Besseling



Joined: 07 Oct 2003
Posts: 7

View user's profile Send private message

PostPosted: Tue Jan 13, 2004 9:04 am     Reply with quote

Oke thanks all for your help it works

RGS Eldert
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group