4 ms·
Very nice, too bad there are a few typos. For example, the "write" function arguments are not ordered correctly and it's using the wrong line terminator. It sho
by 1_player 13y ago
Very nice, too bad there are a few typos.
For example, the "write" function arguments are not ordered correctly and it's using the wrong line terminator. It should be:
write(STDOUT, "Hello World!\n", len("Hello World!\n"));
- ange4771_ 13y agothx, will fix it. any other typo ?
- acc00 13y agothere is no such predefined thing as STDOUT. you are probably thinking of STDOUT_FILENO. can you just put "1" there? also, reordering the "mov"s (so they appear in actual call order: edx, ecx, ebx) will simplify the diagram somewhat.
- lubomir 13y agoIn code example, the hexdump starts with B9 90 00 00 08, but in the disassembly is listed as 80 00 00 90. I don't think endianness can change 08 to 80.
- ange4771_ 13y agonot even German endianness ? ;) thanks for pointing this out.
- unwind 13y agoUh, if that's supposed to be C, then there's no STDOUT and the way to compute the length of a string is with strlen(), not len(). It should be STDOUT_FILENO as pointed out below.