Adding PBPro code to an ASM file - how to?


Closed Thread
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116

    Default Adding PBPro code to an ASM file - how to?

    Hi Folks,

    I know how to add some asm into my PBPro code but what if I already have a working application (all in assembly) that I want to add some PBPro code to?

    Attached a nice SLA battery charger that I want to change from an F88 to an F876 in order to add serial output and LCD with PBPro.

    I don't know assembly so any pointers or example to do this to the attached would be very welcome. I'm sure others have come across this before so this may be a common problem?

    Kind regards to all,
    Bill
    Attached Files Attached Files

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


    Did you find this post helpful? Yes | No

    Question The K.I.S.S. method ...

    Hi, WJS

    Having had a quick look to this program ...

    1) Best solution is to rewrite it into PBP ... you could be surprised about the length of the PBP source you'll get . Source is well commented ... so, there's no headache to fear !!!

    Easy to say ??? ... I just did translate such a SLA Charger "C" program from a Z8 Encore processor to a 16 F 876 Pic, With PBP ... really a child's game ...

    2) you simply could add some assembler routines ( lots, widely commented, available on the web ...) by " cut and paste " and very slight adjustments.


    Of course you could include most of the existing asm program into a PBP program ... but that will lead you to examine asm listing to cut all what PBP already does ...
    solution 1) will become obvious to you, then ...

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

  3. #3
    Join Date
    Jun 2005
    Location
    West Australia
    Posts
    116


    Did you find this post helpful? Yes | No

    Default KISS is good, but...

    Hi Alain,

    Thanks for your input, always good information from you.

    I will do as you suggest and see what I get but I have quite a few other asm programs I've been storing for future use/ideas which would take a great deal of time and effort to convert to PBP... So I still want to know the answer to the original question - for this reason I attached the smallest of my asm listings so the task would not be too daunting for assistance.

    I agree there is a lot to be learnt from doing what you suggest and examining the result - anything else you can offer will be welcome.

    Kind regards,
    Bill

  4. #4
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    I have never tried it...

    What would happen if you stripped the configs from the ASM file, make a "container" with PBP, set configs as normal. Then insert the ASM file into the PBP "container".

    Kind of like adding a little ASM to a PBP code.
    ???
    Dave
    Always wear safety glasses while programming.

  5. #5
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    I just found this manual today. Looks like there is at least one link to it from the forum, but it is a very useful reference to assembly commands, macro's, etc. It might help in your integration or dissection of assembly code.

    MPASM™ Assembler,
    MPLINK™ Object Linker,
    MPLIB™ Object Librarian
    User’s Guide
    http://ww1.microchip.com/downloads/e...Doc/33014j.pdf

Similar Threads

  1. HARDWARE I2C SAMPLE CODE question
    By Michael Wakileh in forum Code Examples
    Replies: 2
    Last Post: - 16th June 2009, 21:07
  2. Making Program Code Space your playground...
    By Melanie in forum Code Examples
    Replies: 15
    Last Post: - 19th July 2008, 08:26
  3. Code dsigner lite problems
    By toalan in forum Off Topic
    Replies: 2
    Last Post: - 23rd February 2005, 20:08
  4. Strange ASM file
    By barkerben in forum General
    Replies: 2
    Last Post: - 29th November 2004, 18:54
  5. ASM Interrupts with BASIC code?
    By Desterline in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 31st October 2003, 19:21

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