;	WinSTon

;	OR <ea>,Dn
;	OR Dn,<ea>

;	XNZVC
;	-**00

PUBLIC _or_ea_dn_byte
PUBLIC _or_ea_dn_word
PUBLIC _or_ea_dn_long
PUBLIC _or_dn_ea_byte
PUBLIC _or_dn_ea_word
PUBLIC _or_dn_ea_long

;-----------------------------------------------------------------------
;OR.B <ea>,Dn
_or_ea_dn_byte PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		[edx],bl								;Dest Dn
	SET_NZ
_or_ea_dn_byte ENDP

;OR.W <ea>,Dn
_or_ea_dn_word PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		[edx],bx								;Dest Dn
	SET_NZ
_or_ea_dn_word ENDP

;OR.L <ea>,Dn
_or_ea_dn_long PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		[edx],ebx								;Dest Dn
	SET_NZ
_or_ea_dn_long ENDP

;-----------------------------------------------------------------------
;OR.B Dn,<ea>
_or_dn_ea_byte PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		bl,[edx]								;Src Dn
	WRITE_BYTE_NZ
_or_dn_ea_byte ENDP

;OR.W Dn,<ea>
_or_dn_ea_word PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		bx,[edx]								;Src Dn
	WRITE_WORD_NZ
_or_dn_ea_word ENDP

;OR.L Dn,<ea>
_or_dn_ea_long PROC NEAR
	EFFADDR_READ									;Read <ea>
	xor		al,al									;Clear NZVC(ignore X)
	mov		edx,DECODE_2[ecx]						;DReg
	or		ebx,[edx]								;Src Dn
	WRITE_LONG_NZ
_or_dn_ea_long ENDP
