; PROGRAM:	ZTEST.Z80
; AUTHOR:	Jay Sage
; DATE:		June 16, 1991

; This is a program to test the technique of including
; an internal ENV and TCAP.

; ---------- External References

	maclib		cpmenv.lib

	.request	vlib,syslib0

	extrn		z3vinit,cls,at		; VLIB routines
	extrn		vprint

; ---------- Standard Z-System program header

; To make the code work transparently with CP/M, the header
; is initialized to point to the internal ENV.  When the
; program is run under ZCPR33 or later, the address of the
; external Z-System ENV will be poked into the code by the
; command processor at run time.

	jp	start

;	db	'Z3ENV'		; Signature
	db	'XCP/M'
	db	1		; ENV type
envptr::
	dw	intenv		; Pointer to ENV

; Material for use with ZCNFG can be included here.  It is
; probably possible to have

; ---------- Internal ENV and TCAP placed here

intenv:
	cpmenv

; ---------- Actual Program Code

start:
	ld	hl,(envptr)	; Initialize
	call	z3vinit

	call	cls
	call	at
	db	10,10
	call	vprint
	db	'This is '
	db	1,'REVERSE',2
	db	' video!'
	db	0
	call	at
	db	22,1

	ret

	end
                       