OSDev.org

The Place to Start for Operating System Developers
It is currently Sun Apr 28, 2024 3:40 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Portable OS??
PostPosted: Thu Nov 15, 2001 6:15 am 
is it possible to make a OS that can be used on both MAC and PCs??? ( and others if possible ) with out doing porting another specific version to that platform??


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Tue Dec 04, 2001 6:11 am 
Hi,

why not? I mean if some coder can write a multi platform virus... :)

mark


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Thu Dec 20, 2001 7:42 am 
Hm, if the code runs on both platforms without porting it, it has to be quiet high-level (no processor specific code etc.). Not the thing I would like for a kernel, wouldn't be to fast I guess.

Also you can't use the same assembly code (and you will need at least some, I think), interrupts etc.

But you could implement kind of an abstraction layer which "converts" functions from your OS to the apropriate hardware specifics. Then you would only have to port this layer not the OS. Qube does it this way AFAIK.

citizen428


P.S.:
Please anybody correct me if I'm wrong, I'm quite new to this OS Dev thing!


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Tue Jan 29, 2002 1:45 pm 
That makes sence to me. I think, VIS, that if you want to write a multi-platform, there'd be a lot of bumps [im new to OSDEV, too.......] like, for instance, what do you do if user has a Mac [one button] mouse? Would you program the shift (or ctrl, whichever it is now) key to do the same as a right-click? That's just one thing.



Same here about correcting me if im wrong, this just stands out to me as a gen. programmer.


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Tue Jan 29, 2002 6:31 pm 
I'm pretty sure that you would have to compile it for each platform(Mac, PC).

K.J.


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Wed Jan 30, 2002 9:16 pm 
Yes and No.  Large parts of your OS can be very portable.  Linux, WinNT3/4, Solaris8, even the now defunct BeOS have multiple versions for different processors that are largely built from the same codebase.  There is a powderkeg of a flamewar that can be fought over this, but judging by your question, I'll assume that you favor C-like portability over ASM-like bare metal speed (so no one go off and flame me here) and use a less neutral tone....

Unfortunately for us advocates of portability, there are components of an OS that have to be coded with at least ASM wrappers and often full ASM functions.  Also, you should be careful of design desisions that lock you into a specific processor (like using segmented memory on x86).  I strongly suggest two documents to read.  They can both be very challenging to work through even for experienced C programmers but they should illuminate this for you.  They are:


http://www.drpaulcarter.com/pcasm/index.php
Dr Carter's PC ASM tutorial (a TON of great info on how ASM works on a practical level with a specific focus on interfacing with C/C++)

...and...

Intel's 386 Programming Reference.  No link because it can be found in MANY places, just search for it.  It's _dry_ , but it's chocked full of critical information that you will HAVE to know if you want to build an OS on x86.  

You should also bear in mind that your development environment under the two platforms will be wildly different on such basic things as 'How do I boot my kernel?'  You should figure out what some of the logistical questions you must ask are first (like the boot question above), and then do some research.  Once you get started understanding the problems and know _which_ questions to ask you'll be able to find a lot of the information you need on the web.  You'll be surprised how much easy some things will turn out to be and how insanely hard some things will turn out to be.

Good luck and don't forget to share your experiences!


Top
  
 
 Post subject: Re: Portable OS??
PostPosted: Mon Feb 04, 2002 7:40 pm 
I writing a JAVA Operating System for x86.

Only the kernel depends on the platform.

All higher level functions are designed using JAVA. That means that you can run the code on any virtual machine without compilation.

Imagine you can do the same project on a mac, JAVA object could be shared freely.


Top
  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 37 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group