INT 10h, AH=11h

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
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

INT 10h, AH=11h

Post 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
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: INT 10h, AH=11h

Post 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".
OS-LUX V0.0
Working on...
Memory management: the Pool
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: INT 10h, AH=11h

Post by Troy Martin »

Like I said, on the wiki. It's the page BIOS under the section Common functions.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: INT 10h, AH=11h

Post 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 :wink: ).
OS-LUX V0.0
Working on...
Memory management: the Pool
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: INT 10h, AH=11h

Post 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.
Last edited by Troy Martin on Mon Sep 29, 2008 9:58 pm, edited 1 time in total.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
jzgriffin
Member
Member
Posts: 190
Joined: Tue Sep 26, 2006 1:40 pm
Libera.chat IRC: Nokurn
Location: Ontario, CA, USA
Contact:

Re: INT 10h, AH=11h

Post by jzgriffin »

User avatar
cr2
Member
Member
Posts: 162
Joined: Fri Jun 27, 2008 8:05 pm
Location: ND, USA

Re: INT 10h, AH=11h

Post by cr2 »

I'm an idiot at web searching. No wonder why I didn't get a link on it. :wink:

But... STFW [-X
OS-LUX V0.0
Working on...
Memory management: the Pool
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: INT 10h, AH=11h

Post 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 :P
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: INT 10h, AH=11h

Post 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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Re: INT 10h, AH=11h

Post 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 :wink: ).
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
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: INT 10h, AH=11h

Post by jal »

Brendan wrote: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...
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
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: INT 10h, AH=11h

Post 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
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Re: INT 10h, AH=11h

Post by jal »

Ah yeah, here's the thread: click. It explains both setting 90x60 and uploading your own font.


JAL
User avatar
bewing
Member
Member
Posts: 1401
Joined: Wed Feb 07, 2007 1:45 pm
Location: Eugene, OR, US

Re: INT 10h, AH=11h

Post 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.
Post Reply