Page 1 of 1

Interrupts ( graphics mode ) in protected mode

Posted: Wed Feb 02, 2011 4:21 pm
by Neomex
Hello,
How to use interrupts ( switch to graphics mode ) in protected one?
Also which resolutions are avaiable?

Re: Interrupts ( graphics mode ) in protected mode

Posted: Wed Feb 02, 2011 4:37 pm
by Chandra
Neomex wrote:Hello,
How to use interrupts ( switch to graphics mode ) in protected one?
Also which resolutions are avaiable?
Hello Neomex,

Basically, you cant use BIOS interrupts under protected mode unless you employ the V86 mode.
The only way to set the mode (unless you are writing a VGA or a graphics card driver) is to perform the mode switch while you are in real mode.

Just search the forum and you'll find similar topics sustaining there.

Re: Interrupts ( graphics mode ) in protected mode

Posted: Thu Feb 03, 2011 8:59 am
by Neomex
Chandra wrote:
Neomex wrote:Hello,
How to use interrupts ( switch to graphics mode ) in protected one?
Also which resolutions are avaiable?
Hello Neomex,

Basically, you cant use BIOS interrupts under protected mode unless you employ the V86 mode.
The only way to set the mode (unless you are writing a VGA or a graphics card driver) is to perform the mode switch while you are in real mode.

Just search the forum and you'll find similar topics sustaining there.
So e.g. Windows is running in V86 mode, if wants to change screen resolution?

Re: Interrupts ( graphics mode ) in protected mode

Posted: Thu Feb 03, 2011 9:20 am
by Combuster
Neomex wrote:So e.g. Windows is running in V86 mode, if wants to change screen resolution?
Windows does not normally use the BIOS, it has all the drivers.

Re: Interrupts ( graphics mode ) in protected mode

Posted: Thu Feb 03, 2011 10:13 am
by Neomex
Combuster wrote:
Neomex wrote:So e.g. Windows is running in V86 mode, if wants to change screen resolution?
Windows does not normally use the BIOS, it has all the drivers.
What I need to know if I want to write one then? And are there any language requirements, like it have to be in asm only?

Posted: Thu Feb 03, 2011 10:24 am
by Combuster
Did you read the article on setting graphics modes from the FAQ and the Languages page? Your responses seem to indicate you haven't.

Re: Interrupts ( graphics mode ) in protected mode

Posted: Thu Feb 03, 2011 1:33 pm
by Tosi
To write a driver, all you need is the documentation for the hardware you're writing for. As for the language, almost any compiled language could do it as long as it can do the following:
1. Access I/O ports.
2. Interface with the kernel for interrupt facilities.
3. Able to write an IRQ in the language.
4. Able to read/write memory at an arbitrary location (this means pointers)
C is the preferred language for such actions due to the ease with which it can access such low-level functionality.

Re: Interrupts ( graphics mode ) in protected mode

Posted: Thu Feb 03, 2011 4:39 pm
by Combuster
Note that #1 and #3 require assembly, and in case of a microkernel, so does #2. That doesn't mean you can't do those parts separately and wrap an interface around them so you can do the majority in your language of choice.

C is only recommended because it has the most people saying it is. The official recommendation is to use the one language capable of low-level development in which you have the most experience. (which for most people boils down to either C or C++)