Variable declaraton with extra in CCalculating a simple CRCspidev_test.c analysislocal variable resets to zeroWriting data over Serial comm //Arduino & MPU6050 gyro+accelerometerWhy using a pointer interfacing LCD HD44780LCD interfacing with msp430AVR: Interrupt build errorstack calculation in microcontrollerWhy pass pointer to register as volatile?Purpose of 2nd order filter for processing temperature measurement

How would a developer who mostly fixed bugs for years at a company call out their contributions in their CV?

Why is 'additive' EQ more difficult to use than 'subtractive'?

Using too much dialogue?

Why is the Eisenstein ideal paper so great?

Count all vowels in string

Grade-school elementary algebra presented in an abstract-algebra style?

What weight should be given to writers groups critiques?

Security vulnerabilities of POST over SSL

Why did other houses not demand this?

Is "vegetable base" a common term in English?

Shorten or merge multiple lines of `&> /dev/null &`

What tokens are in the end of line?

...And they were stumped for a long time

Are cells guaranteed to get at least one mitochondrion when they divide?

Why sampling a periodic signal doesn't yield a periodic discrete signal?

Variable declaraton with extra in C

Python program for fibonacci sequence using a recursive function

Can a ring of spell storing and access to Find spells produce an endless menagerie?

What could a self-sustaining lunar colony slowly lose that would ultimately prove fatal?

Co-author wants to put their current funding source in the acknowledgements section because they edited the paper

xcolor breaking ligatures

How did NASA Langley end up with the first 737?

Can we assume that a hash function with high collision resistance also means highly uniform distribution?

Testing using real data of the customer



Variable declaraton with extra in C


Calculating a simple CRCspidev_test.c analysislocal variable resets to zeroWriting data over Serial comm //Arduino & MPU6050 gyro+accelerometerWhy using a pointer interfacing LCD HD44780LCD interfacing with msp430AVR: Interrupt build errorstack calculation in microcontrollerWhy pass pointer to register as volatile?Purpose of 2nd order filter for processing temperature measurement






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2












$begingroup$


I am reading some C code and came across this declaration in the program:



unsigned char serv_ctr @0x0002;


Can someone point me to documentation or explain what the "@0x0002" is for?










share|improve this question









New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$







  • 7




    $begingroup$
    I would guess that it is a compiler extension to place the variable at a specific address.
    $endgroup$
    – Eugene Sh.
    10 hours ago










  • $begingroup$
    Which C compiler are you using?
    $endgroup$
    – Dave Tweed
    9 hours ago






  • 1




    $begingroup$
    C Compiler Mplab XC8 v1.35
    $endgroup$
    – user3653645
    9 hours ago

















2












$begingroup$


I am reading some C code and came across this declaration in the program:



unsigned char serv_ctr @0x0002;


Can someone point me to documentation or explain what the "@0x0002" is for?










share|improve this question









New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$







  • 7




    $begingroup$
    I would guess that it is a compiler extension to place the variable at a specific address.
    $endgroup$
    – Eugene Sh.
    10 hours ago










  • $begingroup$
    Which C compiler are you using?
    $endgroup$
    – Dave Tweed
    9 hours ago






  • 1




    $begingroup$
    C Compiler Mplab XC8 v1.35
    $endgroup$
    – user3653645
    9 hours ago













2












2








2





$begingroup$


I am reading some C code and came across this declaration in the program:



unsigned char serv_ctr @0x0002;


Can someone point me to documentation or explain what the "@0x0002" is for?










share|improve this question









New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






$endgroup$




I am reading some C code and came across this declaration in the program:



unsigned char serv_ctr @0x0002;


Can someone point me to documentation or explain what the "@0x0002" is for?







c embedded variable






share|improve this question









New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 7 hours ago









Marcus Müller

36.3k363103




36.3k363103






New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 10 hours ago









user3653645user3653645

112




112




New contributor



user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




user3653645 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









  • 7




    $begingroup$
    I would guess that it is a compiler extension to place the variable at a specific address.
    $endgroup$
    – Eugene Sh.
    10 hours ago










  • $begingroup$
    Which C compiler are you using?
    $endgroup$
    – Dave Tweed
    9 hours ago






  • 1




    $begingroup$
    C Compiler Mplab XC8 v1.35
    $endgroup$
    – user3653645
    9 hours ago












  • 7




    $begingroup$
    I would guess that it is a compiler extension to place the variable at a specific address.
    $endgroup$
    – Eugene Sh.
    10 hours ago










  • $begingroup$
    Which C compiler are you using?
    $endgroup$
    – Dave Tweed
    9 hours ago






  • 1




    $begingroup$
    C Compiler Mplab XC8 v1.35
    $endgroup$
    – user3653645
    9 hours ago







