;
;	Program for modifying addresses 
;
RST1:	XTHL		;Save H,L and get next PC
	DCX	H	;Change RST 1 to NOP.
	MVI	M,00H
	INX	H
	INX	H
	PUSH	D	;Save D,E.
	MOV	E,M	;Get relative addr. in D, E.
	INX	H
	MOV	D,M
	PUSH	PSW	;Save condition codes.
	XCHG		;Add offset for abs. addr.
	DAD	D
	XCHG
	DCX	D	;Set to beginning of instr
	DCX	D
	MOV	M,D	;Store absolute addr.
	DCX	H
	MOV	M,E
	POP	PSW	;Restore condition codes.
	POP	D	;Restore D,E.
	DCX	H	;Set H,L to start of instr
	XTHL		;Restore H,L
	RET		;Execute.

	END

