Hi,
I have the question on typecasting mechanism :
The simple code is below (small memory model):
typedef struct
{
char low;
char high;
}SPLIT_T;
const unsigned char test_ch = (unsigned char )&handler; // Does not work ...storage dest is too small. I understand and would expect that test_ch would contain either msb or lsb of the handler's address!?
const SPLIT_T test_split = (SPLIT_T )&handler; // Compiler complaines - illegal typecast ????
void handler(void);
void main(void)
{
...
}
void handler(void)
{
...
}
Any ideas...
Regards, Mark