V86 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
WouteZZ

V86 Mode

Post by WouteZZ »

I really want V86 mode to be built into my os.
But I don't know anything about it, all information I find on the internet is about what it does.
So, could please anybody help me ?
I currently have for my OS only this:
  • (RMODE) APM poweroff
  • PMode basics
  • GDT/IDT
  • A20 Gate
  • Bootsector
Some said it has something to do with the TSS.
So, I haven't wrote the multitasking yet.
Could anyone please help me ?

(BTW: NOT many OS's use V86 Mode.
Is it too hard ? or just not handy ?)

Thank you, WouteZZ
BI lazy

Re:V86 Mode

Post by BI lazy »

Oh sweet gosh a'mighty, praise god, c'mon!

don't ya think, you 'll need some more prerequisites a priori?

You just can't do vm86 properly without some important functionality - not the least of them is the task switching mechanism for saving the hardware status of a process. You'll need a tasking environment and a possibility to build an adress space for a created rocess (say a kind of fork mechanism). Maybe you'll need a paging daemon for doing all the grudge work related to paging?

I suggest you first implement memory management(adress space management AND heap management - for linked lists and sort), and maybe in parallel build up the multitasking subsystem+scheduling of tasks (this one isn't *that* hard) as well as interrupt servicing and exception handling. then you shall continue with implementing user tasks (user processes) If you've got your memory management and kernel task creation stuff right, this is merely a kind of protcol enhancement.
Further you will need a means of getting an independent file loaded into memory and transferred it to the right place.

Yes, and you'll need a vm86 handler hooked to your exception 13 handler.

In other words, I suggest you create the os nitty gritty before you insist on doing vm86 things.

Hehe ... in Blue Illusion, the vm86 process lead to the creation of other user processes. In fact, the vm86 task 's been the first user process ever in it. *gg* What stems from pure lust in experimenting around is not always bad. One stone lead to the other one in that case.

As for your question: For me, it's been a bit of reading and studying before I've got the knack of the Idea behind, but then, it went on straight forward. But this was only possible, because the nitty gritty 's been there already. so to say: it is not hard, but easy it is neither. you just have to learn about it. Well, and it is very handy for switching videomodes and querying the bios for several things whilst being already in protected mode. Not that I do much of this querying but testing for VESA2.0 at the moment. But the Possibility is there.

Note: If you have a Toshiba Laptop, you maybe experience problems with video mode switching things in vm86. It for one causes me severe headache to solve that problem.

stay safe.

ps: you can also d vm86 with stack based taskswitching.
Post Reply