Test and jump if multiple conditions true in one instruction: TJF / TJZ
TonyB_
Posts: 2,178
The following uses positive logic and TJF/TJNF, but negative logic and TJZ/TJNZ would also work:
tjf conditions,#all_true 'jump if all true ' _ret_ tjf conditions,#all_true 'return if not all true ' tjnf conditions,#not_all_true 'jump if not all true ' _ret_ tjnf conditions,#not_all_true 'return if all trueThe register conditions consists of N groups of bits, perhaps of different widths. Each group has all bits set only if a certain condition is true. If all N conditions are true then conditions = $FFFF_FFFF.