Creating your own .inc files


Results 1 to 5 of 5

Threaded View

  1. #2
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    http://www.picbasic.co.uk/forum/showthread.php?t=2108

    I use includes like this:

    Code:
    'main .pbp code here
    INCLUDE "INC_SUB.INC"
    'define variables for main .pbp
    start:    'place for include file to return to
    
    'etc etc ... all code below
    
    gosub sub_a
    
    gosub sub_b
    Then in INC_SUB.INC
    Code:
    'define variables for INC_SUB.INC (whatever your include file is called)
    goto start    'this jumps back to the beginning of your main .pbp file. 
                  'otherwise it would start to try to run your subroutines at power up
    'all your subroutines below here
    sub_a:
    'a code goes here
    
    return
    
    sub_b:
    'b code goes here
    return
    probably a better way to do it, but it works.
    Last edited by ScaleRobotics; - 26th May 2009 at 17:10.
    http://www.scalerobotics.com

Similar Threads

  1. Compiler not creating .hex files for programmer.
    By Teknikum in forum mel PIC BASIC Pro
    Replies: 11
    Last Post: - 15th May 2009, 10:37
  2. Bootloader files for MicroCode Studio Plus
    By keithdoxey in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th December 2007, 18:54
  3. Missing 16F882 family include files :-(
    By campmdabt in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th December 2007, 01:17
  4. Replies: 2
    Last Post: - 13th December 2005, 00:11
  5. How can I find Code Loader 18F2620 files ?
    By muskut in forum General
    Replies: 1
    Last Post: - 14th October 2005, 12:26

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