Help with asm: include and compilling

  • Thread starter Thread starter bleeker
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the correct usage of the 'include' directive in assembly language programming, specifically for the PIC16F84A microcontroller. Participants are seeking clarification on whether to use a full directory path or just the file name in the include statement, as well as addressing compilation errors encountered in MPLAB.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Homework-related

Main Points Raised

  • One participant asks whether the include statement should specify the full directory path or if just the file name is sufficient.
  • Another participant provides a syntax example for Microsoft's assembler, indicating that a simple include statement can be used.
  • A suggestion is made to consult the Help section of MPLAB for a list of error codes, specifically mentioning error code 7.
  • A participant points out the existence of template files in a subdirectory of MPLAB, suggesting that these templates may help in resolving compilation issues.
  • One participant reiterates the question about the include statement and provides an example using an absolute path, assuming the use of MASM.
  • A reference is made to a specific template file that includes directives for the PIC16F84, demonstrating the correct usage of the include statement.

Areas of Agreement / Disagreement

Participants express uncertainty regarding the correct format for the include statement and the meaning of the compilation errors. There is no consensus on the best approach to resolve these issues, and multiple viewpoints are presented.

Contextual Notes

Participants mention specific error codes and templates but do not provide a complete resolution to the compilation errors. The discussion reflects varying levels of familiarity with MPLAB and assembly language syntax.

Who May Find This Useful

This discussion may be useful for individuals working with assembly language programming for microcontrollers, particularly those using MPLAB and the PIC16F84A, as well as those encountering similar compilation issues.

bleeker
Messages
13
Reaction score
0
I just want to know what exactley must I write in the 'include'. Can I just write #include <P16F84A.INC> or must I write the whole directory path of the file?
And what does it mean when MPASMWIN desplay errors: 7?
I have even tried downloading programs in .asm for a PIC and compilling it but it still desplay errors: 7
 
Technology news on Phys.org
For microsoft's assembler (ML or MASM), the syntax is

include example.inc
 
If you investigate the Help section of MPLAB, you'll find (if you dig deep enough) a list of the error codes generated by the assembler.

I don't have MPLAB on this pc so I can't help much more than that.
 
The other thing that springs to mind is that there's a load of template files in a subdirectory of MPLAB.

They're found in a directory something like "C:\MPLAB\template\code"

If you have a look around using windows explorer, you'll find them.

There's a template in there that is intended for use with the PIC16F84A... copy that to where ever your work is, & have a good look at it... it should assemble without any errors.
 
bleeker said:
I just want to know what exactley must I write in the 'include'. Can I just write #include <P16F84A.INC> or must I write the whole directory path of the file?
And what does it mean when MPASMWIN desplay errors: 7?
I have even tried downloading programs in .asm for a PIC and compilling it but it still desplay errors: 7

You use the INCLUDE keyword and the absolute address of the file or that you want to include for example.

INCLUDE c:\masm615\include\lib32.inc

Im assuming that you are using masm.
 
From that f84temp.asm template file I mentioned above:

Code:
	list      p=16F84             ; list directive to define processor
	#include <p16F84.inc>         ; processor specific variable definitions
 

Similar threads

  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 29 ·
Replies
29
Views
4K
Replies
4
Views
5K
Replies
6
Views
3K
Replies
14
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 27 ·
Replies
27
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 70 ·
3
Replies
70
Views
5K
  • · Replies 32 ·
2
Replies
32
Views
4K