Interrupts, IDT, Etc.

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
AvengerX

Interrupts, IDT, Etc.

Post 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)?
Whatever5k

Re:Interrupts, IDT, Etc.

Post by Whatever5k »

Make a software interrupt - in C:

Code: Select all

__asm__("int $0x1");
This will call the first Interrupt Service Routine...
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Interrupts, IDT, Etc.

Post 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
AvengerX

Re:Interrupts, IDT, Etc.

Post 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
K.J.

Re:Interrupts, IDT, Etc.

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

Re:Interrupts, IDT, Etc.

Post by AvengerX »

I know it has to do with int 10 to change the font, but i am in protected mode...
Slasher

Re:Interrupts, IDT, Etc.

Post 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!
Therx

Re:Interrupts, IDT, Etc.

Post 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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Interrupts, IDT, Etc.

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