Page 1 of 1

BIOS write char function in graphics mode

Posted: Tue Oct 15, 2013 2:33 pm
by suslik
BIOS int 0x10 ah=0xa (print char in cursor position in teletype mode) can be used also in graphics mode.
In: AL=char, BH=page(only in text mode), BL=char color(only in graphics mode). I tried it in VGA 320x200x8 mode and it prints on black background. How can I change background color? I tried to pass bgcolor in BH (somewhere I saw this variant) - the same black. I tried to use ah=0xb bh=0x00 bl=bgcolor - the same black. Any other variants? I can steal font from VGA memory before I switch to graphics mode and do it by hand, but may be this can be solved easier? And what about transparent bgcolor? :)

Re: BIOS write char function in graphics mode

Posted: Tue Oct 15, 2013 2:41 pm
by AndrewBuckley
Wikipedia article says AH 0xa has no colour attribute. AH 0x9 is the same save for the BL being colour.
http://en.wikipedia.org/wiki/INT_10H

Re: BIOS write char function in graphics mode

Posted: Tue Oct 15, 2013 2:52 pm
by suslik
It's my misprint: int 0x10 ah=0xe - write char in teletype mode and int 0x10 ah=0x9 - write char. Ralf Int List says about foreground color in BL but what about background? P.S: I hate Ralf Int List - there are too many notes about concrete PC model.

Re: BIOS write char function in graphics mode

Posted: Wed Oct 16, 2013 4:24 pm
by Octocontrabass
Wikipedia only lists functions that are supported by the IBM 5150 BIOS. Mode 0x13 was added with IBM's VGA, and printing text with a background color in mode 0x13 may have come later.

On the three machines I tried both AH=0x09 and AH=0x0A used BH as the background color. What are you using that doesn't support this extension?

Re: BIOS write char function in graphics mode

Posted: Fri Oct 18, 2013 10:47 am
by suslik
Bochs 2.4.6 :shock: