;	WinSTon

;	NOT Dn
;	NOT <ea>

;	XNZVC
;	-**00

PUBLIC _not_dn_byte
PUBLIC _not_dn_word
PUBLIC _not_dn_long
PUBLIC _not_ea_byte
PUBLIC _not_ea_word
PUBLIC _not_ea_long

;-----------------------------------------------------------------------
;NOT.B Dn
_not_dn_byte PROC NEAR
	mov		edx,DECODE_1[ecx]						;DReg
	xor		al,al									;Clear NZVC(ignore X)
	not		BYTE PTR [edx]
	or		BYTE PTR [edx],0						;Set condition codes
	SET_NZ
_not_dn_byte ENDP

;NOT.W Dn
_not_dn_word PROC NEAR
	mov		edx,DECODE_1[ecx]						;DReg
	xor		al,al									;Clear NZVC(ignore X)
	not		WORD PTR [edx]
	or		WORD PTR [edx],0						;Set condition codes
	SET_NZ
_not_dn_word ENDP

;NOT.L Dn
_not_dn_long PROC NEAR
	mov		edx,DECODE_1[ecx]						;DReg
	xor		al,al									;Clear NZVC(ignore X)
	not		DWORD PTR [edx]
	or		DWORD PTR [edx],0						;Set condition codes
	SET_NZ
_not_dn_long ENDP

;-----------------------------------------------------------------------
;NOT.B <ea>
_not_ea_byte PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	not		bl
	or		bl,bl									;Set condition codes
	WRITE_BYTE_NZ
_not_ea_byte ENDP

;NOT.W <ea>
_not_ea_word PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	not		bx
	or		bx,bx									;Set condition codes
	WRITE_WORD_NZ
_not_ea_word ENDP

;NOT.L <ea>
_not_ea_long PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	not		ebx
	or		ebx,ebx									;Set condition codes
	WRITE_LONG_NZ
_not_ea_long ENDP
