Open aninclude file


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Default Re: Open aninclude file

    Actually, I like this include so much that all of my codes are using following structure. This way it is very much easier to do improvement or modification to some specific parts and leave working code untouchable.

    Example of master code line:

    Code:
    <code><font color="#000080"><i>'----------------------------------------------
    ' XXX with PIC18F4520 and Nokia 3310 display                                                 
    '----------------------------------------------
    ' Include &amp; Definition section 
    '----------------------------------------------  
    
    '----- Basics ---------------------------------
    </i></font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\Definitions.pbp&quot; 
    </font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\Variables.pbp&quot;
    
    </font><font color="#000080"><i>'----- LCD Selections -------------------------
    </i></font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\LCD_5V.pbp&quot;
    
    </font><font color="#000080"><i>'----- Inits and ADC Definitions --------------
    </i></font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\Inits.pbp&quot;
    </font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\ADCIN.pbp&quot;
    
    </font><b>DEFINE </b>OSC 32 
    
    <font color="#000080"><i>'----------------------------------------------
    ' Main program  
    '----------------------------------------------
    </i></font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\Mainloop.pbp&quot;
    
    </font><font color="#000080"><i>'----- LCD Setups -----------------------------               
    </i></font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\LCD_3310.pbp&quot;             
    </font><b>INCLUDE </b><font color="#FF0000">&quot;..\incl\Display_Refresh_3310.pbp&quot;
    <font color="#000080"><i>'----------------------------------------------</font></code>
    Last edited by Gusse; - 24th March 2011 at 22:01.

  2. #2
    Join Date
    Apr 2008
    Posts
    85


    Did you find this post helpful? Yes | No

    Default Re: Open aninclude file

    hello all,
    thanks for your help.

    i try to add directory of the file, : it still do not open
    include "c:\user\minhle....\hello.asm"

    and even copy the file into directory of PBP (where .inc is ) the compiler show up huge errors.

    note that i do not run INTERRUPT in the program. and the simple program is to open included file only

  3. #3
    Join Date
    Dec 2007
    Location
    Finland
    Posts
    191


    Did you find this post helpful? Yes | No

    Default Re: Open aninclude file

    Remove ASM and ENDASM.

    "The ASM and ENDASM instructions tells PBP that the code between these
    two lines is in assembly language and should not be interpreted as
    PICBASIC PRO statements. You can use these two instructions to mix
    assembly language code with BASIC statements."

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts