Serial code placement


Closed Thread
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Posts
    10

    Default Serial code placement

    Hi,

    It appears that when using HSEROUT or a similar statement that the compiler injects a bunch of code to set up the serial port starting at address 0x0000. Is there any way to configure where this code goes? I'd really like to have this location reserved for my own program.

    FWIW, I'm using a 16f88.

    Thanks,
    Kevin

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

    Default

    While i personnaly don't see any advantages, the question is... WHY?
    Steve

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

  3. #3
    Join Date
    Jan 2007
    Posts
    10

    Default

    As you're probably aware from other recent threads, I'm working on a bootloader. For this, it's helpful to have control over what's going where. With the compiler throwing in code wherever, it's sorta messed with that control. I'm certainly able to cope with it in other ways, it was just an unexpected surprise when I got error messages about conflicts with code locations I had @ ORG'd.

  4. #4
    Join Date
    Jul 2003
    Posts
    2,405

    Default

    If you use DEFINE LOADER_USED 1, it will force PBP to start dropping code
    at 0x04h, but it will always insert a GOTO INIT at 0x00h. The boot-loader
    software normally just re maps this GOTO to a location after its own jump
    vector.

    If you're using LCDOUT or I2C, PBP will also insert CLRF FLAGS just before the
    GOTO INIT, so that's something else to watch out for.
    Regards,

    -Bruce
    tech at rentron.com
    http://www.rentron.com

Similar Threads

  1. xport code, have example, confused though
    By kenpo in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 30th March 2009, 19:59
  2. Loop with two motor and 2 sensors
    By MrRoboto in forum mel PIC BASIC
    Replies: 4
    Last Post: - 8th December 2008, 23:40
  3. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  4. Re-Writing IF-THEN-AND-ENDIF code?
    By jessey in forum mel PIC BASIC Pro
    Replies: 6
    Last Post: - 18th August 2006, 17:23
  5. Timer PIC16F57
    By leonel in forum mel PIC BASIC Pro
    Replies: 25
    Last Post: - 1st July 2005, 08:14

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