Shop OBEX P1 Docs P2 Docs Learn Events
pbasic problem — Parallax Forums

pbasic problem

hirenhiren Posts: 1
edited 2007-10-20 22:04 in General Discussion
hi friends. i was using pbasic software nw i need to convert pbasic programm to mplab asssembly language prog so hoe can i do??

Comments

  • pwillardpwillard Posts: 321
    edited 2007-10-20 21:26
    I hate to say this... but you will probably have to do it the hard way. You need to translate the *logic* of your program from BASIC to Assembler. This is a non trivial task and requires that you understand PIC Assembler in addition to STAMP BASIC. One of the many reasons the Stamp exists is due to the fact that Assembler coding a PIC has a learning curve associated that is much steeper than STAMP BASIC.

    I don't know of a magic tool that will write PIC Assembler for you if it is given STAMP BASIC code. It's more like you need to know enough about Assembler yourself or someone needs to volunteer to write it for you... Sorry, I not a volunteer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔

    There's nothing like a new idea and a warm soldering iron.
  • Harrison.Harrison. Posts: 484
    edited 2007-10-20 21:37
    There are actually a couple of pic basic compilers that have partial backwards compatibility with PBasic and should be able to compile your code with minor modifications. Beware that the assembly source output by these compilers are generally really messy (although there is a certain compiler that claims to output human readable assembly).

    A quick search on google should give you the names of these compilers. They generally cost in the 100 - 400 dollar range.

    Harrison
  • Mike GreenMike Green Posts: 23,101
    edited 2007-10-20 22:04
    I've used PIC Basic from melabs (www.melabs.com/products/pbc.htm) for a project that needed to fit in an 8-pin PIC. It mostly worked, but I ended up rewriting the program from scratch in assembly language for efficiency and expandability. The compiled assembly code was of very little use.
Sign In or Register to comment.