Page 1 of 1
INT 10h, AH=11h
Posted: Mon Sep 29, 2008 7:53 pm
by Troy Martin
I was browsing the wiki, and I found a section on BIOS functions. I came across int 10h having the ability to set the font size if you mov ah,11h.
How do I get this to work? I'd love this to be done in my kernel before setting up pmode.
Thankers,
Troy
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 8:57 pm
by cr2
I might be wrong here, but I dont think there is an int 10h-ah=11h. Please tell me where you found about this supposed "int 10h, ah=11h".
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 9:45 pm
by Troy Martin
Like I said, on the wiki. It's the page
BIOS under the section
Common functions.
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 9:53 pm
by cr2
Wikipedia doesn't think so. I also searched google, nil returned on it.
But, you could see if you could modify the VGA registers to do it.
EDIT: I looked back on the bios page you linked to, and it said set
8x8 font. I think it might be used to set the font to 8x8(
, I might be wrong here...someone must make the wiki more understandable
).
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 9:57 pm
by Troy Martin
Google int 10 ah 11
First link proves it all.
EDIT: Just noticed your edit. Yeah it does stuff to the text mode font, but I'd like to know exactly how I use said functions.
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 9:58 pm
by jzgriffin
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 9:59 pm
by cr2
I'm an idiot at web searching. No wonder why I didn't get a link on it.
But... STFW
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 10:02 pm
by Troy Martin
So what is the format of the table that ES:BP points to exactly in AX=1100h?
And what's the "block number" in AX=1102h? It looks like the function I need.
And... I'm tired, define STFW for me
Re: INT 10h, AH=11h
Posted: Mon Sep 29, 2008 11:53 pm
by Brendan
Hi,
Troy Martin wrote:So what is the format of the table that ES:BP points to exactly in AX=1100h?
ES:BP would point to a table of font data. If there's 10 characters being changed, and 8 bytes per character, then it'd be 80 bytes of data where the first 8 bytes defines the first character, the second 8 byte defines the second character, etc. For each byte, a set bit is opaque while a clear bit is transparent.
Troy Martin wrote:And what's the "block number" in AX=1102h? It looks like the function I need.
For the VGA, display memory is split into 64 KiB "bit planes". In text modes bit plane #2 is used for font data, and this 64 KiB area is split into eight 8 KiB blocks. You can have up to 8 separate fonts (one font per 8 KiB block in bit plane #2) where normally only one font/block is being used/active at a time (it's possible to have a maximum of 2 of the fonts/blocks can be in use/active at the same time). Therefore, I'd assume that for VGA the "block number" is a number from 0 to 7 that selects which font/block you're changing.
Cheers,
Brendan
Re: INT 10h, AH=11h
Posted: Tue Sep 30, 2008 12:19 am
by Brendan
Hi,
cr2 wrote:Wikipedia doesn't think so. I also searched google, nil returned on it.
But, you could see if you could modify the VGA registers to do it.
EDIT: I looked back on the bios page you linked to, and it said set
8x8 font. I think it might be used to set the font to 8x8(
, I might be wrong here...someone must make the wiki more understandable
).
The Wikipedia page is "minimal" at best. The BIOS page in the OSdev wiki is probably intended to be a one page introduction, rather than a several MiB reference. Ralph Brown's Interrupt list is intended to be a several MiB reference, but even that isn't adequately descriptive in a lot of cases.
In this specific case, I used a book called
"Programmer's Guide to the EGA, VGA, and Super VGA Cards" (third edition) written Richard F. Ferraro (ISBN0-201-62490-7); which obviously isn't online anywhere.
Note: IMHO this book is badly written, overly verbose, repetitive and badly organized, but does include information for almost everything related to VGA in it's 1600 pages. The VGA hardware itself is badly designed and badly organized too, so that's probably part of the problem...
@Troy Martin: IMHO most OS developers don't have a good reason to care about text mode fonts, because most OS developers do have a good reason to use graphics mode instead...
Cheers,
Brendan
Re: INT 10h, AH=11h
Posted: Tue Sep 30, 2008 4:57 am
by jal
Heh, the VGA bible :). I have editions two and three at home. It has indeed many faults, but was a must-have in the pre-internet period.
JAL
Re: INT 10h, AH=11h
Posted: Tue Sep 30, 2008 4:59 am
by jal
Troy Martin wrote:I was browsing the wiki, and I found a section on BIOS functions. I came across int 10h having the ability to set the font size if you mov ah,11h.
How do I get this to work? I'd love this to be done in my kernel before setting up pmode.
Don't. Directly manipulate video memory instead. It's rather easy, but does require some understanding of the VGA hardware. I remember a thread of a few months ago where we discussed this subject and that of setting a 90x60 video mode. I'll see if I can dig it up...
Thankers
You are aware what this rhymes with, right?
JAL
Re: INT 10h, AH=11h
Posted: Tue Sep 30, 2008 5:03 am
by jal
Ah yeah, here's the thread:
click. It explains both setting 90x60 and uploading your own font.
JAL
Re: INT 10h, AH=11h
Posted: Tue Sep 30, 2008 5:32 am
by bewing
Brendan wrote:
The BIOS page in the OSdev wiki is probably intended to be a one page introduction, rather than a several MiB reference.
Yes, that was exactly what I intended when I wrote it -- just a dense listing of what was the "generic" set of BIOS functions that you could almost count on as being available. Once you know what to look for, then you look in RBIL. I mined the list out of the rest of the wiki, but in true wiki form, I have to leave it up to others to edit and refine the list ... because I hardly use any of those functions and I don't know how most of them work. (Details of how each works should be as a link to a separate article.)
There are several functions regarding APM, PnP, and other stuff, that I recall seeing posted on the forums, that I still need to add to the list ... but I can't find them with a search.