Author Topic: Why are the commands in includes in MPASM suite, different to expected?  (Read 2043 times)

0 Members and 1 Guest are viewing this topic.

Offline iamwhoiamTopic starter

  • Contributor
  • !
  • Posts: 37
Hi folks :)

Just been following a tutorial, and instead of _DATA_CP_OFF, inside "P16F628A.INC" the directive:

Code: [Select]
_DATA_CP_OFF
is changed to:

Code: [Select]
DATA_CP_OFF
NO leading "_" underscore... :-S

Any ideas why?

TIA
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11630
  • Country: my
  • reassessing directives...
Any ideas why?
no idea! ask the "creator" (or from where you get the file). you edit either your file or the inc to make them compatible, then you good to go. but changing the later is not advisable.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline oPossum

  • Super Contributor
  • ***
  • Posts: 1415
  • Country: us
  • Very dangerous - may attack at any time
The first is typically used with the __config directive for parts with one config word. (most 10F, 12F, & 16F)

The second is typically used with the config directive for parts with several config words (18F)
 

Offline codeboy2k

  • Super Contributor
  • ***
  • Posts: 1836
  • Country: ca
identifiers that

 1) begin with a single underscore;  or
 2) contain a double underscore anywhere in the identifier

are reserved for the C or C++ implementation and should not be used by authors or library authors.

Chances are they wanted the MPASM libraries to be standards compliant.

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf