Use of INCLUDE


Closed Thread
Results 1 to 9 of 9

Thread: Use of INCLUDE

Hybrid View

  1. #1
    Join Date
    Dec 2009
    Location
    Canada
    Posts
    68


    Did you find this post helpful? Yes | No

    Default Re: Use of INCLUDE

    Yes, of course this is all possible.

    I was just wondering if it is possible to do one simple include in the place where I want to see the code of my library in memory and use the functions without doing any definitions of the variables and the answer is that you may have convenience of use or control of there the code is placed in memory or convenience of pasting library code in a form of one piece "include" but not both if you want to use variables before the "include".

    In most cases this is not a big deal - just put all includes on the top, unless you want your main cycle and interrupts work as fast as possible, then you start moving seldom used code down, play with clearwdt and so on and then you have to split includes or just copy pieces of it's content in two separate places.

    Again, this is not a big deal, only a matter of some convenience of having own library functions

  2. #2
    Join Date
    Aug 2003
    Posts
    985


    Did you find this post helpful? Yes | No

    Default Re: Use of INCLUDE

    My guess is the included source is going where it wants, and you have no say about it.
    Furthermore, I'll take a stab that the source for individual commands are ordered the same,
    no matter what order your program first calls them.

    Imagine you can push routines such as SERIN, PULSIN, DTMF.. out of the first page or RAM bank
    because you thought your code was more important.
    Now all of a sudden, a bunch of PBP's timed routines have to do bank/page switching
    and you find out it was you that had to accommodate those routines rather than the other way around.

    One trick you can do, is borrow some system variables if you can figure out when they are not being used.
    There are variables used only to transport your PBP vars to it's serial routine for example.
    Any other time your code is not executing a "serious" instruction, those system variables are sitting around doing nothing.

Similar Threads

  1. Where are all the INCLUDE files??
    By Heckler in forum General
    Replies: 3
    Last Post: - 13th September 2011, 08:27
  2. Include File problem
    By lerameur in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 23rd March 2011, 17:44
  3. How to open INCLUDE file
    By SKOLS1 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 26th January 2011, 17:50
  4. can't find include file!
    By jimbostlawrence in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 10th November 2009, 08:44
  5. Need to download Include files
    By laflam_p in forum Off Topic
    Replies: 2
    Last Post: - 2nd September 2009, 13:39

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