assembly help
fky
Posts: 15
Hi,
Help, can anyone explain the two line of assembly code in the mouse.spin.
receive test _cpin,#$20 wc 'wait indefinitely for initial clock low
waitpne cmask,cmask
_cpin is 24 or 25 , as I see it test _cpin,#$20 is alway not zero nor no c, so what the purpose?
I can see the purpose of the waitpne.
Thanks
Help, can anyone explain the two line of assembly code in the mouse.spin.
receive test _cpin,#$20 wc 'wait indefinitely for initial clock low
waitpne cmask,cmask
_cpin is 24 or 25 , as I see it test _cpin,#$20 is alway not zero nor no c, so what the purpose?
I can see the purpose of the waitpne.
Thanks
Comments
The waitpxx instructions wait on portA or portB based on the state of the carry flag on entry. My guess is the test is to determine if the pin number is 0-31 or 32-. As the propeller I is never likely to have more than 32 io pins then it's probably redundant these days.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
lt's not particularly silly, is it?