Yet Another Windows
At 01.02.2000 implemented 332 functions NT API from 1032 ( 33% )
IMPLEMENTED list
TODO list

YAW - is an attempt to implement Win32 and NT API ( and whole Win32 subsystem ) using Linux syscall's.

Let's take a look at how the application works.

How it works in NT:

<------------- USER MODE -------------->|<--- KERNEL MODE --->
Application -> Win32 API -> NT API -> ( int 2Eh ) -> NT kernel

How it works in typical Linux system:

<------- USER MODE ------>|<--- KERNEL MODE --->
Application -> libc -> ( int 80h ) -> Linux kernel

Very similar, isn't it ? :) So why we can't try to do something like

<------------- USER MODE -------------->|<--- KERNEL MODE --->
Application -> Win32 API -> NT API -> ( int 80h ) -> Linux kernel

Doing this way we get an ability to run Win32 applications under Linux Really there are no such thing in NT ( Except the signal about filesystem state change - we need to hack kernel ) which cannot be implemented in Linux.

What we need:

  1. - Write ntdll.dll, using Linux int 80h, instead of NT int 2Eh. It's not a simple task, because propably all NT API functions are undocumented But the Micro$oft's love to long function names and an availability of disassemblers and debuggers allows us to understand how they works. And write our implementation. NOT A COPY, because stoled thing is bad thing, and in addition - the M$ programmers code is not good thing and the last reason - the Linux syscalls are slightly :) different from NT syscalls.
  2. - Write the Win32 API part for GUI support ( gdi32.dll and user32.dll). We must do it using socket depending on DISPLAY environment variable value
  3. - Compile that all into PE-format .dll's ( native windoze libraryes and executables format). This allow us (sic!) just take all other dll's necessary for running win applications directly from NT distribution. So, we don't have to write someting more to get WIn32 subsystem running.
  4. - Tell to Linux kernel, that there is one more executable format - PE.

And what we have for now:

  1. - 332 functions implemented.
  2. - The good part of ntdll.dll is done. But I didn't touch GUI yet. ( I have some results in getting Win32 applications working on Linux ( sometimes it even works http://www.ice.ru/~vitus/misc/yaw/, but i come up to WINE's end - hudge and very slow system, which is replace PE dll's by ELF-libraries, so it was not really Win32-system ))
  3. - I compiled gcc 2.7-B19 www.cygnus.com as cross-compiler with --target=i386-cygwin32 and get an ability to make PE executables under Linux.
  4. - Kernel module was written in few hours - I just slightly changed binfmt_elf module.

And this is a result: yaw-0.0.2.tar.gz It's not usable yet, but you already can write some simple programs using implemented functions, and they will work in both NT and Linux.

You can mail me something to: stanson@chat.ru

I'm working with kernel 2.2.13.

BTW, take a look to MainWin Here you will found detailed description about porting sources. YAW is the same thing, but with ability to run native code and FREE

YAW Division:

Others are WELCOME!!!