![]() I can also explain the logic in more detail if anyone is curious. I welcome anyone who has any other suggestions on how it can be improved. Here's a link to my first and second attempts, in their original nasm syntax. ![]() I also took out the exit routine because who needs proper exit code? I've now optimized this so that only 1 write operation is performed (faster!) and has magic numbers (wow!) and by pushing the entire result onto the stack backwards before making the syscall. It basically does the same two loops that all the answers do, but printing to the console is a bit harder and basically requires pushing the characters to print onto the stack in reverse, and then making a (linux specific) syscall to actually put those chars into stdout. This is a dump of the binary file, and all of this is 175 bytes.
0 Comments
Leave a Reply. |