P2 pin direction instructions do these work??

I am using spin tools ide and get errors. Do these work
Titus Rev 5 06-11-2020 Jon Titus, Page 1 of 62
Pin-Direction Instructions
DIRL {#}D Set direction bit(s) to logic 0 (input)
DIRH {#}D Set direction bit(s) to logic 1 (output)
DIRC {#}D Set direction bit(s) to Carry flag
DIRNC {#}D Set direction bit(s) to inverse of Carry flag
DIRZ {#}D Set direction bit(s) to Zero flag
DIRNZ {#}D Set direction bit(s) to inverse of Zero flag
DIRRND {#}D Set direction bit(s) to random state(s)
DIRNOT {#}D Invert direction bit(s)
Example: DIRL #20 'Set P20 as an input pin
Pin-Output Instructions
OUTL {#}D Set output bit(s) to logic 0
OUTH {#}D Set output bit(s) to logic 1
Thanks.
I am trying to replicate the outa and dira in spin 1
I keep seeing references but can't pin it down.
Thanks
Also in pintoggle can it multiple pins in a pattern something like this: %0101??
Comments
Yes, they work. OUTA/DIRA registers also work the same as they did on Prop1.
All pin ops, including
PINTOGGLE
, operate on a range of pins. You can't have gaps in that range. If you want to have some of those pins set high and some set low and then flip them all at once then yep,PINTOGGLE
will do that.