Assembly Language + PBP


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2005
    Location
    Campbell, CA
    Posts
    1,107

    Default Assembly Language + PBP

    I have been stumped for the longest time trying to figure out how to transfer variables between PBP and assembly.
    After looking at a bunch of examples, it appears that when I'm in an assembly language routine, all I have to do is put an underscore in front of a PBP variable name and I can transfer the contents of that variable between assembly and PBP.

    Will this always work? Do I have to worry about banks?
    I only use 18F parts.
    Charles Linquist

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


    Did you find this post helpful? Yes | No

    Default

    Will this always work?
    Yes. The underscore is all you need, but you can also declare a variable as SYSTEM, and then you don't need the underscore. Just don't get too carried away doing this. All PBP variables need to fit into bank 0 on 14-bit core or bank A on 16-bit core.

    Do I have to worry about banks?
    Yes.

    I only use 18F parts.
    Bad news is, (unless all your variables fit into access RAM) you still need to fiddle with bank switching when using assembler. Good news is, you don't need to worry about program memory page nonsense or bank switching for SRF access with 18F parts.
    Regards,

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

  3. #3
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Wink

    Hi, Charles

    A happy new year for yours.

    Have a look to page 179 of the 3.04 Manual ... written in full letters !!!

    Alain
    ************************************************** ***********************
    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 " !!!
    *****************************************

Similar Threads

  1. Assembly Language inside PBP
    By Bill Legge in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 12th October 2009, 22:52
  2. Replies: 2
    Last Post: - 8th February 2009, 06:10
  3. Assembly Language Conflict
    By NO2K in forum General
    Replies: 2
    Last Post: - 24th July 2007, 01:42
  4. Passing arrays PBP <-> Assembly
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 16th April 2006, 02:01
  5. Replies: 2
    Last Post: - 8th August 2004, 17:00

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