Here's a case of where 2 outputs should never be on at the same time.
......
I based this on using 8 bits (0-7 places) which is a sum of 255. The 252 for off is 255 -1 (bit 1) and -2 (bit 2). If you are using 16 bits etc. The highest sum of bits used (1+2+4+8+16+32+...) then subtract the bit you wish to set to 0 and this what you ANDB with to set the var or ram to a zero for the desired bit or bits.
I don't understand why you do this - it wipes out all your effort above, ie, it clears bits 0 and 1 that you just set!ANDB VAR1 252 VAR1
This will ALWAYS set output 2 off (since var1 will always have bit 1 = 0 from above)ANDB VAR1 2 OP2
This no-op isn't required as andb won't skip
This will always set output 1 off (since var1 will always have bit 0 = 0 from above)ANDB VAR1 1 OP1
Output 2 is already off, you can't make it "more" offSet OP2 0
ROSS...If I'm wrong on this, then I hope Russ and CAI slap me and correct me.
[size=5]START
TSTLE T3 370
ORB VAR1 1 VAR1 sets var1 bit 1 to 1 if less than 37
TSTGT T3 370
ANDB VAR1 254 If over 37 set var1 bit1 to 0 to make sure OP1 and OP2 not on at same time
TSTLE T3 390
ORB VAR1 2 VAR1 sets var1 bit 2 to 1 if less than 39
TSTLE T3 370
ANDB VAR1 253 VAR1 sets var1 bit 2 to 0 if less than 37
TSTGT T3 430
ANDB VAR1 252 VAR1 If over 43 clear all bits set in var1
ANDB VAR1 2 OP2 If var1 bit 2 is set to 1 then set OP2 to on
ANDB VAR1 1 OP1 If var1 bit 1 is set to 1 then set OP2 to on
END