The small cyclic stack brings back 20-year-old memories of a stack machine for "genetic art" from random evolving programs. But random programs will underflow the stack -- what to do? Just wrap around, why not? It's not as if the programs have to make sense. https://www.deviantart.com/djb/gallery
It namedropping LuaJIT's Dynasm at the end was funny, especially since by the time I got to it I had forgotten there was a (2014) in the title. Pleasant surprise seeing the author call it a work-in-progress :)
I recently tried using the dynasm-rs crate as a dynamic assembler for a project, and it's also really nice to use. I think something like Lisp still probably wins in terms of usability, since you can do the fancy macro abuse over your assembly DSL, but dynasm-rs was great if you just want runtime code generation without parameterize over stack offsets or something else insane like the OP.