Create a label which point to an instruction


Closed Thread
Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,653


    Did you find this post helpful? Yes | No

    Default Re: Create a label which point to an instruction

    Quote Originally Posted by med2007 View Post
    How do I create a short cut to an instruction in PBP such as

    H9 means or points to instruction like HIGH PORTB.0 ?

    So instead of writing HIGH PORTB.0: PAUSE 10 : LOW PORTB.0

    I can write H9: PAUSE 10: H9 ??

    Cheers
    Michael
    your idea is somewhat complicated ... till PBP already does it !!!

    PULSOUT PortB.0, 100 ' 100 @ 4Mhz or 500 @ 20Mhz
    or
    H9 var PORTB.0 ' in the header
    ...
    PULSOUT H9,100 ' 100 @ 4Mhz or 500 @ 20Mhz


    soo simple, when opening the Holy manual

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  2. #2
    Join Date
    Jan 2008
    Location
    lincoln uk
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Create a label which point to an instruction

    Thanks for the insight, however I want to say...
    H9 : pause 10 ...... not HIGH H9 pause 10 .... and achieve same result
    I want H9 to mean HIGH PORTB.0
    I am old and frail and need help.
    Michael

  3. #3
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,172


    Did you find this post helpful? Yes | No

    Default Re: Create a label which point to an instruction

    I'm curious why the GOSUB command does not suit your needs.

    Do you want to substitute just that one command? If so, you are creating a lot of overhead for something really small.

    If it's because you want to keep things extra simple in your code, what about clear comments? My memory is no longer what it used to be so I include a LOT of comments in my code. Comments do nothing to your program; they take no space and do not affect performance.

    Robert

  4. #4
    Join Date
    Jan 2008
    Location
    lincoln uk
    Posts
    20


    Did you find this post helpful? Yes | No

    Default Re: Create a label which point to an instruction

    I am frail, old and grey and have lost my book.

    Here it is again; I think I have not formed the question correctly.

    I want to convert:

    main:
    HIGH PORTB.0 : PAUSE 10 : LOW PORTB.0 : PAUSE 10
    GOTO main

    to

    main:
    H9 : PAUSE 10 : LOW H9 : PAUSE 10
    GOTO main

    ?? Can I precede the code with H9 VAR HIGH PORTB.0 ??

    Michael
    I am frail, old and grey and have lost my book.
    It has temporarily disappeared into a QBH, Quantum Black Hole, which I find abound in my locality.

Similar Threads

  1. Replies: 5
    Last Post: - 12th September 2011, 09:51
  2. I wish to create an article for the WIKI
    By Normnet in forum Forum Requests
    Replies: 2
    Last Post: - 5th January 2011, 05:12
  3. How do you create a lookup table?
    By AlexanderWinnig in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 12th November 2010, 15:37
  4. pic16f88, xbee's & point-2-point comms
    By rdxbam in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 2nd February 2009, 09:43
  5. How to create multidimensional Array
    By jiunn82 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 5th February 2007, 19:23

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