4 ms·
One tiny correction: the return value of write() is the number of bytes written. That's less than 256 so overwriting the low byte of rax still works.
by roca 5y ago
One tiny correction: the return value of write() is the number of bytes written. That's less than 256 so overwriting the low byte of rax still works.
- breadbox 5y agoUnless `write()` returns an error, in which case rax will contain a negative value. I've had to ditch that shortcut many times because of this.