compatibility with some popular os

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
suhmaamiar

compatibility with some popular os

Post by suhmaamiar »

lets say, i have a working os X, how i can make it
compatible with some other popular os, lets say
dos. what kind of steps are involved in this issue ?
Guest

Re:compatibility with some popular os

Post by Guest »

You have to emulate MSDOS syscalls. For example there's a syscall to put a text on the screen, which is:

TEXT db 'Hello world','$'
mov ah, 9 ; syscall number (to print text)
lea dx, TEXT
int 21h

So, in other words, your OS should do the same thing.

It gets more complicated with windows applications, where you have to implement thousands of WINAPI syscalls (see "wine").

Kind Regards,
TB.
suhmaamiar

Re:compatibility with some popular os

Post by suhmaamiar »

the idea which i had in my mind was to implement the
interrupts as they are implemented in DOS, i am sure
you are saying the same thing, correct me if i am
wrong ;D
In this case the os will be compatible with dos,
right ???
gtsphere

Re:compatibility with some popular os

Post by gtsphere »

do you want the compatiability to be running that OS's programs?
Then you will need a way to emulate their interupts, and many higher level things. And also depending on what else you are doing, their filesystem. A good example of emulating is the program WINE. It emulates windows programs, so they are able to run on *NIX machines. A not so good example of a filesystem emulation, is mounting a fat filesystem in *NIX and reading from it -- Why thats an example is because your program KNOWS how to handle that filesystem, and in turn, you are looking for a way for your OS to KNOW how to handle OS X's programs.

Hope this helps
-GT
Post Reply