Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Do I need to do anything to source code that contains a #pragma psect directive when porting this code to an OCG compiler?

0
Posted

Do I need to do anything to source code that contains a #pragma psect directive when porting this code to an OCG compiler?

0

The #pragma psect directive was present in non-OCG compilers to allow C objects to be placed into user-defined psects which could then be linked at locations specified by the programmer. In early versions of OCG compiler (prior to version 9.70) the #pragma psect directive was not implemented, but was re-implemented in versions 9.70 and above. OCG-compilers do allow objects to be defined as absolute, thus bypassing the need to use this pragma in many instances. If you are using a version 9.70 compiler, you can continue to use this pragma, although the name of the default psect may have changed. (To check this, comment out the pragma, compile and check which psect the object is normally placed in using either the map or assembly list files.) Alternatively you can make the object absolute. See your manual for more details, but the following illustrate examples of absolute objects. int input @ 0x10; // place input at address 10h const data[] @ 0x2000 = { 0, 1, 2, 3 }; // place array at 200

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123