1	INCLUDE	"graphics/grafix.inc"
2
3                SECTION         code_clib
4	PUBLIC	cleargraphics
5   PUBLIC   _cleargraphics
6   PUBLIC   GFX_COUT
7   PUBLIC	LINDSP
8
9	EXTERN	base_graphics
10
11;
12;	$Id: clsgraph.asm,v 1.7 2017-01-02 21:51:24 aralbrec Exp $
13;
14
15; ******************************************************************
16;
17;	Clear graphics	area, i.e. reset all bits in graphics
18;	window (256x64	pixels)
19;
20;	Design & programming by Gunther Strube,	Copyright	(C) InterLogic	1995
21;
22;	Registers	changed after return:
23;		a.bcdehl/ixiy	same
24;		.f....../....	different
25;
26
27.CONOUT		JP 0
28.LINDSP		JP 0
29
30.cleargraphics
31._cleargraphics
32
33	LD	HL,(1)	; Warm BOOT, let's find the direct BIOS position entries to avoid BDOS
34	LD	DE,9
35	ADD	HL,DE
36	LD	(CONOUT+1),HL
37	LD	DE,71H
38	ADD	HL,DE
39	LD	(LINDSP+1),HL
40
41	ld	c,27
42	call GFX_COUT
43	;ld	c,'6'  ; disable graphics
44	ld	c,'\\'  ; clear screen and reset parameters
45	call GFX_COUT
46
47	ld	c,27
48	call GFX_COUT
49	ld	c,'7'  ; enable graphics
50
51GFX_COUT:
52	PUSH	HL
53	PUSH	DE
54	CALL	CONOUT
55	POP	DE
56	POP	HL
57	RET
58
59