Changing position of program code


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1

    Default Changing position of program code

    I want to start some code at a page boundary, I cannot see a command in PBPRO to do this, I am using PB2.43, 16f876a, and there does not seem to be anything after using the search in this and the old list. Perhaps I am not putting in the correct words !.

    eg code
    org 1000h
    code

  2. #2
    Join Date
    Sep 2004
    Location
    montreal, canada
    Posts
    6,898


    Did you find this post helpful? Yes | No

    Default

    It's kinda dangerous but you can use

    @ ORG 1000h
    your code here
    Steve

    It's not a bug, it's a random feature.
    There's no problem, only learning opportunities.

  3. #3
    Join Date
    Jan 2006
    Location
    Istanbul
    Posts
    1,185


    Did you find this post helpful? Yes | No

    Default

    Why someone would want to start a code at page boundary?

    May be I need to learn that.

    ---------------------
    "If the Earth were a single state, Istanbul would be its capital." Napoleon Bonaparte

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


    Did you find this post helpful? Yes | No

    Default Yea, why?

    Quote Originally Posted by sayzer
    Why someone would want to start a code at page boundary?

    May be I need to learn that.

    ---------------------
    I gotta parrot sayzer, why is that important? Are you trying to find out what code to leave off in order to use a pic with less space?
    JS.


    Curiousity killed the cat
    Satisfaction brought him back.

  5. #5


    Did you find this post helpful? Yes | No

    Default

    I know about the compiler warnings. I have now re-arranged some code and removed a subroutine, it is now 4.7k and does not have problems.
    Thanks for the comments.

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


    Did you find this post helpful? Yes | No

    Wink You are not dreaming !!!

    Hi, Aerostar

    I've already noted some troubles as you describe ... diseappearing when subs are re-arranged !!!

    Generally when subroutines are placed at the end of the program , not so far from boundary limits ... ( If - Then tests not working i.e. )

    I wrote a thread about that in those columns ... but no definitive answer !!!

    Can't find a satisfying explanation to that ...

    Alain
    Last edited by Acetronics2; - 13th December 2006 at 12:35.
    ************************************************** ***********************
    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 " !!!
    *****************************************

  7. #7


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply, I will try it out tomorrow.

    I am trying to debug some code which appears to fall over around the 1000h boundary, so by making some of the code start after the boundary and not cross it I can then perhaps make a more educated guess as to what I have done wrong.

  8. #8
    Join Date
    Feb 2003
    Posts
    432


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aerostar
    Thanks for the reply, I will try it out tomorrow.

    I am trying to debug some code which appears to fall over around the 1000h boundary, so by making some of the code start after the boundary and not cross it I can then perhaps make a more educated guess as to what I have done wrong.
    Do you have any BRANCH instructions in there ?
    Keith

    www.diyha.co.uk
    www.kat5.tv

  9. #9
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by aerostar
    Thanks for the reply, I will try it out tomorrow.

    I am trying to debug some code which appears to fall over around the 1000h boundary, so by making some of the code start after the boundary and not cross it I can then perhaps make a more educated guess as to what I have done wrong.

    If you're getting the 'cross page boundary' warning, that's all it is... a warning. PBP takes care of business for you.
    Nothing to worry about.
    JDG

Similar Threads

  1. DS1307 and a LED array, need ideas
    By peu in forum mel PIC BASIC Pro
    Replies: 12
    Last Post: - 30th December 2009, 18:45
  2. Problem runing my code
    By Mus.me in forum mel PIC BASIC Pro
    Replies: 33
    Last Post: - 1st December 2009, 20:36
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Code: Why is this code greater than 2000 words?
    By DrDreas in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 1st June 2007, 19:51
  5. Replies: 7
    Last Post: - 25th July 2006, 15:11

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