7




7




$begingroup$
I would guess that it is a compiler extension to place the variable at a specific address.
$endgroup$
– Eugene Sh.
10 hours ago




$begingroup$
I would guess that it is a compiler extension to place the variable at a specific address.
$endgroup$
– Eugene Sh.
10 hours ago












$begingroup$
Which C compiler are you using?
$endgroup$
– Dave Tweed
9 hours ago




$begingroup$
Which C compiler are you using?
$endgroup$
– Dave Tweed
9 hours ago




1




1




$begingroup$
C Compiler Mplab XC8 v1.35
$endgroup$
– user3653645
9 hours ago




$begingroup$
C Compiler Mplab XC8 v1.35
$endgroup$
– user3653645
9 hours ago










1 Answer
1






active

oldest

votes


















8












$begingroup$

This is to specify an absolute address to place the variable at.

From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing:




Variables and functions can be placed at an absolute address by using
the __at() construct

......
2.5.2.2 DIFFERENCES

The 8-bit compilers have used an @ symbol to specify an absolute address







share|improve this answer









$endgroup$













    Your Answer






    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("schematics", function ()
    StackExchange.schematics.init();
    );
    , "cicuitlab");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "135"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );






    user3653645 is a new contributor. Be nice, and check out our Code of Conduct.









    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f439670%2fvariable-declaraton-with-extra-in-c%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    8












    $begingroup$

    This is to specify an absolute address to place the variable at.

    From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing:




    Variables and functions can be placed at an absolute address by using
    the __at() construct

    ......
    2.5.2.2 DIFFERENCES

    The 8-bit compilers have used an @ symbol to specify an absolute address







    share|improve this answer









    $endgroup$

















      8












      $begingroup$

      This is to specify an absolute address to place the variable at.

      From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing:




      Variables and functions can be placed at an absolute address by using
      the __at() construct

      ......
      2.5.2.2 DIFFERENCES

      The 8-bit compilers have used an @ symbol to specify an absolute address







      share|improve this answer









      $endgroup$















        8












        8








        8





        $begingroup$

        This is to specify an absolute address to place the variable at.

        From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing:




        Variables and functions can be placed at an absolute address by using
        the __at() construct

        ......
        2.5.2.2 DIFFERENCES

        The 8-bit compilers have used an @ symbol to specify an absolute address







        share|improve this answer









        $endgroup$



        This is to specify an absolute address to place the variable at.

        From the XC8 compiler manual page 27, section 2.5.2 Absolute Addressing:




        Variables and functions can be placed at an absolute address by using
        the __at() construct

        ......
        2.5.2.2 DIFFERENCES

        The 8-bit compilers have used an @ symbol to specify an absolute address








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 9 hours ago









        Eugene Sh.Eugene Sh.

        7,7781830




        7,7781830




















            user3653645 is a new contributor. Be nice, and check out our Code of Conduct.









            draft saved

            draft discarded


















            user3653645 is a new contributor. Be nice, and check out our Code of Conduct.












            user3653645 is a new contributor. Be nice, and check out our Code of Conduct.











            user3653645 is a new contributor. Be nice, and check out our Code of Conduct.














            Thanks for contributing an answer to Electrical Engineering Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2felectronics.stackexchange.com%2fquestions%2f439670%2fvariable-declaraton-with-extra-in-c%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Log på Navigationsmenu

            Wonderful Copenhagen (sang) Eksterne henvisninger | NavigationsmenurSide på frankloesser.comWonderful Copenhagen

            Detroit Tigers Spis treści Historia | Skład zespołu | Sukcesy | Członkowie Baseball Hall of Fame | Zastrzeżone numery | Przypisy | Menu nawigacyjneEncyclopedia of Detroit - Detroit TigersTigers Stadium, Detroit, MITigers Timeline 1900sDetroit Tigers Team History & EncyclopediaTigers Timeline 1910s1935 World Series1945 World Series1945 World Series1984 World SeriesComerica Park, Detroit, MI2006 World Series2012 World SeriesDetroit Tigers 40-Man RosterDetroit Tigers Coaching StaffTigers Hall of FamersTigers Retired Numberse