Search:

Type: Posts; User: edunia11

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    964

    Linker Question

    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...
  2. Replies
    22
    Views
    9,315

    char string[] = "String size"; size =...

    char string[] = "String size";

    size = sizeof(string);

    This works!

    Thanks again!
  3. Replies
    22
    Views
    9,315

    I am trying to create a MACRO that will do this...

    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.
  4. Replies
    22
    Views
    9,315

    I can't use any Standard Library C functions...

    I can't use any Standard Library C functions other than sizeof();
  5. Replies
    22
    Views
    9,315

    Size of a string

    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.
  6. Thank you!!!

    Thank you!!!
  7. Returning address of Function. Pointers to Functions.

    Hi everybody,

    I am trying to assign an address of a function to a variable.
    How can I do this in C?

    Thanks!
  8. Replies
    11
    Views
    1,614

    If you disassembled that piece of code, it would...

    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,...
  9. Replies
    11
    Views
    1,614

    There is an assembly instruction in PPC440GX...

    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...
  10. Replies
    11
    Views
    1,614

    ok, how about for gcc compiler?

    ok, how about for gcc compiler?
  11. Replies
    11
    Views
    1,614

    Inlining Assembly for PPC440GX

    Does anyone have an example of how to inline Assembly instructions for PPC440GX processor?

    Thanks,
  12. Replies
    12
    Views
    2,233

    The code HAS been tested using routines and not...

    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.
  13. Replies
    12
    Views
    2,233

    The reason behind making this a Macro instead of...

    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...
  14. Replies
    12
    Views
    2,233

    Macro Definitions and Usage

    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*/
    ...
  15. Replies
    9
    Views
    4,259

    Thank you!!!

    Thank you!!!
  16. Replies
    9
    Views
    4,259

    I have an array of structures. I need to...

    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...
  17. Replies
    9
    Views
    4,259

    The code is compiled on a Unix Machine. When...

    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"
  18. Replies
    9
    Views
    4,259

    unsigned long foo = 0x12345678; Just sets...

    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?
  19. Replies
    9
    Views
    4,259

    Assigning an address to a global variable.

    Is there a way to assign an address to a non-pointer global variable???
Results 1 to 19 of 19