Switching over to real mode from protected mode.......
Switching over to real mode from protected mode.......
Hi all
I am using Linux OS and i want switch over from protected mode to real mode. I have searched some documents from google, but nothing made me clear. http://www.sudleyplace.com/pmtorm.html
can anyone elaborate the mode switching process, where it be done...
Thanks in advance.
I am using Linux OS and i want switch over from protected mode to real mode. I have searched some documents from google, but nothing made me clear. http://www.sudleyplace.com/pmtorm.html
can anyone elaborate the mode switching process, where it be done...
Thanks in advance.
- einsteinjunior
- Member
- Posts: 90
- Joined: Tue Sep 11, 2007 6:42 am
Thanks for the responses.
The above documents explains about entering into protected mode and my previous post has the url for enter into real mode which is not clear for me. my one more doubt is entering into real mode and entering into protected mode ...all these things where should i do.....For me now i want to enter into real mode. I am in Linux (protected mode) , so where execute the code... I am new to this...
Thanks in advance.
AJ wrote: Try this tutorial.
The above documents explains about entering into protected mode and my previous post has the url for enter into real mode which is not clear for me. my one more doubt is entering into real mode and entering into protected mode ...all these things where should i do.....For me now i want to enter into real mode. I am in Linux (protected mode) , so where execute the code... I am new to this...
Thanks in advance.
Oh - sorry. I didn't realise you were in Linux - I'll read the question next time!
What is it you're trying to achieve at a higher level? I would be surprised if Linux let a user application switch to real mode. Perhaps you could do it from a driver module, although the system won't be too stable afterwards.
If you just want to run 16 bit code, you can try running it in v86 mode instead.
Cheers,
Adam
What is it you're trying to achieve at a higher level? I would be surprised if Linux let a user application switch to real mode. Perhaps you could do it from a driver module, although the system won't be too stable afterwards.
If you just want to run 16 bit code, you can try running it in v86 mode instead.
Cheers,
Adam
He is using Linux...Well, you could always try injecting the realmode code in the bootloader of your os before it goes to PMode
You can't switch Linux to real mode, neither MS-DOS to protected mode. In Linux, it's impossible by its architecture and security - direct access to register CR0 is prohibited.
In MS-DOS case you can freely fiddle with registers and stuff, but before leaving your application you must restore real mode, plus all segment/stack registers! (Or else a unpredictable result would happen, triple fault or some sort.)
Regards
inflater
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
It has already been explained to you several times on this forum, in fact, you created another topic asking the same question and received the same response!East wrote:So is it not at all possible?
http://www.osdev.org/phpBB2/viewtopic.php?t=16651
Write a bootloader, or GRUB, just stop asking the same questions..
Actually what i want to do is, from user application using the int 19h, it should boot the my HDD second partition (HDD-which is currently running from first partition). Previously i restarted the system and selected the boot option in BIOS. Now i am trying to boot the system with int 19h. if no other way to go, then i have to startup with writing the OS...from OS scratch can i access the BIOS interrupts? Can anyone help me
Yes - if you write an OS from scratch, you definitely can use the BIOS interrupts because you can choose to remain in (un)real mode. You can probably even do this from earlier DOS versions (someone correct me, please!) because that is real mode too (after all, DPMI switches to and from PMode).East wrote:if no other way to go, then i have to startup with writing the OS...from OS scratch can i access the BIOS interrupts? Can anyone help me
If all you are trying to do is restart the computer, there are other ways. You can restart a Windows box using either the WinAPI or .NET framework and Linux must have its equivalents.
Can I ask you to do one of two things:
1) Do more background reading yourself, AND/OR
2) Give us a succinct overview of your project at the top level so that we can suggest something that does work.
Cheers,
Adam
...okay, take it easy Myself........ yeah, it'll be hunky-dory... .... yes indeed...... .... so....East wrote:from user application using the int 19h, it should boot the my HDD second partition
FOR THE LAST TIME: YOU -CAN'T- USE ANY INTERRUPTS, ANY, AND I REPEAT: -ANY- INTERRUPTS IN LINUX !!!!!!!! DO YOU ARE A COMPLETE MORON ??!!