BIOS write char function in graphics mode

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
suslik
Member
Member
Posts: 45
Joined: Sun May 27, 2012 1:00 am
Location: Russia

BIOS write char function in graphics mode

Post 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? :)
AndrewBuckley
Member
Member
Posts: 95
Joined: Thu Jan 29, 2009 9:13 am

Re: BIOS write char function in graphics mode

Post 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
suslik
Member
Member
Posts: 45
Joined: Sun May 27, 2012 1:00 am
Location: Russia

Re: BIOS write char function in graphics mode

Post 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.
Octocontrabass
Member
Member
Posts: 5604
Joined: Mon Mar 25, 2013 7:01 pm

Re: BIOS write char function in graphics mode

Post 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?
suslik
Member
Member
Posts: 45
Joined: Sun May 27, 2012 1:00 am
Location: Russia

Re: BIOS write char function in graphics mode

Post by suslik »

Bochs 2.4.6 :shock:
Post Reply