Skip to content

emilsarlija/cls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

CLS - CLEAR SCREEN FOR CP/M

This does exactly what it says - it's a CP/M program to clear the screen using terminal escape codes to do so. Currently included terminals/platforms are:

DEC VT100
DEC VT52
ANSI
Lear-Siegler ADM3A
Lear-Siegler ADM31
Kaypro
Commodore 128
Data General Dasher

This program was infuenced by cls-cpm by Xander Soldaat, found at this link:

https://github.com/botbench/cls-cpm

His implementation is in C and only supported DEC VT100 and ANSI compatible terminals. Mine is in Z80 assembly language but will also run on an 8080, and supports other terminals. Both programs do exactly the same thing - run it and the screen is cleared, trivial but useful.

The included assembled binary is for VT100/ANSI terminals as that is what would be most commonly used in the 21st century if you're using something like Putty, or Minicom, or Telix or whatever. If you're using one of the other terminals, then you'll have to uncomment the line for your terminal and assemble it yourself.

This program was tested with the FabGL VGA terminal emulator which simulates all the included terminal types except for the Dasher, which I included in good faith that the manual is correct and because I have a Data General Dasher D200 that I will eventually recap and play with. Anyhow, it's highly unlikely anybody would be using a Dasher terminal on their CP/M system. That's just weird!

I have assembled this using the Pasmo Z80 cross-assembler under Linux like so:

pasmo cls.z80 CLS.COM

...and also using Z80ASM by SLR Systems under CP/M 2.2 on my Cromemco Z-1 computer like so:

z80asm cls

You may have to translate the line endings of the source depending on which operating system you use. A minor pain in the arse.

**** FILES ****

cls.z80 - the Z80 assembly language source, if you want to assemble it yourself
CLS.COM - the CP/M binary for VT100/ANSI if you can't be bothered assembling it
README - this file you're reading

**** SOFTWARE LICENCE ****

You're kidding, right? This is a trivial program that took a few minutes to whip up. It's taken me more time to write this README file and upload it to GitHub than it did to create the actual program itself.

You're expecting a licence?! No, there is no licence!

Consider this source and resulting binary public domain. Anybody with basic Z80 programming skills who skimmed through the first few chapters of an old CP/M programming book could've written this. Funnily enough, that is exactly how this came about. I'm not even putting my name in the source. Do what ever you want with it. You can even pretend you wrote it.

This document, on the other hand, took real effort and is therefore copyrighted by the conceited bastard that wrote it - (C) 2022 Emil Sarlija, emil@chookfest.net