;	WinSTon

;	RTR

;	XNZVC
;	-----

PUBLIC _rtr

;-----------------------------------------------------------------------
;RTR
_rtr PROC NEAR
	mov		ebp,_Regs[REG_A7*4]						;SP
	MASK_24BIT_ADDR(ebp)							;as 24-bit address in PC memory

	mov		al,BYTE PTR _STRam[ebp+IMM_BYTE]		;CCR
	shl		eax,4									;Store Emulation condition codes

	mov		esi,DWORD PTR _STRam[ebp+SIZE_WORD]		;PC(wrong endian)
	bswap	esi
	mov		[_PC],esi								;Retain top byte of program counter
	MASK_24BIT_ADDR(esi)							;New program counter
	add		esi,STRAM_OFFSET						;As PC address space

	add		DWORD PTR _Regs[REG_A7*4],SIZE_WORD+SIZE_LONG		;SP+=2+4
	FRET
_rtr ENDP
