Jump to content

Check out our Community Blogs

Register and join over 40,000 other developers!

Recent Status Updates

View All Updates

- - - - -

C- Syntax to allocate Global variables to consecutive memory locations

syntax global variable

  • Please log in to reply
1 reply to this topic

#1 Guest_techie82_*

  • Guest

Posted 08 April 2007 - 09:48 PM

Hello all

I'm a fresher to Microcontroller programming. I have defined certain global variables that I need to store at consecutive memory locations, say starting from 0x8000h . Will appreciate if anyone can give me the syntax / instructions to go about the same.


  • 0

#2 WingedPanther73


    A spammer's worst nightmare

  • Moderator
  • 17757 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

Posted 09 April 2007 - 08:42 AM

The location of variables allocated in C is normally determined by the compiler, not the programmer. If they are all of the same data-type you could create an array. Is there any particular reason they need to be in consecutive memory locations?
  • 0

Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

My MineCraft server site: http://banishedwings.enjin.com/

Also tagged with one or more of these keywords: syntax, global variable

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download