I have a little question for ya all.
As you might have guessed i'm breaking my head on creating my own little OS in order to learn the nitty gritty basics.
I'm now at a stage where i have some vm86 routines and some taskswitching.
As a next step i would like to utilize the vm86 calls to get me into a nice VESA mode. And this is where Mr. problem pops its ugly head. In my code im filling a VESA-info structure by using the command 0x4f00 and subsequently i'm using 0x4f01 to fill a mode-structure for all mode numbers found in the info structure. after wich im checking wether the mode structure contains my desired width/height and bpp values.
If all checks out i use the 0x4f02 call to set the mode.
This last step is where things go wrong.. In my bochs i end up with some weird X11 Errorcode that don't make any sense. So i have my worries on the correctness of the bochs VBE implementation. On the other hand when running the code on real PC at the point of switching to another mode it just flicks into a reboot wich is quite odd since all the other VESA calls did work out..
My question is wether anyone sees any clear mistakes in my code as supplied hereunder. also i wonder if other people get that same error from bochs when running my image below.
Thank you all in advance!
Here's my code :
http://files.freaksunited.org/file/675
Its this part where things go wrong :
Code: Select all
/* we'll take it ! */
memset(®s, 0, sizeof(regs));
regs.eax = 0x4F02;
regs.ebx = *modep;
/* set VESA mode */
int86(0x10, ®s);
And my a.img image :
http://files.freaksunited.org/file/674