Hello, I'm trying to pass a variable to a function, but the value stored in the variable never arrives. When I pass a constant, however, the value is handed over. An example follows: main.c extern void TransmitHex( unsigned char hexval ); main{ unsigned char var; var = 0x41; TransmitHex( 0x41 ); // produces an "A" in ASCII TransmitHex( var ); // nothing shows up, possibly 0x00 is transmitted } --- serial.c void TransmitHex ( unsigned char hexval){ /* transmit hexval via serial port */ } I've tried to locate var with NEAR and FAR, but the problem persists. I'm using the HLARGE memory model. I have an external RAM connected to the ST10, address window is configured properly. any ideas? regards, Soenke
Think I've found the cause. I've relocated the NEAR memory area to on chip memory, and suddenly the code works. Might be a timing problem with the external RAM. Thanks for the helpful input! Regards, Soenke