Skip to main content
Kuikui
Associate III
January 22, 2011
Question

How to create a shared var in RAM

  • January 22, 2011
  • 2 replies
  • 517 views
Posted on January 22, 2011 at 13:19

How to create a shared var in RAM

    This topic has been closed for replies.

    2 replies

    Kuikui
    KuikuiAuthor
    Associate III
    May 17, 2011
    Posted on May 17, 2011 at 14:22

    good idea !

    Thanks clive.

    Tesla DeLorean
    Guru
    May 17, 2011
    Posted on May 17, 2011 at 14:22

    Truncate the amount of RAM the compiler/linker can see, and then define a variable or structure at the end of memory as a common space.

    unsigned *foo = (unsigned *)0x20004F00;

    if (*foo == 0x1234ABCD) // Check Magic

    {

        *foo = 0xABCD1234; // Invalidate Magic

        puts(''Magic Value 1 Detected'');

    }

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..