Does anyone know a way to separate .text (code) and .rodata (read only data/constants) in ROM. I need the them to go to 2 different starting locations.
Currently when I compile, they are placed one...
Type: Posts; User: edunia11
Does anyone know a way to separate .text (code) and .rodata (read only data/constants) in ROM. I need the them to go to 2 different starting locations.
Currently when I compile, they are placed one...
char string[] = "String size";
size = sizeof(string);
This works!
Thanks again!
I am trying to create a MACRO that will do this for a string of any size.
If I have to go with a loop, I may as well just write a routine that does this.
Thanks for your help.
I can't use any Standard Library C functions other than sizeof();
Hi everybody,
I have a question on calculating the actual size of a string.
Example:
char *string = "String size";
int size;
The actual "String Size" is 11 charactres long.
Thank you!!!
Hi everybody,
I am trying to assign an address of a function to a variable.
How can I do this in C?
Thanks!
If you disassembled that piece of code, it would turn out to be more than just 2 comparisons up to 8 times.
In addition to setting up the variables, and the loop, there are 2 increments, a shift,...
There is an assembly instruction in PPC440GX manual, that counts leading 1's and 0's of any unsigned long integer.
My boss asked me to research this posibility, so that we do not write a separate...
ok, how about for gcc compiler?
Does anyone have an example of how to inline Assembly instructions for PPC440GX processor?
Thanks,
The code HAS been tested using routines and not MACROS, I'm just trying to get a little bit of an edge using macros, since my performance is so awful.
Thanks for all of your suggestions.
The reason behind making this a Macro instead of a Function is for speed purposes.
Constantly making a function call to this routine would seriously affect my performance.
#define...
Hello everyone,
I have defined a MACRO as follows:
#define GET_BITS(bits, num_bits, bit)\
if(num_bits > 0)\
{\
GET_BIT(bit);\ /* Gets one bit from a string of Bytes*/
...
Thank you!!!
I have an array of structures. I need to allocate fixed memory space, so that I can manipulate this array of structures, which needs to be in this fixed mem space.
I think that making a pointer...
The code is compiled on a Unix Machine.
When trying the code you suggested I get the following error.
"Conversion to non-scalar type requested"
unsigned long foo = 0x12345678;
Just sets foo.
I am trying to set the address of foo to 0x12345678
Is there a way to do that without making foo a pointer?
Is there a way to assign an address to a non-pointer global variable???