mov ebp esp
sub esp .stacksz
.stacksz = 0x14
Pretty much this. I'm with Joker_vD on this one; I don't see a problem here.
Another approach I thought of is, instead of printing the output right away, append to a list of strings you'll output later, and patch it up yourself. But if we're using an assembler, we might as well get it to work for us. (The patching technique is commonly used for patching binary machine code.)
The above doesn’t solve the problem, though. It moves it to the assembler.