I couldn’t help noticing that your code has no macroses at all. Is it because the assembler doesn’t support them or you just choose not to use them?
My last experience with assembler was Masm32. It was all macroses, and this was an absolute game changer. You could do structural programming in Masm32, using convenient branching and functions, and function calls, which is much better for reading and refactoring.
I loved it so much, I even tried making my own macros system for ILAsm later: https://github.com/akalenuk/milasm This looks like high level language, it works like high level language, but is still assembly.