logic operators and debugging
Ludis
Posts: 69
New to the forums and the p8x32a. Not exaclty new to programming/micro controllers (intermediate)
I have two questions..
1) Is there a way to debug my propeller code?·say by defining all registers, i/o(s), and seeing the resulting code by stepping through (in the·editor)·line by line? I'm not seeing that in the propeller editor.
2) what exaclty do the >| and |< logic operations perform (if solo)?
Thanks for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I have two questions..
1) Is there a way to debug my propeller code?·say by defining all registers, i/o(s), and seeing the resulting code by stepping through (in the·editor)·line by line? I'm not seeing that in the propeller editor.
2) what exaclty do the >| and |< logic operations perform (if solo)?
Thanks for your help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Comments
It's harder to debug assembly code since there's no way for one cog to directly control another. Generally, I've set up a text display using either video or VGA and written routines to "stuff" debug information into specific locations in the text buffer. There's also a Propeller simulator called GEAR that lets you watch the register contents while a program is running.
2) "|<" is a unary operator that takes a bit number on the right and shifts a one bit left that number of bit positions (to make a bit-mask). The ">|" operator is well described in the Propeller Manual, page 266. Have a look at that. It essentially finds the left-most one bit in a number and returns the bit position of that (plus 1) or zero if no bits are set to one.
I will also consider all the debugging options. I saw Viewport, but wanted to see the alternatives to debugging. GEAR may work! thanks again.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