Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!lll-tis!mordor!lll-lcc!unisoft!hoptoad!academ!killer!jack From: jack@killer.UUCP (Jack Hudler) Newsgroups: comp.sys.ibm.pc Subject: Re: EGA Text question (bug?) Message-ID: <1522@killer.UUCP> Date: Sun, 13-Sep-87 00:09:59 EDT Article-I.D.: killer.1522 Posted: Sun Sep 13 00:09:59 1987 Date-Received: Thu, 17-Sep-87 01:44:39 EDT References: <45900073@uxe.cso.uiuc.edu> Organization: The Unix(R) Connection, Dallas, Texas Lines: 27 Summary: Not bug..... feature! :-) In article <45900073@uxe.cso.uiuc.edu>, mcdonald@uxe.cso.uiuc.edu writes: > > I tried today to write characters to an EGA screen today while in mode 16 > (350x640x16 colors graphics) using the bios INT 010H, AH = 9, which is > write attribute/character. This works fine in mode 3 (24x80 text) but > in mode 16 it writes the character correctly, but refuses to do anything > with the color attributes. It writes white on black. Does anyone know if > it can be made to write in an arbitrary color? I have a graphics drawing > routine to do it, but using the BIOS should work ... or should it? > > Doug McDonald > University of Illinois Your right you can't write chars to the EGA in graphics mode using a background color thats why I wrote my own, however you should be able to set the foreground color. What I did was to get the memory address of the font used and set the color mask with my forground color then set the bit mask with the byte that represents one scan line of the char then send that to the screen at the proper address then set the color mask for the background color NOTed the char byte and set the bit mask and wrote it to the same location. You have to calculate the location on the screen and the byte offset of the char in the font table.. all which is very easy. But you will need the EGA tech reference to do it well or at all. Jack Hudler Computer Support Corp.