I have write a OS that have a file system and a memory gestion.
Now i want write a loader that car run dos application and linux
terminal application.
Some one can help me?
I want to build a dos and linux compatibile os
-
- Posts: 2
- Joined: Fri Jan 19, 2007 5:00 pm
DOS applications are a piece of cake to emulate. All you have to do is implement the same interrupts as DOS does. (That is as long as your os is 16-bit.)
Linux applications are somewhat more difficult. They require that you implement all calls on int 80. Shouldn't be too hard, FreeBSD has a linux compatibility layer you might want to look at.
However, DOS is 16bit and LInux is 32bit. Therefore, I would suggest you implement a DOS layer on top of the Linux layer. (Like DosBox.) This means you don't have to play with virtual x86 mode.
Linux applications are somewhat more difficult. They require that you implement all calls on int 80. Shouldn't be too hard, FreeBSD has a linux compatibility layer you might want to look at.
However, DOS is 16bit and LInux is 32bit. Therefore, I would suggest you implement a DOS layer on top of the Linux layer. (Like DosBox.) This means you don't have to play with virtual x86 mode.
C8H10N4O2 | #446691 | Trust the nodes.
-
- Posts: 2
- Joined: Fri Jan 19, 2007 5:00 pm
MiniDOS (www.dex4u.com) is capable of running some small games (not bigger than 64KB due to real mode limit), and FreeDOS (www.freedos.org).
inflater
inflater
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Derrick operating system: http://derrick.xf.cz (Slovak and English )
Building an emulation layer is everything but trivial for a hobby programmer. It's not only the huge number of system-calls that would have to be provided but also the complex system environment that make emulation a rather tedious task. Just have a look at the Wine project to get an idea how much work is really required..Now i want write a loader that car run dos application and linux terminal application.
Probably it should also be mentioned that most applications need a decently advanced operating-system to run properly. Being able to run a hello-world application written for linux is nice, but programmes doing something useful usually require things that your kernel just doesn't support yet. My advice is therefore that you continue working on your kernel until it has reached a certain level of maturity before even considering to go for linux or msdos compatibility.
As already mentioned by Alboin dosbox should allow you to run legacy applications on a modern system. It was obviously written with multi-platform portability in mind as many systems have already adopted it.Do you know simple (but very simple ) project that do this?
Both of which are clones and not emulators. Of course they could be run as v86 tasks but with x86-64 in mind I would personally prefere to have some real emulation independant of the machine architecture.inflater wrote:MiniDOS (www.dex4u.com) is capable of running some small games (not bigger than 64KB due to real mode limit), and FreeDOS (www.freedos.org)
regards,
gaf