[Coco] OS-9 environment variables?

Gene Heskett gene.heskett at verizon.net
Wed Apr 15 13:45:22 EDT 2009


On Wednesday 15 April 2009, Allen Huffman wrote:
>Non-6809 OS-9 versions do have environment variable space.
>
>It would be trivial to write a getenv/setenv library... How soon would
>you need it?

Chuckle.  About 24 years ago would have been about right, Allen.  :-)

Tell me, is this going to be easier that having a file on disk (or in myram, 
copied there by the startup script) along with a cron job to check & see if 
its been updated since written at boot, & copy it back over that file if the 
myram copy is newer? Set it to run at say 5 minute intervals, if the file 
hasn't been touched, no copy, so you won't notice the cron waking up 
occasionally.

Either way it seems we need two copies, and they must stay synched.  The disk 
based file, at least on my system, would only be slower than the myram version 
by the seek and rotational latency of the drive as either can do an 11 second 
megaread on my coco3.

The point is that there is more than 1 method of skinning a cat, limited only 
by ones imagination.  With nitros9, that is literally true.  The trick is to 
get it out of system ram (preventing error 207's) while making it readily 
accessible from user ram.  As for cron, loading up myram and friends in the 
startup, along with copying the crontab file to /r0 gives both a place to put 
the crontab, but also the data, and the shell script crontab calls could 
handle the rest.  And do it all w/o hammering the disk drive until a new bit 
of data is added or changed in the /r0 copy.

Humm, this would require that copy duped the file descriptors date stuff too 
in order to preserve the on disk date in the /r0 copy.  That can be done but I 
don't know if our current copy util has such an option.  Or if our version of 
touch can do that.  One or the other might need massaged to handle that.

Humm, after re-reading the above, maybe there is an easier way?  Seems like 
there should be.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Remember:  Silly is a state of Mind, Stupid is a way of Life.
-- Dave Butler




More information about the Coco mailing list