Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Compile with -O0 it will work, compile with -O3 and it will likely print nothing */
- #define write(RESULT, FD, BUFF, SIZE) \
- asm volatile ("syscall" : \
- "=a" (RESULT) : \
- "D" (FD), "S" (BUFF), "d" (SIZE), "a" (1) \
- : "rcx", "r11")
- int
- main() {
- char str[]="Hello\n";
- int res;
- write(res, 1, str, 6);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement