Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.

Conway's Squasher Coroutine

According to Donald Knuth, Melvin E. Conway coined the term coroutine in 1958 when he applied it to the construction of an assembly program. He first published it 1963 in his paper Design of separable transition-diagram compiler (local copy). The paper introduces the coroutine together with its implementation in assembly for the Burroughs model 220, a late vacuum-tube computer.

This is a reimplementation of Conway's code example, the asterisk squasher subroutine, in modern assembly. Read my analysis of the code for more explanations.

See also the follow-up blog post by Dmitry with 64-bit assembler and Kotlin.

General Setup

  • GNU make to run build script
  • NASM to compile
  • a linker
  • Smoke to run tests

Setup Windows

Setup Linux


BSD License, see LICENSE.txt in repository.