	title	Module from library BASE_1 : FTCHOP
	name	('FTCHOP')
	maclib	baselib.lib

; Fetch operands following utility call immidiately

; Copyright (C)	Werner Cirsovius
;		Hohe Weide 44
;		D-20253 Hamburg
;		Tel.: +49-40-4223247

;		Version 1.1 May 1987

; ENTRY	HL holds address which will be entered after
;	execution of this utility.
;	Stack holds PC pointing to word operands, so don't
;	call this utility, jump to it with proper set HL

; EXIT	DE holds first operand, usually the destination
;	HL holds second operand, usually the source
;	Top word on stack incremented by four

	entry	@ftcop

@ftcop:
	ex	(sp),hl		; Get PC
	ld	e,(hl)		; Fetch operand 1
	inc	hl		; It's the destination
	ld	d,(hl)
	inc	hl
	ld	c,(hl)		; Fetch operand 2
	inc	hl		; It's the source
	ld	b,(hl)
	inc	hl
	ex	(sp),hl		; Bring back fixed PC
	push	hl
	ld	h,b		; And copy source
	ld	l,c
	ret

	end

