Originally Posted by Joe S.
- The datasheets. The "Instruction Set" section lists each opcode and what it does.
- The .ASM file generated by PBP
- The .LST file generated by the assembler.
- PBPPIC14.LIB / PBPPIC14.MAC
-or- PBPPIC18.LIB /PBPPIC18.MAC files. (depending on the PIC you are using)
I've looked at other PIC assembler books, and the one thing they all lack, is how to use assembly language with PicBasic Pro.
It's not the same.
I don't think I could even write a working program in straight assembly language. Mostly because I used the same list of items shown above myself, to learn ASM with PBP.
PBP, doesn't really write any ASM. Instead it converts your Basic program into a series of macros that are at a level in-between Basic and assembly language.
If you want to use ASM with PicBasic Pro, then this is the area you need to learn the most.
You can actually work at the macro level, without knowing any of the 35 opcodes that the PIC uses (a few more for 18F's).
Since you already know a lot about PBP, the easiest way will be to just create small programs. (blinky lights, or simple A/D conversions)
Compile the program with PBP then open up the .ASM file that has the same name as your program. There you can see how it converted the Basic language statements into the "Macro" language. Then make small changes to the program, and see how the macro's change.
Once you know what macros are used, you can look them up in the PBP1xPIC.LIB and .MAC files to see the actual Assembly language Opcodes used. When you come up on an opcode that you aren't familiar with, look it up in the datasheet. Since you already know what it's supposed to do (you wrote the PBP program) it makes it much easier to understand how the opcode works. Reading a book doesn't give you that "Edge".
It's also a little like an interactive book.
Instead of getting stuck because the author left something out.
You can just make another test program in PBP to see how it ends up in ASM.
I never did use anything out of those other books.
It just didn't apply to PicBasic Pro.
HTH,
Bookmarks