My original prototype was more feature-rich than this, but this formalizes it and provides self-tests. It is indeed odd seeing shell code that does not look like shell.