Skip to main content

Xiph needs someone to help with assembly for MSVC!

Hello again! Theora, the open video format from the makers of Ogg Vorbis and other great open media formats, is in need for someone with solid understanding of x86 inline assembler in MSVC syntax. At Xiph we have people fluent with GCC-style assembly, people familiar with Windows and Visual Studio, but we don't have anybody who can write x86 assembly compilable with Visual Studio. Yes, assembly for one and the same processor can look very different from compiler to compiler. These two lines are equivalents from both worlds:

GCC syntax: "add $16, %2\n\t"
MSVC syntax: add ecx, 16

Semantics are mostly the same but even the argument order differs. So while we do have assembly code compiling with GCC, an equivalent for MSVC is missing. In general there are several possible ways to solve this code-twice problem:

  1. Code everything twice, sync manually
  2. Code in one syntax, generate the other using a tool
  3. Add an abstraction layer that resolves to either syntax

Approach (1) obviously has big drawbacks like waste of time and error- proneness - it's a maintanance hell. We created base code for both (2) and (3) that proved to work for the tested (simple) subset of assembly commands. While (2) was done using a sed-based shell-script, (3) was implemented using preprocessor-macros, e.g. instead of

"add $16, %2\n\t"

we could now write


and get the MSVC syntax as a "fall-out". The reason we currently cannot finish either approaches is we don't have an MSVC assembly consultant ensuring we do the right thing, which is... what we want you for! You don't need to be an expert and even can have a real life beside us... in case you want to. :-) If that sounds interesting to you please contact Timothy (tterribe) or me (sping) via mail at directly or through the theora-dev mailing list. Btw going larger is always possible, e.g. you could extend (3) to a Bison-based assembly converter if you want to. We'll be there to your support of course. Questions? Ideas? What are you waiting for!