;	WinSTon

;	TST	Dn
;	TST	<ea>

;	XNZVC
;	-**00

PUBLIC _tst_dn_byte
PUBLIC _tst_dn_word
PUBLIC _tst_dn_long
PUBLIC _tst_ea_byte
PUBLIC _tst_ea_word
PUBLIC _tst_ea_long

;-----------------------------------------------------------------------
;TST.B Dn
_tst_dn_byte PROC NEAR
	mov		edx,DECODE_1[ecx]						;<ea>
	mov		bl,[edx]
	xor		al,al									;Clear NZVC(ignore X)
	or		bl,bl									;Set ccodes
	SET_NZ
_tst_dn_byte ENDP

;TST.W Dn
_tst_dn_word PROC NEAR
	mov		edx,DECODE_1[ecx]						;<ea>
	mov		bx,[edx]
	xor		al,al									;Clear NZVC(ignore X)
	or		bx,bx									;Set ccodes
	SET_NZ
_tst_dn_word ENDP

;TST.L Dn
_tst_dn_long PROC NEAR
	mov		edx,DECODE_1[ecx]						;<ea>
	mov		ebx,[edx]
	xor		al,al									;Clear NZVC(ignore X)
	or		ebx,ebx									;Set ccodes
	SET_NZ
_tst_dn_long ENDP

;-----------------------------------------------------------------------
;TST.B <ea>
_tst_ea_byte PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	or		bl,bl									;Set ccodes
	SET_NZ
_tst_ea_byte ENDP

;TST.W <ea>
_tst_ea_word PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	or		bx,bx									;Set ccodes
	SET_NZ
_tst_ea_word ENDP

;TST.L <ea>
_tst_ea_long PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	or		ebx,ebx									;Set ccodes
	SET_NZ
_tst_ea_long ENDP
