 | Discussion Forum |  |
|
|
value gets lost?Next Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Holger Warzelhan Posted 7-Nov-2002 16:57 GMT Toolset C166 |  value gets lost? Holger Warzelhan Hello,
I have a variable declared to an absolute memroy location:
#define H1Utol MVAR (unsigned short, 0x12301C)
and a function that starts like this:
void func (void)
{ unsigned short H1;
H1 = H1Utol;
No matter what the value of H1Utol is at the moment the function is entered, H1 is zero after the assignment... for some reason.
The preprocessor output for these lines looks good:
H1 = (*((unsigned short volatile far *) (0x12301C)));
What could be the problem?
Thank you, Holger | | Read-Only Author Jon Ward Posted 7-Nov-2002 17:10 GMT Toolset C166 |  RE: value gets lost? Jon Ward Have you:
- Checked the generated code?
- Tried the program in the simulator?
Jon | |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|