Move seperate bytes into a word


Closed Thread
Results 1 to 19 of 19

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default

    Thanks Darrel. But if the macro had to change the page, how will it restore backe the original page? It isn't called again. Is this done automatically?

    Ioannis

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


    Did you find this post helpful? Yes | No

    Default

    PBP will handle it for you on the next PBP command.
    Steve

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

  3. #3
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,134


    Did you find this post helpful? Yes | No

    Default

    Oh, I see. OK, Thanks Steve.

    Ioannis

  4. #4
    Join Date
    Jul 2003
    Location
    Colorado Springs
    Posts
    4,959


    Did you find this post helpful? Yes | No

    Default

    There is another macro that resets it to bank0 ...
    Code:
        RST?RP   ' Reset to Bank0
    The ASM statement uses that macro to set the bank to 0.
    So when you enter an ASM block, you always know you're starting off in bank0.

    The ENDASM does not reset to bank0, but as long as you use PBP's banking system and don't change it manually, then after you exit the ASM block, PBP knows what bank you changed to, and will be able to continue on.

    If you do GOTO's or BRA's in the ASM block, you have to be more careful, because PBP's banking system can't follow the jumps. It's up to you to make sure the banks are correct before jumping.

    If the banks are changed manually without PBP's assistance, then you have to reset the bank manually before exiting the ASM block.
    Code:
        banksel 0
    PREVBANK = 0
    ENDASM
    hth,
    DT

Similar Threads

  1. Bits, Bytes Words and Arrays
    By Melanie in forum FAQ - Frequently Asked Questions
    Replies: 24
    Last Post: - 14th June 2016, 07:55
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 01:51
  3. Minimizing code space
    By Tobias in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 30th May 2009, 07:25
  4. DS2760 Thermocouple Kit from Parallax in PicBasicPro
    By seanharmon in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 8th July 2008, 23:19
  5. calculation problem
    By nicolelawsc in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 31st March 2006, 15: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