;   Default User Routines for ZLD and ZLDX, v1.1

;
; The first 256 bytes of ZLD and ZLDX is available for these
;  routines.
;

	MACLIB	ZEXCP

	ORG	TPA+3
	JMP	STSEGT
	JMP	SETPRG
	JMP	SETDAT
	JMP	LOAD

STSEGT:
	; Enter your hardware dependent code here to
	;  set the memory segment number to the 7-bit
	;  value in register "C" for subsequent calls to LOAD.
	RET

SETPRG:
	; Enter code here to cause all further calls to LOAD to
	; be directed to the Program memory space.

	RET

SETDAT:
	; This routine is used to direct memory loads to the Data
	;  area of memory.

	RET

LOAD:
	; This routine is responsible for "loading" one byte of
	;  information (given in reg "C") to the memory offset
	;  given in reg "DE".
	; This version loads into the host computer memory space.

	MOV	A,C
	STAX	D
	RET

	IF	($-TPA) > 256
	ERROR	'User routines too big!'
	ENDIF

	END
