If you have first 8 bits in RAM1 as flags and condition for bit1 through bit4 are 1, then bit5 to bit8 are all zero, then act_one
you can simply calculate the above condition is 15D, so that
TSTEQ RAM10 15
callsub ACT_ONE
Or you can use byte2 to store a state, if ALLINS or ALLOUTS match that stored state byte, take an action.
WC8 has limited memory, this way, it will speed up processing and use the space more efficient.