Hi Del,
sounds somewhat funny, could you post the complete source file(s)?
Arnd-Hendrik

Delbert Martin IV wrote:
I think I know what happend but I don't know why.
I switches the order that the parameters were passed to the function without changing the function definition. now the backwards variable were actually in the order that i passed them (wrong). so i changed the function definition to take the integer then the char * and it worked!

why?

--Del



Delbert Martin IV wrote:

msp430-gcc (GCC) 3.3.4
Running under Linux.

I have a problem with the Parameter passing. I set up a function.

u0Write(char *buf, int len) {
...
}

I then set up some data to pass
char *addr = &ADC12MEM0;
int buflength = 2;

then I call the function
u0Write(addr,bufferlength);

I tell the debugger to break at u0Write;
the Debugger prints out the parameters passed:
Breakpoint 1, u0Write (buf=0x2 "\202 À", len=320)
well here is the problem 320 (decimal == 0x140) and 0x02 is the value of the len parameter, looks like these are getting swapped somehow? anyown know why?

--Del


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users





-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users



Reply via email to