Boolean instructions with an immediate as operant take 7 T-states.
So in some cases (when working with a) you could save 1 T-state.
Code: Select all
bit n,a
Code: Select all
and %[7-n zero's]1[n zero's]
jp pe,BitReset
;when you're here the bit is Set
Code: Select all
res n,a
Code: Select all
and %[7-n one's]0[n one's]
Code: Select all
set n,a
Code: Select all
or %[7-n zero's]1[n one's]
Code: Select all
cbit n,a
Code: Select all
xor %[7-n zero's]1[n one's]
although most of us probably already knew this, I just thought I'd bring it up, so that those who didn't know it yet would not waste 1 T-state.