Terminal control/Clear the screen: Difference between revisions

no edit summary
(Added C++ tag to C entry)
No edit summary
Line 334:
 
<lang blast>clear</lang>
 
=={{header|Blue}}==
 
Example using the x86 instruction set and Linux system calls.
 
<lang blue>
global _start
 
: syscall ( num:eax -- result:eax ) syscall ;
 
: exit ( status:edi -- noret ) 60 syscall ;
: bye ( -- noret ) 0 exit ;
 
1 const stdout
 
: write ( buf:esi len:edx fd:edi -- ) 1 syscall drop ;
: print ( buf len -- ) stdout write ;
 
: clear-screen ( -- ) s" \033[2J\033[H" print ;
 
: _start ( -- noret ) clear-screen bye ;
</lang>
 
=={{header|Bracmat}}==
Anonymous user