On Tue, 05 Oct 2004 09:17:39 +1300, Steve Bell <[EMAIL PROTECTED]> wrote:
> Thanks Lee - I think I now understand that the same OS on a different
> processor must use quite different system calls.
> 
> Although, that said and done, I'm still getting my head around how so
> many linux apps seem to be ported to run in FreeBSD on PPC in next to no

I'm not sure what level to start at, I don't want to insult your
intellegence, but I also don't want to go over your head. Skip the
bits that you already know.

Source code is the psuedo-english instructions readable to a trained human.
A compiler turns source code into machine code.
Machine code is the binary instructions that tell the CPU what to do.
The PPC and x86 CPUs use different instruction sets.

.exe files (and their linux or Mac OS equivalents) contain binary
machine code instructions.

The linux apps that get ported to other unix-like systems on different
CPUs are ported at the source-code level, by re-writing some of the
source code (if necessary) and re-compiling for the target CPU (PPC or
x86)

> time.  Hmm, though is the case with WINE that there's two layers of
> system calls to be translated, first to port WINE from running on X86 to
> PPC, then to have software to pretend the PPC is an X86?

Yes, the software that pretends to be an x86 is called an emulator.
Basically, an emulator takes each binary machine code instruction
intended for an x86 CPU, and decides what that instruction is trying
to acheive, and sends the equivalent PPC instruction(s) to the PPC
processor. This slows things down a lot!
Emulators should be a last resort, only used when the source is not
available for recompiling.

> Dang, I think I'm outta my depth.
Tread water - help is on its way :-)
> 
> Thanks!
> Steve

Keep wanting to learn, Steve.

Reply via email to