;**************************************************************************
;*                                                                        *
;*          VIDEO v1.00 turns video ON or OFF  S.J.Kay 22/04/95           *
;*                                                                        *
;*                       Support utility for CP/M 3                       *
;*                                                                        *
;**************************************************************************

	maclib	TPORTS.LIB
;
	.z80
	aseg
;
	org	0100h
	.phase	0100h
;
	ld	b,0			;video on value
	ld	hl,0080h		;parameter address
	ld	c,(hl)
	inc	hl
chkchr:	ld	a,c			;characters to check
	or	a
	jp	z,video1
	ld	a,(hl)			;get a character
	dec	c
	inc	hl
	cp	' '			;ignore any leading spaces
	jp	z,chkchr
	cp	'O'			;1st character must be 'O'
	jp	nz,video1
	ld	a,(hl)			;2nd character
	cp	'F'			;video off if 2nd char is 'F'
	jp	nz,video1
	dec	b			;video off value
video1:	ld	a,b
	out	(vidset),a		;turn video on/off
	ret
;
	.dephase
	end
