Rename ANYB?
Seairth
Posts: 2,474
Currently, ANYB is implemented as an OR that does not write to D. What I'm expecting is to see if any of the bits in D are set, based on the mask in S. That would mean AND.
What is the use case for OR?
Edit: Oh wait. That's TEST. Hmm... maybe we just need a better name for ANYB....
What is the use case for OR?
Edit: Oh wait. That's TEST. Hmm... maybe we just need a better name for ANYB....
Comments
If TESTOR, perhaps TEST could become TESTAND ?
Or even perhaps ANDNR and ORNR (ie NR=no result)
or ANDTEST and ORTEST ?
Right.
Between S and D, are ANYBits set? Use WZ to find out.
This seems like a niche instruction. Another one that could be freed up for another instruction.
It's a freebie. We've still got open instruction slots.
ozpropdev you can check if two registers are zero with an 'or' instruction p1 code example below.
nice one!
Mike
Jeff
In P1 we can use NR but we don't have that facility in P2.
Yes ANYB is a better alternative, than what I suggested, if it were written for the P2.
My example works on the P1 and you can set the NR flag, it could work on the P2 if you don't care
if the D register gets overwritten.
Jeff
I bet people are really having fun testing P2 code.
The P2 is really going to be special when it is done!!!
Jeff
Right now, OR/ANYB set C to the parity of the result. That's what all the AND/OR/XOR instructions currently do. To have it set C if all highs would mean a 32-input AND gate and mux.
AND's need to set C to parity for things like bit filters and LFSR tests.
OR's might be better setting C to reflect all highs.