Date: Sat, 05 Mar 2005 13:04:26 -0500 From: Mike Jeays <Mike.Jeays@rogers.com> To: Chuck Swiger <cswiger@mac.com> Cc: freebsd-questions@freebsd.org Subject: Re: Please help if you can Message-ID: <1110045866.650.14.camel@chaucer.jeays.ca> In-Reply-To: <4229DF51.5080907@mac.com> References: <001501c52197$14127760$6501a8c0@chris> <4229C4FC.1020503@mac.com> <1110035167.650.12.camel@chaucer.jeays.ca> <4229DF51.5080907@mac.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2005-03-05 at 11:33, Chuck Swiger wrote: > Mike Jeays wrote: > >>Yes, FreeBSD will run standalone executable code in the various .exe and .dll > >>formats, although people often use Wine or a similiar emulator if they want to > >>have a more complete Windows environment available while using FreeBSD. > > > > Surely not. I have never heard it suggested before that FreeBSD will > > run Windows .exe binaries directly. I would have thought that you would > > have to use Wine or Crossover Office. > > Notice the term "standalone". The overwhelming majority of Windows .exe > binaries use DLLs or make system calls which will not work under FreeBSD, > which means that even "Hello world" compiled on Windows will not run directly > on FreeBSD. However, something as simple as: > > int foo() > { > return 1 + 2; > } > > ...gets turned into: > > 0x0 <foo>: push %ebp > 0x1 <foo+1>: mov %esp,%ebp > 0x3 <foo+3>: mov $0x3,%eax > 0x8 <foo+8>: leave > 0x9 <foo+9>: ret > 0xa <foo+10>: mov %esi,%esi > > ...or "5589e5cb8030000009c389f6" in hex. > > x86 assembly is x86 assembly, and this binary sequence if compiled on Windows > would still run under FreeBSD. In practice, people use Wine or developers go > to some trouble to integrate the Windows-based dependencies for native > software like Flash or video codecs to go, also consider the NDISulator > project which uses Windows-based wireless drivers under FreeBSD. Thanks for the education! I am still amazed, and will try it for myself when I have a few minutes.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1110045866.650.14.camel>