Shop Learn
Test and jump if multiple conditions true in one instruction: TJF / TJZ — Parallax Forums

Test and jump if multiple conditions true in one instruction: TJF / TJZ

TonyB_TonyB_ Posts: 1,624
edited 2020-11-27 10:57 in Propeller 2
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 true
The 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.
Sign In or Register to comment.