Terminal control/Clear the screen: Difference between revisions

Add 8080 assembly version
(Add 8080 assembly version)
Line 70:
bne clearscreen
</lang>
 
=={{header|8080 Assembly}}==
 
On almost all video terminals, from the earliest ones to today's terminal emulators,
sending an ASCII Form Feed control character (code 12) will clear the screen.
 
This program uses a CP/M system call to send a Form Feed character to the standard
output, as CP/M was the de facto standard operating system for 8080-based systems.
 
<lang 8080asm>putch: equ 2 ; CP/M 'putchar' syscall
bdos: equ 5 ; CP/M BDOS entry point
FF: equ 12 ; ASCII form feed
org 100h
mvi c,putch ; Print character (syscall goes in C register)
mvi e,FF ; Form feed (argument goes in E register)
jmp bdos ; Call CP/M BDOS and quit</lang>
 
=={{header|AArch64 Assembly}}==
2,093

edits