#define LESS(first,second,temp,temp2) COPY(second,temp,temp2) \//temp=second;temp2=0; TESTZERO(temp,temp2) \//temp=(temp==0);temp2=0; IF(temp) \//if(temp){ ZERO(first) \// first=0; ENDIF(temp) \//}temp=0; WHILE(second) \//while(second){ COPY(first,temp,temp2) \// temp=first;temp2=0; TESTZERO(temp) \// temp=(temp==0);temp2=0; INC(temp2) \// temp2++; IF(temp) \// if(temp){ DEC(temp2) \// temp2--; SET(first,TRUE) \// first=TRUE; ZERO(second) \// second=0; ENDIF(temp) \// }temp=0; IF(temp2) \// if(temp2){ DEC(first) \// first--; DEC(second) \// second--; COPY(second,temp,temp2) \// temp=second;temp2=0; TESTZERO(temp,temp2) \// temp=(temp==0);temp2=0; IF(temp) \// if(temp){ ZERO(first) \// first=0; ENDIF(temp) \// }temp=0; ENDIF(temp2) \// }temp2=0; ENDWHILE(second) \//}
Look at the PITA it is to simply check if something is LESS than something else!
Of course, if it works, it means I never actually have to do it with the silly BF instructions, I can just use the macro, which means I can perform more useful, higher level work.
"Useful" being a rather questionable term here.