flat assembler
Message board for the users of flat assembler.

Index > DOS > Mode 13h and ROM Fonts ?

Author
Thread Post new topic Reply to topic
Kuemmel



Joined: 30 Jan 2006
Posts: 200
Location: Stuttgart, Germany
Kuemmel 05 Sep 2013, 22:18
Hi there,

I'm quite new to DOS programming, but familiar in general with x86 assembler, so can anybody tell me what is the easiest/shortest way to display text using the ROM fonts while beeing in VGA MODE 13h ?

Where are the fonts located and in which way are they stored ? I couldn't find much by googleing. I guess I got to copy the letters one by one from the ROM location...?
Post 05 Sep 2013, 22:18
View user's profile Send private message Visit poster's website Reply with quote
AsmGuru62



Joined: 28 Jan 2004
Posts: 1671
Location: Toronto, Canada
AsmGuru62 06 Sep 2013, 01:40
Try this resource:
http://stanislavs.org/helppc/bios_data_area.html

If you scroll down to the very bottom -- you may find the location of DOS Font.
Post 06 Sep 2013, 01:40
View user's profile Send private message Send e-mail Reply with quote
SeproMan



Joined: 11 Oct 2009
Posts: 70
Location: Belgium
SeproMan 06 Sep 2013, 20:55
Kuemmel,

First use this code to retrieve a pointer to the 8x16 systemfont.
You get this information irrespective of the current video mode!
(Use bh=2 to locate the 8x14 font)
mov ax,1130h
mov bh,6
int 10h
You will get output in CX=16, DL and ES:BP
At ES:BP there sits a table of 256 packets of 16 bytes. Each packet represents an ASCII character.
The 1st byte of each packet defines the topline of the character whereas the 16th byte defines its bottomline.
Within every byte bit 7 defines the leftmost pixel on screen and bit 0 defines the rightmost pixel on screen.

All in all it's a very straightforward format. Good luck!

_________________
Real Address Mode.
Post 06 Sep 2013, 20:55
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.