This is the source of a short tutorial explaining how green threads work. It uses the C language and some assembly, the resulting implementation will work on x86-64 machines (both Linux and Mac OS X, normally). You can find its source code on my gthreads repository.
I developed a small ad-hoc environment to automate the generation of HTML code. It uses a slightly modified Markdown language so even if files here end in ".md", Github will not be able to render them all properly.
The tutorial is now published.
All the code I wrote here is in public domain.