;	WinSTon

;	CMPA <ea>,An

;	XNZVC
;	-****

PUBLIC _cmpa_ea_an_word
PUBLIC _cmpa_ea_an_long

;-----------------------------------------------------------------------
;CMPA.W <ea>,An
_cmpa_ea_an_word PROC NEAR
	EFFADDR_READ									;Read <ea>
	movsx	ebx,bx									;Sign extend
	mov		edx,DECODE_2[ecx]						;AReg
	cmp		[edx],ebx								;Compare, set condition codes
	SET_NZVC
_cmpa_ea_an_word ENDP

;CMPA.L <ea>,An
_cmpa_ea_an_long PROC NEAR
	EFFADDR_READ									;Read <ea>
	mov		edx,DECODE_2[ecx]						;AReg
	cmp		[edx],ebx								;Compare, set condition codes
	SET_NZVC
_cmpa_ea_an_long ENDP
