Closed ruafelianna closed 1 year ago
Hey there!
Thanks for getting in touch.
I agree, it is a little bit odd to push something onto the stack and then not replace it at the end of the function. However, my thinking at time was to allow the developer to read the return value from sys_write
(which could return -1 to indicate an error).
Responsibility then was left to the developer to restore the original value from the stack if they required it.
Function sprint changes EAX register by doing
but doesn't restore it after that.
I suggest to add one more
and then