VESA int 10h AX=4F00h and int 10h AH=0Eh [solved]
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
VESA int 10h AX=4F00h and int 10h AH=0Eh [solved]
Hi!
I'm trying to print a list of SVGA video modes in real mode, using int 10h function 4F00h (AX=4F00h) to get the list of video modes and int 10h function 0Eh to print text on the screen.
Right after the int 10h 4f00h call, the int 10h 0Eh function doesn't seem to work anymore (the character I'm trying to print doesn't appear and the cursor doesn't move).
I'm doing this from my boot sector code which is loaded by GRUB from a HD partition.
The thing is that the same code works ok in a DOS program ran inside a Windows command prompt (when calling int 10h with AX=4F00h the command prompt automatically goes full screen fro some reason).
I'm trying to print a list of SVGA video modes in real mode, using int 10h function 4F00h (AX=4F00h) to get the list of video modes and int 10h function 0Eh to print text on the screen.
Right after the int 10h 4f00h call, the int 10h 0Eh function doesn't seem to work anymore (the character I'm trying to print doesn't appear and the cursor doesn't move).
I'm doing this from my boot sector code which is loaded by GRUB from a HD partition.
The thing is that the same code works ok in a DOS program ran inside a Windows command prompt (when calling int 10h with AX=4F00h the command prompt automatically goes full screen fro some reason).
Last edited by zaleschiemilgabriel on Wed Feb 20, 2008 1:03 pm, edited 1 time in total.
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
Well thanks for nothing
I thought up some reasons for which nobody seems to want to help me around here:
1) They think this is homework - IT'S NOT!
2) Most of them are hooked up on C++ so when you ask an assembly question, you get no reply
3) Others know the answer but they just don't want to help because they're bored of answering the same old questions over and over again - in this case a link to a previous post would do just well, but I couldn't find any. Even better, a link to a wiki page....
4) They want me to beg for the answer - I will never do that
5) They don't know the answer
6) They saw my previous (first) post on this forum and they decided I was a <insert bad description here> not worthy of their help
7) I don't know, maybe I just need to attract more attention to my posts, which is what I am doing now
I could think up lots of other stuff to put in here...
P.S.: If you enjoyed reading this and you know the answer to my question, pls help.
P.S.S.: This is not begging.
I thought up some reasons for which nobody seems to want to help me around here:
1) They think this is homework - IT'S NOT!
2) Most of them are hooked up on C++ so when you ask an assembly question, you get no reply
3) Others know the answer but they just don't want to help because they're bored of answering the same old questions over and over again - in this case a link to a previous post would do just well, but I couldn't find any. Even better, a link to a wiki page....
4) They want me to beg for the answer - I will never do that
5) They don't know the answer
6) They saw my previous (first) post on this forum and they decided I was a <insert bad description here> not worthy of their help
7) I don't know, maybe I just need to attract more attention to my posts, which is what I am doing now
I could think up lots of other stuff to put in here...
P.S.: If you enjoyed reading this and you know the answer to my question, pls help.
P.S.S.: This is not begging.
Last edited by zaleschiemilgabriel on Mon Feb 11, 2008 9:39 am, edited 1 time in total.
I don't care if it's homework, and not many universities set that sort of stuff.zaleschiemilgabriel wrote:Well thanks for nothing
I thought up some reasons for which nobody seems to want to help me around here:
1) They think this is homework - IT'S NOT!
I personally program in C++ but I am heavily outnumbered by the C and pure ASM developers.2) Most of them are hooked up on C++ so when you ask an assembly question, you get no reply
If we could link to a wiki page, you should be bloody ashamed that you didn't search properly beforehand, and that applies to old posts too.3) Others know the answer but they just don't want to help because they're bored of answering the same old questions over and over again - in this case a link to a previous post would do just well, but I couldn't find any. Even better, a link to a wiki page....
We would never ask you to.4) They want me to beg for the answer - I will never do that
True in my case, I have never done any real mode programming so I just don't read the topics that have BIOS interrupts in the title, although had I read this I could have told you what Dex said, that you're in PMode after GRUB boots you.5) They don't know the answer
Don't remember your first post. We get too many noobs in here to keep a grudge. (unless they troll/flame)6) They saw my previous (first) post on this forum and they decided I was a <insert bad description here> not worthy of their help
If you're a woman, try taking your top off.7) I don't know, maybe I just need to attract more attention to my posts, which is what I am doing now
Like the obvious one: There is just so much throughput in this forum for everyone to see every topic. I was away at the weekend - I only saw this one because you bumped it.I could think up lots of other stuff to put in here...
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
1) That's too bad
2) Good for you, but C++ usually means C + OOP
3) I would've searched properly if I wasn't convinced that this is upposed to work the way I expected (the way it works in my DOS program)
4) Good. Because I won't.
5) Grub can be configured to boot normal boot sectors in real mode. In my case I just copy-pasted and the configuration for my Windows system in menu.lst and modified the partition to point to my partition and the title... I don't think that GRUB boots Windows in PMode. You must be using the linux kernel, if you say you don't need/use BIOS interrupts, otherwise you have written drivers for everything you need without using BIOS, which is what I first thought I could do, but I soon proved myself wrong.
6) I'm a noob? I am a noob!
7) I'm not a woman.
Or, as you said before, most people don't see the non-C/C++ related posts.
2) Good for you, but C++ usually means C + OOP
3) I would've searched properly if I wasn't convinced that this is upposed to work the way I expected (the way it works in my DOS program)
4) Good. Because I won't.
5) Grub can be configured to boot normal boot sectors in real mode. In my case I just copy-pasted and the configuration for my Windows system in menu.lst and modified the partition to point to my partition and the title... I don't think that GRUB boots Windows in PMode. You must be using the linux kernel, if you say you don't need/use BIOS interrupts, otherwise you have written drivers for everything you need without using BIOS, which is what I first thought I could do, but I soon proved myself wrong.
6) I'm a noob? I am a noob!
7) I'm not a woman.
Or, as you said before, most people don't see the non-C/C++ related posts.
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
Why not just *not post again*? That would be more effective, I think.
I'm not using the linux kernel - I wrote drivers for everything I needed, as you have to do when you hit PMode.You must be using the linux kernel, if you say you don't need/use BIOS interrupts, otherwise you have written drivers for everything you need without using BIOS, which is what I first thought I could do, but I soon proved myself wrong.
Please don't belittle me when you know nothing about me, I develop in C++ as a profession.2) Good for you, but C++ usually means C + OOP
I think having your account deleted would benefit all of us. You are a sorry little sh*t that hasn't got the decency to wait for an answer and starts trolling around the moment he doesn't receive a useful answer to his questions within the minute. Grow up.zaleschiemilgabriel wrote:Admins, how do I delete my account?
JAL
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
Thanks, but I already knew that. If I wanted a personality check I would see a psychiatrist, but that's not what I asked for, now is it smarty?jal wrote:I think having your account deleted would benefit all of us. You are a sorry little sh*t that hasn't got the decency to wait for an answer and starts trolling around the moment he doesn't receive a useful answer to his questions within the minute. Grow up.zaleschiemilgabriel wrote:Admins, how do I delete my account?
JAL
I have never in my life attracted so many stupid answers with such simple questions.
Maybe it would benefit you if I leave the forum, but this definitely won't benefit me, because I will be right back where I started. Anyway, I'm prepared to make this sacrifice to save time and avoid the countless rants, off-topics, rude answers and extra unneeded uncertainties ahead.
WHERE'S THE DELETE BUTTON?
As you will learn later in life (I just cannot imagine you being older dan 15), being nice to people helps if you want them to do something for you. You ought to give it a try sometime.zaleschiemilgabriel wrote:Anyway, I'm prepared to make this sacrifice to save time and avoid the countless rants, off-topics, rude answers and extra unneeded uncertainties ahead.
JAL
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
My IQ dropped a few points after reading your post.
Please, seek account deletion faster, for all of our sakes.
DEX answered your question a while ago, why keep making yourself look bad? go research real-mode.
Please, seek account deletion faster, for all of our sakes.
DEX answered your question a while ago, why keep making yourself look bad? go research real-mode.
Website: https://joscor.com
- zaleschiemilgabriel
- Member
- Posts: 232
- Joined: Mon Feb 04, 2008 3:58 am
Sorry, but I decided to stay. There's too much fun to be had around here.
For those of you being rude, GRUB was not the problem. GRUB leaves me in real mode, as it does Windows and any other OS that starts in real mode and sets itself into pmode which I think I already mentioned, but I'm not going to bother looking.
If you really want to know, here's what I did:
I was happily calling int 10h 4F00h to get VESA info. The vesa info structure it returns contains a RM pointer to a list of video modes. To go through the list, I set the DS to the segment in that pointer. This segment didn't match my data segment, so when I tried to display text from my data segment using int 10h 0Eh, it wouldn't work. The reason it worked in the DOS command prompt under Windows is because the mode list was placed in the buffer passed to int 10h 4f00h, and so the DS was never changed (because the buffer was in the data segment)...
For those of you being rude, GRUB was not the problem. GRUB leaves me in real mode, as it does Windows and any other OS that starts in real mode and sets itself into pmode which I think I already mentioned, but I'm not going to bother looking.
If you really want to know, here's what I did:
I was happily calling int 10h 4F00h to get VESA info. The vesa info structure it returns contains a RM pointer to a list of video modes. To go through the list, I set the DS to the segment in that pointer. This segment didn't match my data segment, so when I tried to display text from my data segment using int 10h 0Eh, it wouldn't work. The reason it worked in the DOS command prompt under Windows is because the mode list was placed in the buffer passed to int 10h 4f00h, and so the DS was never changed (because the buffer was in the data segment)...