;	WinSTon

;	TAS Dn
;	TAS <ea>

;	XNZVC
;	-**00

PUBLIC _tas_dn_byte
PUBLIC _tas_ea_byte

;-----------------------------------------------------------------------
;TAS.B Dn
_tas_dn_byte PROC NEAR
	mov		edx,DECODE_1[ecx]						;DReg
	xor		al,al									;Clear NZVC(ignore X)
	mov		ebx,[edx]
	bts		bx,7									;Set bit 7, NOTE the Tasm manual is WRONG! NZ also get set!
	test	BYTE PTR [edx],0ffh						;Test (before)
	mov		BYTE PTR [edx],bl						;Store back
	SET_NZ
_tas_dn_byte ENDP

;-----------------------------------------------------------------------
;TAS.B <ea>
_tas_ea_byte PROC NEAR
	EFFADDR_READ									;Read <ea>
	mov		dl,bl									;Copy for test
	xor		al,al									;Clear NZVC(ignore X)
	bts		bx,7									;Set bit 7, NOTE the Tasm manual is WRONG! NZ also get set!
	test	dl,0ffh									;Test (before)
	WRITE_BYTE_NZ
_tas_ea_byte ENDP
