	.Z80
	CSEG
	
RAMPAG:	EQU	078H		;IO ADDRESS OF RAM PAGE LATCH
ROMPAG:	EQU	07CH		;IO ADDRESS OF ROM PAGE LATCH
STROUT:	EQU	0310CH
HIGMEM:	EQU	08000H

	ORG	0100H
	JP	PROG

	ORG	HIGMEM
PROG:	CALL	ROMIN
	LD	HL,STR
	CALL	STROUT
	CALL	ROMOUT
	JP	0	
ROMIN:	PUSH	AF
	XOR	A
ROMIN1:	OUT	(ROMPAG),A
	POP	AF
	RET
ROMOUT:	PUSH	AF
	LD	A,080H
	JR	ROMIN1
	
STR:	DEFB	"STRING TEST", 0DH, 0AH, 0FFH
	
	END
