flat assembler
Message board for the users of flat assembler.

Index > Main > Where is the character map ?

Author
Thread Post new topic Reply to topic
fafastrungen



Joined: 12 Aug 2006
Posts: 27
fafastrungen
Hi, I'd like to modify the character's map from the BIOS. Not in windows or dos, just boot the pc with my own program and modify the character's map to show different images, for instance, if I press the 'A' key I want to show another image.
I took a look to the memory map but I couldn't get nothing about this.
So, any help please.
Post 17 Apr 2007, 21:34
View user's profile Send private message Reply with quote
Hayden



Joined: 06 Oct 2005
Posts: 132
Hayden
The character maps are located on the video bios. Font functions are on INT 10h with AH = 11h and AL set to the subfunction number.

This link is a reference to all the video bios routines, note ~1909kB
www.versalogic.com/support/downloads/pdf/69030bg.pdf

You may also want to download ralf brown's interrupt list from here
www.cs.cmu.edu/~ralf/files.html

note character font cells are stored in msb -> lsb, here is a code snippet I wrote in the euphoria programming language that dementrates fow fonts are stored

Code:

    -- legacy bios -> get 8x8 doulbe-dot font pointer...

    dpmi[REG_AX] = #1130
    dpmi[REG_BX] = #0300                     -- get pointer to 1st 128 chars
    dpmi = dos_interrupt(#10,dpmi)
    pointer = dpmi[REG_ES] * 16
            + dpmi[REG_BP]
    bytes = peek({pointer,((1*8)*128)})      -- ((1 bbp * 8 lines) * 128)

    -- note: the value returned in cx will be the bytes per character for
             the active font (typicly 8x16), NOT the actual font requested.

    dpmi[REG_AX] = #1130                     -- get pointer to 2nd 128 chars
    dpmi[REG_BX] = #0400
    dpmi = dos_interrupt(#10,dpmi)
    pointer = dpmi[REG_ES] * 16
            + dpmi[REG_BP]
    bytes &=peek({ponter,((1*8)*128)})

    -- character bytes are stored in MSB format ( quite dumb ) to we need
    -- to transform each byte to LSB format....

    for i = 1 to length(bytes) by 1 do
        bits = int_to_bits(bytes[i],8)
        bits = reverse(bits) 
        bytes[i] = bits_to_int(bits)
    end for

    -- groups the bytes into characters so we can display the chars in eu's
    -- graphics modes with 'display_image()'

    chars = {}
    for i = 1 to length(bytes) by 8 do
        chars = append(chars,bytes[i..(7+i)])
    end for

    

_________________
New User.. Hayden McKay.


Last edited by Hayden on 29 Apr 2007, 17:16; edited 3 times in total
Post 18 Apr 2007, 04:18
View user's profile Send private message Reply with quote
fafastrungen



Joined: 12 Aug 2006
Posts: 27
fafastrungen
Thank you very much dude.
Post 19 Apr 2007, 11:47
View user's profile Send private message Reply with quote
m



Joined: 28 Dec 2006
Posts: 304
Location: in
m
fafastrungen wrote:
Thank you very much dude.
Me too !

_________________
Attitude!
Post 28 Apr 2007, 19:08
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-2020, Tomasz Grysztar.

Powered by rwasa.