Is there a way to clear the screen in a terminal window with nasm?
By clear the screen, I mean emulate the Ctrl-L
hotkey. Remove all text from the window.
Advertisement
Answer
In Bash:
JavaScript
x
echo -ne "33[H33[2J"
In C:
JavaScript
printf("33[H33[2J");
How do I find the string:
JavaScript
$ strace -e trace=write clear >/dev/null
write(1, "33[H33[2J", 7) = 7
Process 7983 detached