Extensions to PBP variables


Closed Thread
Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2009
    Posts
    36

    Default Extensions to PBP variables

    I am trying to figure out how to use "extensions" to PBP variables...I'm sure that isn't the right name, but what I mean is something like:

    INTCON.INTEDG

    This works in ASM, but gives an error in PBP. If I use:

    INTCON.6

    it works fine.

    I have a PBP program that has an ASM interrupt routine. When I use the first example above it knows what value INTEDG is and works fine. Same program in the PBP section, it gives an error. All these "extensions" are defined in the .SYM file, but the compiler doesn't seem to know about it for PBP code.

    I use the following line config line at the start of the program:

    @ device pic16F627A, INTRC_OSC_NOCLKOUT, wdt_off, pwrt_on, mclr_off, lvp_off, protect_off

    I haven't seen these "extensions" used in any of the sample programs, but I haven't looked at them all.

    Thanks
    John

  2. #2
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by john_mac View Post
    i am trying to figure out how to use "extensions" to pbp variables...i'm sure that isn't the right name, but what i mean is something like:

    Intcon.intedg

    this works in asm, but gives an error in pbp. If i use:

    Intcon.6

    it works fine.

    I have a pbp program that has an asm interrupt routine. When i use the first example above it knows what value intedg is and works fine. Same program in the pbp section, it gives an error. All these "extensions" are defined in the .sym file, but the compiler doesn't seem to know about it for pbp code.

    I use the following line config line at the start of the program:

    @ device pic16f627a, intrc_osc_noclkout, wdt_off, pwrt_on, mclr_off, lvp_off, protect_off

    i haven't seen these "extensions" used in any of the sample programs, but i haven't looked at them all.

    Thanks
    john
    Hi John, something like this ?
    Code:
    INTEDG Var INTCON.6
    INTEDG = 0
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  3. #3
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    All the bit names are defined in the assembler files.
    But PBP would need to know what those value are at "compile time".

    The assembler doesn't execute until after PBP is finished.
    So PBP has no idea what they are.

    Plus CONstants as bit modifiers are not an accepted syntax for PBP.

    Joes example is the best way.
    <br>
    Last edited by Darrel Taylor; - 23rd October 2009 at 02:58. Reason: Joe got me
    DT

  4. #4
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Darrel Taylor View Post
    Joes example is the best way.
    <br>
    He he he . . . guess who I learned it from . . .
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  5. #5
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    M-M-M-M-M-M,

    Melanie
    Mister-e
    Mackrackit
    Melabs
    Manual

    oh, and Me
    <br>
    DT

  6. #6
    Join Date
    Feb 2009
    Posts
    36


    Did you find this post helpful? Yes | No

    Default

    OK got it...many thanks.

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. PBP Extensions
    By PJALM in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th February 2006, 00:42
  4. PBP, Assembly Interupts and variables
    By Chris Barron in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 15th February 2006, 08:09
  5. pbp and signed variables
    By yasser hassani in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 2nd June 2004, 10:07

Members who have read this thread : 1

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