I have this code:
typedef union { uint i; uchar b[2]; } UINT;
UINT ByteToHex(unsigned char b);
I write a little code in assembler that convert a hex byte y two ascii byte.
when I call this routine from C
void main(void){ UINT asc;
asc=ByteToHex(0x49); }
The value returned in asc is not 0x3439. However the value 0x3439 is returned in r6 and r7 correctly.
why?