3 ms·
I think something isn't quite right with int_to_str/print; in int_to_str, each converted char is pushed onto the stack as 8 bytes, and while the total length is
by userbinator 12y ago
I think something isn't quite right with int_to_str/print; in int_to_str, each converted char is pushed onto the stack as 8 bytes, and while the total length is calculated correctly in print, the result is that 7 null bytes get written out with each char as well. What you see will depend on how your terminal interprets them, but they will definitely be there if the output is redirected into a file.
There's also an extra "add rdx, 0x0" in int_to_str, a puzzling multiplication by 1 in print, and a confusion between the standard input (0) and output (1) fds.