DEFINE RESET_ORG and DEC modifier issue


Closed Thread
Results 1 to 26 of 26

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    If you don't care too much to optimize, it's not difficult to arrive above 64k. For example I use a lot of Hserout messages just for debug of what the program is doing.
    Really, a PIC18 is much more powerful than what I need

  2. #2
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    From Charles: "I'm afraid this is a limitation of PBP that probably won't be changed. The library routines (assembly language for high-level commands like HSEROUT) were written with the assumption that they would be in memory below 64K. They are the first thing placed after the RESET_ORG address. When I tested a variant of your code, the maximum address that could be safely defined was 0FFE4h. That limit will move down every time you use a new high level command which triggers a library inclusion.
    "

  3. #3
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    it's not difficult to arrive above 64k. For example I use a lot of Hserout messages just for debug of what the program is doing.
    do you realise that hserout messages of a constant str type are the least efficient way to store and retrieve text ?
    ditto for arraywrite
    Warning I'm not a teacher

  4. #4
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    uhm ... how do you send a message to the serial port with ArrayWrite ?

  5. #5
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    arraywrite to a buffer then hserout str buffer
    Warning I'm not a teacher

  6. #6
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    I'll do some test, thank you

  7. #7
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    Quote Originally Posted by richard View Post
    arraywrite to a buffer then hserout str buffer
    These are my result:

    1) simple program with some code and 1 line as below is 7099 bytes
    Code:
    	Hserout2["nel mezzo del cammin di nostra vita",13,10]
    2) same program with 11 line like that is 9319 bytes, so each Hserout2 eat 222 bytes

    3) simple program with some code plus this as below is 7157 bytes
    Code:
    	buf	VAR BYTE[200]
    	arraywrite buf,["nel mezzo del cammin di nostra vita",13,10]
    	gosub send
    
    send:
    	Hserout2[str buf\200]
    	return
    4) same program above but with 11 "arraywrite + send" is 9497 bytes, so each Hserout eat 234 bytes

    Looks like it's not as you say. I did this test with PBP Long option enabled, maybe without the results are different ?

  8. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,644


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    i think you misunderstand neither method is efficient
    two hunted bytes to store a message 32 or so bytes long , not good
    Warning I'm not a teacher

  9. #9
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    84


    Did you find this post helpful? Yes | No

    Default Re: DEFINE RESET_ORG and DEC modifier issue

    Quote Originally Posted by richard View Post
    i think you misunderstand neither method is efficient
    two hunted bytes to store a message 32 or so bytes long , not good
    I agree ... please explain how would you do. Of course debug strings are different and mixed also (fixed test, formatted variables, etc). Not possible to have them flashed in code memory.

Similar Threads

  1. Arrayread and DEC modifier issue
    By Marcick in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 26th January 2021, 07:35
  2. Indexing DEC modifier
    By flotulopex in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th December 2015, 22:12
  3. reset_org with 16f193X ?
    By kik1kou in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 9th October 2011, 08:32
  4. LCDout $FE,2, dec Days - What is dec ?
    By merc07 in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 24th June 2009, 04:03
  5. 12F675: DEC modifier not accepted
    By jswayze in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 1st September 2005, 02:39

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