SnabbCo/snabbswitch — pull request #114 by lukego (2014-03-05 12:35:58+00:00)
Title: Example app written in x86 assembly language (with DynASM)

This is an idea I'm playing with: writing apps in assembly language. The idea is that when we write apps we're able to write them in LuaJIT, C, or assembly language, depending on what suits that particular app the best.

The example file `asm.dasc` uses [DynASM](http://luajit.org/dynasm.html) to generate x86 machine code for a `pull()` method when the App is initialized i.e. it's a really trivial JIT. Then the file `asm.lua` is the App front-end.

The `pull` method is written in assembly language but for now it only sets a status value in memory and doesn't move and traffic. (It would be neat to turn it into a packet forwarder.)

Like a fool I branched this code from the rewrite I'm doing of `app.lua` so I'll probably finish and merge that and then rebase and merge this.