VESA int 10h AX=4F00h and int 10h AH=0Eh [solved]

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.
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

VESA int 10h AX=4F00h and int 10h AH=0Eh [solved]

Post by zaleschiemilgabriel »

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).
Last edited by zaleschiemilgabriel on Wed Feb 20, 2008 1:03 pm, edited 1 time in total.
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

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
8) 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. :P
Last edited by zaleschiemilgabriel on Mon Feb 11, 2008 9:39 am, edited 1 time in total.
User avatar
Dex
Member
Member
Posts: 1444
Joined: Fri Jan 27, 2006 12:00 am
Contact:

Post by Dex »

These calls need real mode, grubs leaves you in pmode.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

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 don't care if it's homework, and not many universities set that sort of stuff.
2) Most of them are hooked up on C++ so when you ask an assembly question, you get no reply
I personally program in C++ but I am heavily outnumbered by the C and pure ASM developers.
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....
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.
4) They want me to beg for the answer :| - I will never do that
We would never ask you to.
5) They don't know the answer
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.
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
Don't remember your first post. We get too many noobs in here to keep a grudge. (unless they troll/flame)
7) I don't know, maybe I just need to attract more attention to my posts, which is what I am doing now
If you're a woman, try taking your top off.
8) I could think up lots of other stuff to put in here...
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.
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

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. :P
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! :D
7) I'm not a woman.
8) Or, as you said before, most people don't see the non-C/C++ related posts.
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

Bah' Humba! This is not a forum for OS development! It's a forum for chit chat and C/C++ stuff. I'm disappointed. Again!

Admins, how do I delete my account?
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

Why not just *not post again*? That would be more effective, I think.
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.
I'm not using the linux kernel - I wrote drivers for everything I needed, as you have to do when you hit PMode.
2) Good for you, but C++ usually means C + OOP
Please don't belittle me when you know nothing about me, I develop in C++ as a profession.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

zaleschiemilgabriel wrote:Admins, how do I delete my account?
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.


JAL
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

jal wrote:
zaleschiemilgabriel wrote:Admins, how do I delete my account?
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.


JAL
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?
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?
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post by jal »

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


JAL
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 »

I think now's the right time to grab the bochs debugger and learn how to use it...
"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 ]
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

I'm sorry if I was rude. :cry:
I figured out what the problem was: human error. :)
Problem solved!
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

do you know how much of a phallas you are?

kindly continue your quest for account deletion, or learn some manners.

your problem was answered in the second reply.
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Post by 01000101 »

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.
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

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)... :(
Post Reply