I'm having a problem getting the LOCKTRY instruction to work. No matter what I do, I can never get it to return with the carry set, indicating a lock has been acquired.
'test locktry instruction
DAT org 0
i1 drvh #56
locktry #$0 wc
inf jmp #inf
I am running in Pnut, which is compiling the instruction correctly, and downloading to a P2ES board, rev-B cpu, with the onboard pin 56 LED being used to display the carry bit.
The LOCKNEW instruction, however, does work. I can acquire any lock from $0 to $F with no problem. And, when I check out all 16 locks, then try a 17th, it returns with
the carry set, like it's supposed to.
What am I doing wrong?