Shop OBEX P1 Docs P2 Docs Learn Events
CZ flag standardized order — Parallax Forums

CZ flag standardized order

Chip
The condition definitions show thr following aliases
%0001	if_nc_and_nz	if_nz_and_nc	if_a		if_00
%0100	if_c_and_nz	if_nz_and_c			if_01
%0010	if_nc_and_z	if_z_and_nc			if_10
%1000	if_c_and_z	if_z_and_c			if_11
Using the aliases of IF_00,IF_01,IF_10 and IF_11 assuming the same order as the SETCZ instruction the result is transposed.
		setcz	#%01 wc,wz	'force task1

	if_11	jmp	#task3
	if_10	jmp	#task2		'jumps to task2
	if_01	jmp	#task1
	if_00	jmp	#task0
Just a little "tweak" to Pnut :)

Comments

  • cgraceycgracey Posts: 14,134
    Ah, I will fix that. Thanks.
  • Can you also add aliases "if_xxxx", where each x is either 0 or 1 and corresponds directly to each of the four CCCC bits?

    e.g. "if_0110" is the same as "if_z_ne_c", and "if_1000" is the same as "if_z_and_c"

    The problem with this is that it will probably be easy to get the middle two bits mixed up.
  • cgraceycgracey Posts: 14,134
    edited 2015-10-23 13:07
    Can you also add aliases "if_xxxx", where each x is either 0 or 1 and corresponds directly to each of the four CCCC bits?

    e.g. "if_0110" is the same as "if_z_ne_c", and "if_1000" is the same as "if_z_and_c"

    The problem with this is that it will probably be easy to get the middle two bits mixed up.

    Those should already be in there.

    The CCCC bit interpretations are the same as they were on the P1.
Sign In or Register to comment.