Help with asm: include and compilling

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

The discussion focuses on the correct usage of the 'include' directive in assembly language programming for the PIC16F84A microcontroller. Users must specify either the relative path, such as #include , or the absolute path, like INCLUDE c:\masm615\include\lib32.inc, to avoid errors during compilation. Error code 7 in MPASMWIN indicates a specific issue that can be resolved by ensuring the correct file paths and syntax are used. The MPLAB IDE contains template files that can assist in understanding the correct structure and usage.

PREREQUISITES
  • Familiarity with assembly language programming
  • Understanding of the PIC16F84A microcontroller architecture
  • Knowledge of MPLAB IDE and its directory structure
  • Experience with Microsoft Macro Assembler (MASM) syntax
NEXT STEPS
  • Research the MPLAB IDE Help section for a comprehensive list of assembler error codes
  • Explore the use of template files in MPLAB for assembly programming
  • Learn about the structure and syntax of assembly language for PIC microcontrollers
  • Investigate the differences between relative and absolute file paths in assembly includes
USEFUL FOR

This discussion is beneficial for embedded systems developers, assembly language programmers, and anyone working with PIC microcontrollers who seeks to resolve compilation issues in their projects.

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
2K
  • · Replies 29 ·
Replies
29
Views
3K
Replies
4
Views
5K
Replies
6
Views
3K
Replies
14
Views
3K
  • · 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