Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

List p=16f877a for PIC

Status
Not open for further replies.

PA3040

Advanced Member level 3
Advanced Member level 3
Joined
Aug 1, 2011
Messages
883
Helped
43
Reputation
88
Reaction score
43
Trophy points
1,308
Activity points
6,936
LIST P=16F877A

Dear All,

I sow lot of PIC programmers insert above text to there program. I never used it but program is working properly
Can any one please explain the important of this text

Thanks in advance
 

It's in the MPLAB help.

Occurring on a line by itself, the list directive has the effect of turning listing output on, if it had been previously turned off. Otherwise, one of a list of options can be supplied to control the assembly process or format the listing file.

The p= option sets the processor type (so that the assembler knows what machine code to generate). However, since the processor is usually set in the IDE, the p= option tends to be superfluous unless you are doing command-line assembly.
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
Dear FoxyRick

Thanks lot for the reply

I could not clear out my doubt please help more

Thanks in advance
 

Doubt of what?

LIST is a directive; a directive it is a command or information for the assembler or linker to make it behave in a certain way. It is not part of the program but can control how the program is compiled.

In the MPLAB IDE, as in other IDEs, you set the processor type in the IDE project setup. So, everything knows what processor you are writing code for.

In that case, LIST p= is not needed. It does no harm (provided it matches the processor set in the IDE project) but it is superfluous.

If, however, the assembly code is to be compiled by a command-line compiler, possibly separate assembler and linker, then you need to tell them what processor they should compile the assembly code for. The best way then is to use the LIST p= line.
 
  • Like
Reactions: PA3040

    PA3040

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top