Page 1 of 1

Stupid question about text printing

Posted: Wed Sep 10, 2003 7:33 am
by mastermesh
OK, i've figured out how to write text using function 0Eh of interrupt 10h. But how do i write coloured text? I know there's something like an attribute byte, but how do I set it?

Re:Stupid question about text printing

Posted: Wed Sep 10, 2003 7:48 am
by Pype.Clicker
i guess you should use int 10h, function 09h instead... it has the opportunity of selecting the attribute byte (foreground_color+backgroundcolor*16, on most VGA text modes).

However, if you plan to use this to display text strings, you'll not have a fast output *at all*. Consider using int 10h, function 13h instead.

Re:Stupid question about text printing

Posted: Wed Sep 10, 2003 7:48 am
by Solar
Thread "Quick Links", Posting #3 "BIOS and POST variables list", Interrupts, Int 10h, Int 10h 0eh leads you to http://www.clipx.net/ng/bios/ng10576.php.

Re:Stupid question about text printing

Posted: Wed Sep 10, 2003 7:52 am
by mastermesh
Thanks :D

Re:Stupid question about text printing

Posted: Sat Sep 13, 2003 12:15 pm
by one
I think you have to set the BH register with the color attribute.