[Coco] 'head' and 'tail' for CoCo OS-9?

Lothan lothan at newsguy.com
Sat Jan 2 22:05:38 EST 2010


The argc/argv logic is actually handled in cstart.r, which can easily be 
linked with an assembly-language program. If you look at the code in 
cstart.a, you'll see that it sets up the stack, zeroes out the data area, 
parses the command-line arguments, and then branches into main.

--------------------------------------------------
From: "Gene Heskett" <gene.heskett at verizon.net>
Sent: Saturday, January 02, 2010 5:57 PM
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Subject: Re: [Coco] 'head' and 'tail' for CoCo OS-9?

> For binaries, the std head won't work very well since those utils are text
> based and all count line endings to know when to start or stop.  But I'm 
> sure
> one could knock something up in short order in C, and with a little more
> effort in B09, and for the purists, assembly could do it too.  C would be 
> the
> nicest in this case because of its built in argc and argv constructs, 
> which
> would make it very easy to name the input and output files and the number 
> of
> bytes to copy from either end of a file.
 




More information about the Coco mailing list