Hi,
From what I understand from the documentation of the SHFT instruction, it does nothing (except updating the Z flag) if the data field is all zeroes or ones : data field unchanged, selected register unchanged; is this correct?
So, if one wants to mirror an input pin on an output pin, 4 instructions are needed:
- one SHFT to get the level of the input, with data field neither all zeroes or ones
- one MOV32 to set the data field of the shift out instruction (4)
- one MOV32 to set the data field of the shift in instruction (1) so that it never becomes all zeroes or ones
- one SHFT to set the output
Or did I miss something and there is a simpler way to achieve the same result?
BTW, the description of SHFT [SPNU499B, chapter 20] could be improved : the execution description lists actions after an if/else that contains jumps in both branches, which would mean that these action are never performed.
Thanks and Best Regards,
Daniel Marmier