; FILE: Source:NanoCLS.ASM REV: 1 --- Absolutely the shortest CLS program (48 bytes) ; History ; 0 Initial version. ; 1 Added 'The Story'. ; ; The Story ; --------- ; ; Once upon a time there was a silly competition in aminet about the ; shortest CLS (Clear Screen) program possible. For some reason I missed ; this competition altogether until now (March 2001). Anyway here is ; something I wrote 5-6 years ago, while I was playing with BCPL & GlobVec ; of the dos.library. This is (and no, there is absolutely NO WAY of ; getting this ANY shorter!) the shortest possible amiga executable ; program clearing the shell window. ; ; Also as a bonus, as opposed to many other competition entries in aminet, ; this routine is 100% OS friendly, and doesn't rely on any dirty tricks, ; like traversing library list (like Dag Agren's CircLeS for example). ; ; End of story. Feel free to prove me wrong though. :-) ; ; - Harry "Piru" Sintonen ; Main move.l $E0(a2),a4 ; ptr to wrch routine, d1.b is char to write moveq #12,d1 ; FORM FEED moveq #3*4,d0 ; BCPL stack displacement jmp (a5) ; call BCPL routine in a4 & return ; We even have two spare bytes here, since above isn't ; multiple of 4. Oh well... ;)