Interrupts ( graphics mode ) in protected mode

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
Neomex
Posts: 3
Joined: Tue Jan 25, 2011 6:36 am

Interrupts ( graphics mode ) in protected mode

Post by Neomex »

Hello,
How to use interrupts ( switch to graphics mode ) in protected one?
Also which resolutions are avaiable?
User avatar
Chandra
Member
Member
Posts: 487
Joined: Sat Jul 17, 2010 12:45 am

Re: Interrupts ( graphics mode ) in protected mode

Post 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.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Neomex
Posts: 3
Joined: Tue Jan 25, 2011 6:36 am

Re: Interrupts ( graphics mode ) in protected mode

Post 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?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Interrupts ( graphics mode ) in protected mode

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Neomex
Posts: 3
Joined: Tue Jan 25, 2011 6:36 am

Re: Interrupts ( graphics mode ) in protected mode

Post 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?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Post 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.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Tosi
Member
Member
Posts: 255
Joined: Tue Jun 15, 2010 9:27 am
Location: Flyover State, United States
Contact:

Re: Interrupts ( graphics mode ) in protected mode

Post 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.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Interrupts ( graphics mode ) in protected mode

Post 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++)
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply