We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
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?