Changing position of program code


Closed Thread
Results 1 to 18 of 18

Hybrid View

  1. #1
    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

  2. #2
    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.

  3. #3


    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.

  4. #4
    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 " !!!
    *****************************************

  5. #5
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Acetronics
    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

    Now that's different...I've always put my sub's at the beginning of the program and jumped over them and haven't had a problem. Huh... even more unsatisfying isn't it?
    JDG

  6. #6
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    On older version of PBP there was an issue with the placement of sub's. I think it was prior to 2.32. After that there was no limit as to where one can put his sub's. BUT, I found that rearranging the subs, there was a great improvment on the final code size.

    I suppose this is explained considering the boundary limits and the asm commands used by the compiler.

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    So in this case, where do we put the subs then?

    Based on what criteria do we arrange the subs?


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

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