PDA

View Full Version : List of instructions used in PBP ?



AndrewC
- 1st November 2007, 19:54
This seems like a silly request but where can I find a list of all instructions I can use inside PBP ? Yes, I've read the manual and it seems quite clear about instructions unique to PBP but what about lines like:

xxx = (PORTB >> 4)

I know what this does (reads the top 4 bits of the PORTB, I think !) but are commands like this documented anywhere ? Is there a good reference book ?

Thanks,

Andrew

paul borgmeier
- 2nd November 2007, 00:17
Believe it or not, but you can find what you are looking for in the PBP manual. Check out Sections 4.17 and 5. http://www.melabs.com/downloads/pbpm304.pdf

For example, in Section 4.17.3 SHIFT


B0 = B0 << 3 ‘ Shifts B0 left 3 places
(same as multiply by 8)

W1 = W0 >> 1 ‘ Shifts W0 right 1 position
and places result in W1 (same
as divide by 2)

AndrewC
- 2nd November 2007, 11:22
Thanks Paul - I was looking in the wrong place :(
I think that one of the strengths / challenges of working on PICs with PBP is that you can work directly on registers and do things like this. Trouble is that you've got to remember that you can do it in the first place !

Andrew