Skip to main content
Visitor II
April 10, 2003
Question

Adding text in your code (Assembler)

  • April 10, 2003
  • 12 replies
  • 1756 views
Posted on April 10, 2003 at 17:00

Adding text in your code (Assembler)

    This topic has been closed for replies.

    12 replies

    Visitor II
    April 10, 2003
    Posted on April 10, 2003 at 16:59

    All you would have to do is:

    +seg .str -b 0xf000 -n .str # special const section

    +seg .text -n .text -a .str # program code

    +seg .const -a .text # constants follow code

    #pragma section const {str}

    const char * const pData[] = {

    ''testfirm'',

    ''Ampel'',

    ''1.0.0.'',

    ''ST Micro''

    };

    or why not

    const char* pString = ''testfirm Ampel 1.0.0. ST Micro'';

    #pragma section const {}

    Regards

    Spen

    Visitor II
    April 10, 2003
    Posted on April 10, 2003 at 17:00

    All you would have to do is:

    +seg .str -b 0xf000 -n .str # special const section

    +seg .text -n .text -a .str # program code

    +seg .const -a .text # constants follow code

    #pragma section const {str}

    const char * const pData[] = {

    ''testfirm'',

    ''Ampel'',

    ''1.0.0.'',

    ''ST Micro''

    };

    or why not

    const char* pString = ''testfirm Ampel 1.0.0. ST Micro'';

    #pragma section const {}

    Regards

    Spen