🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10201

Re: clear screen in 280 bytes?

#10201
From: Randell Jesup
Date: Fri, 04 Nov 1988 09:49
36 lines
1211 bytes
In article <1623@scolex> brianm@sco.COM (Brian Moffet) writes:
> *	Brian Moffet
> *	11-01-88
> *
> *	test to see how small I could make a clear screen.
...
>void
>_main()
>{
>	register long F;

	Please, evil as it is, that should be a BPTR.

>	DOSBase = OpenLibrary( "dos.library", 0 );
>	if( DOSBase != NULL )
>	{
>		F = Open( "*", MODE_OLDFILE );
>		if( F != -1 )

	URK!  Ok, First, you'd do better to do F = Output().  Second,
the error return from Open is 0, not -1!!!!

>		{
>			Write( F, "\f", 1 );
>			Close( F );

	If you use F=Output(), DO NOT Close() it!

>		}
>		CloseLibrary( DOSBase );
>	}
>}

-- 
You've heard of CATS? Well, I'm a member of DOGS: Developers Of Great Software.
Randell Jesup, Commodore Engineering {uunet|rutgers|allegra}!cbmvax!jesup
Technical Details
Message-ID: <5182@cbmvax.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!cbmvax!jesup
References: <1623@scolex>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!attcan!uunet!cbmvax!jesup
From: jesup@cbmvax.UUCP (Randell Jesup)
Newsgroups: comp.sys.amiga.tech
Subject: Re: clear screen in 280 bytes?
Keywords: See how small I could make a C program
Message-ID: <5182@cbmvax.UUCP>
Date: 4 Nov 88 09:49:26 GMT
References: <1623@scolex>
Reply-To: jesup@cbmvax.UUCP (Randell Jesup)
Organization: Commodore Technology, West Chester, PA
Lines: 36