About #define aa=DWORD[0x30]

If I

 #define aa=DWORD[0x30];
Can I treat aa as an integer number!

And if I
 #define aa=DBYTE[0x30];
Can I treat aa as an char number!

Thanks!

Parents
  • Thanks for your correction in the other thread.

    Beware, however, that using these macros results in DWORD[0x30] accessing an unsigned in at internal RAM address 0x60 and DBYTE[0x30] accessing an unsigned char at internal RAM address 0x30. If you are truly trying to access the 0x30'th + 1 integer or the 0x30'th + 1 char starting from the beginning of internal RAM, then you are OK using them. If you are thinking of 0x30 as an absolute internal RAM address, you will not access that location with the DWORD macro.

    I have cautioned about this previously in my 3/27/03 10:06:03 post in this thread:

    http://www.keil.com/forum/docs/thread2581.asp

Reply
  • Thanks for your correction in the other thread.

    Beware, however, that using these macros results in DWORD[0x30] accessing an unsigned in at internal RAM address 0x60 and DBYTE[0x30] accessing an unsigned char at internal RAM address 0x30. If you are truly trying to access the 0x30'th + 1 integer or the 0x30'th + 1 char starting from the beginning of internal RAM, then you are OK using them. If you are thinking of 0x30 as an absolute internal RAM address, you will not access that location with the DWORD macro.

    I have cautioned about this previously in my 3/27/03 10:06:03 post in this thread:

    http://www.keil.com/forum/docs/thread2581.asp

Children
More questions in this forum