Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.PCS 1/10/84; site ahuta.UUCP
Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxj!houxm!ahuta!dmt
From: dmt@ahuta.UUCP (d.tutelman)
Newsgroups: net.micro.pc
Subject: Re: Elementry "C" question for the PC
Message-ID: <353@ahuta.UUCP>
Date: Fri, 11-Jan-85 07:39:12 EST
Article-I.D.: ahuta.353
Posted: Fri Jan 11 07:39:12 1985
Date-Received: Sat, 12-Jan-85 05:39:12 EST
References: <1050003@acf4.UUCP>
Organization: AT&T Information Systems Labs, Holmdel NJ
Lines: 26

CC:         dmt
REFERENCES:  <1050003@acf4.UUCP>

The question of how to clear the screen from "C" programs is
very dependent on the particular C you're using.  However, a
good way to do it in general is to exercise the BIOS call that
sets the screen mode. Here's how.

Using whatever your C uses to generate a program interrupt,
call interrupt 10H, setting AH to 0 (Set Mode) and AL to whatever
mode you want to be in after the ClearScreen (the mode for
standard monochrome alphanumerics is 7).

ALTERNATIVE:
A less portable way, but maybe easier from your program, is to
zero the display memory.  Both the Alpha and Graphics displays
are memory mapped to locations between B0000 and BFFFF hex.
If you're only using one screen anyway (no background or hidden
screens) and don't care about performance, zero the whole 64K.
Otherwise, check the Tech Ref to see where in RAM your display
is and zero it. (The latter is hardware dependent; it may not work
from one manufacturer's display board to another, or from the
monochrome to color board.)

Happy hacking!
				Dave Tutelman