PBP array in ASM statements


Closed Thread
Results 1 to 20 of 20

Hybrid View

  1. #1
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: PBP array in ASM statements

    I know that I can't use any PBP stuff that uses system variables. In myint I'm only using PBP If's and basic math function...
    Now I'm back to Define INTHAND. And I added BSR = 0 after @myint
    I didn't know how pbp handle banks. Thank you for your notification
    Is there need to return to the bank where he was?
    eg:
    Code:
    @myint
    BSR_Save=BSR
    BSR=0
    ISR routine
    BSR=BSR_Save

  2. #2
    Join Date
    Aug 2010
    Location
    Maryland, USA
    Posts
    869


    Did you find this post helpful? Yes | No

    Default Re: PBP array in ASM statements

    If you are using 1 of the cool autocontex saving chips (interrupt section of the datasheet) BSR should be one of the registers saved and restored. If not, add it in to where you save w, status, and pcl. Then restore it with them.
    -Bert

    The glass is not half full or half empty, Its twice as big as needed for the job!

    http://foamcasualty.com/ - Warbird R/C scratch building with foam!

  3. #3
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: PBP array in ASM statements

    From datasheet:
    During interrupts, the return PC address is saved on
    the stack. Additionally, the WREG, STATUS and BSR
    registers are saved on the fast return stack.
    I have not thought before I asked that... Sorry...
    But I still can not find what causes problemon CLRF and INCF

  4. #4
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: PBP array in ASM statements

    Ok...
    Let say that PomBroj is WORD not byte
    And i figure out reading .asm file... I need glasses!
    Thanks everybody.

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