Thanks for this.
There is a really good blog post to understand coroutines from an assembly perspective here: https://blog.dziban.net/coroutines/
I ported the intel assembly syntax in that blog post to at&t syntax and assembled it with GNU Assembler https://github.com/samsquire/assembly as coroutines.S
there is also protothreads and Tina http://dunkels.com/adam/pt/ https://github.com/slembcke/Tina