Keil Logo Arm Logo

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
New! value gets lost?
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
New! RE: value gets lost?
Have you:

  1. Checked the generated code?
  2. Tried the program in the simulator?
Jon

Next Thread | Thread List | Previous Thread Start a Thread | Settings

arm-logo-small

Keil logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.