Page 1 of 1

Interrupts, IDT, Etc.

Posted: Wed Feb 19, 2003 9:29 pm
by AvengerX
I have my IDT set up, it works, keyboard and timer work, but how do i CALL interrupts? like i define an interrupt, how do i make it "go"?. oh, and where is the character generator RAM located (stores the console font data)?

Re:Interrupts, IDT, Etc.

Posted: Thu Feb 20, 2003 12:50 am
by Whatever5k
Make a software interrupt - in C:

Code: Select all

__asm__("int $0x1");
This will call the first Interrupt Service Routine...

Re:Interrupts, IDT, Etc.

Posted: Thu Feb 20, 2003 1:38 am
by Pype.Clicker
iirc, the characters table is located somewhere in the video memory, but you have to ask the VGA sequencer to use your own table (rather than pre-defined one) ... i have more info on this @ home...

http://web.inter.nl.net/hcc/S.Weijgers/ ... .htm#fonts

should help you a bit

Re:Interrupts, IDT, Etc.

Posted: Thu Feb 20, 2003 5:56 pm
by AvengerX
It helps me a bit, but not as much as needed (nor does the source for some linux console font editing programs, they just call

ioctl(fd, PIO_FONT, buf);

so, that's useless.. heh. thanks

Re:Interrupts, IDT, Etc.

Posted: Thu Feb 20, 2003 6:57 pm
by K.J.
where is the character generator RAM located (stores the console font data)?
IIRC, the only way to know is to call a VGA interrupt. I'm not sure which off the top of my head, a quick search through Ralf Brown's list should turn it up though.

K.J.

Re:Interrupts, IDT, Etc.

Posted: Thu Feb 20, 2003 9:43 pm
by AvengerX
I know it has to do with int 10 to change the font, but i am in protected mode...

Re:Interrupts, IDT, Etc.

Posted: Fri Feb 21, 2003 7:40 am
by Slasher
you can either
Change fonts before you switch to Pmode or
from pmode,go to real mode(or vm86) change fonts then return to pmode!

Re:Interrupts, IDT, Etc.

Posted: Fri Feb 21, 2003 8:30 am
by Therx
It's possible to change the font from PMode. I think the font location in video memory is mapped near the top of the memory. I've seen a value somewhere and will try to find it

Ok found it I think its in ROM its a fairly random address found in some source code

0xF000FA6EL

Haven't checked it but it should give you access to the default char set

Re:Interrupts, IDT, Etc.

Posted: Fri Feb 21, 2003 8:33 am
by Pype.Clicker
i also do thing it's somewhere in the video memory, and i think you must tell the Sequencer which 8K bank you will use ...

Maybe also some of these banks are just ROM (otherwise, having a silly loop that erases everything should also overwrite the fonts table and your character will be screwed up, which actually never occurs (afaik))