Jump to content
Sign in to follow this  
Neil

Force Function Memory Location

Recommended Posts

Hi

 

With reference to my post in the C++ section.

 

Would it be possible to add a #PRAGMA type command to force a function to be located at a defined start location in memory? Somthing lic ORG in asm.

 

I can bodge this using the linker. I can also use this be converting a function to hex and encoding it as a #pragma data command, but these are far from ideal.

 

Thanks to Reynard for these comments and sugestions

 

 

void func(int par) org 0x200 {
// Function will start at address 0x200
 nop;
}

OR

#pragma funcorg <func_name>  <starting_address>

 

which can be done in MikroC but alas not in BoostC yet (that I know of).

 

Cheers

 

Reynard

Share this post


Link to post
Share on other sites

Neil,

 

Hi

 

void func(int par) org 0x200 {
// Function will start at address 0x200
 nop;
}

This functionality is currently being worked on.

 

Regards

Dave

Share this post


Link to post
Share on other sites

Hi Dave

 

Thanks for the note. I know it is difficult to say, but when do you expect to have this feature? I may well delay my development of the bit of my code.

 

Thanks

 

Neil

Share this post


Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...