[Coco] OS-9 RAM disk with "rdisk" command? And /md descriptor?
Gene Heskett
gheskett at wdtv.com
Sat Jan 31 22:39:37 EST 2015
On Saturday 31 January 2015 21:56:47 Allen Huffman did opine
And Gene did reply:
> I cannot remember where I got the OS-9 RAM disk I use, but it was by
> far my favorite of all the ones I tried over the years. It came with a
> command called “rdisk†that let you dynamically create the RAM
> disk as any size you wanted, rather than having descriptors set to
> different sizes.
>
> It looked like this:
>
> Error - Use Rdisk [â€کname’] [/device] [size in blocks] [action]
> where action = T to terminate or R to recover
>
> I used it all the time to create a big RAM disk when I needed it, else
> small ones, without changing bootfiles.
>
> Looking at my old NitrOS-9 boots, circa 1996, the driver inside is
> called “Rammerâ€:
>
> Size: $0115 #277
> CRC: $3AB3AA
>
> The one included with NitrOS-9 today is also called Rammer, but it does
> not seem to honor the Rdisk utility. I plan to pull my old one out and
> use it, but wondered if anyone remembered what this was.
>
> Also, I note in my bootfile that a second descriptor called “MDâ€
> was in there using Rammer, but it was slightly smaller.
>
> R0 = 47 bytes
> MD = 33 bytes
>
> I have zero recollection of what /md was for.
>
> — A
Probably because you were out of the os9 neighborhood when I wrote that.
md is the descriptor that goes with myram, an automatic ramdisk I wrote
quite a while back. If it (md.dd) and myram (myram.dr) are in your
bootfile, and you issue a dir /md, there will be a slight pause, 200
milliseconds maybe, while it allocates the ram it needs and formats (does
not use the format command for this) a ramdisk whose size is determined by
one var in the descriptor, cyl. The dir command is held in sleep till this
is done, and then it wakes and dutifully reports an empty disk. The number
of cyl's is the number of 8192 byte blocks of ram it allocates. None of
the other placeholder vars in the descriptor are used.
Any access, even it the first access is a write, is held until the
automatic formatting has been done, and then the write will be done as you
requested.
The myram.README on my web page uses /r0 for the descriptors name, but
that clashed with the rammer/ro kit, so when it was added to the repo, the
descriptor was renamed to make it distinct from rammer. Tested at up to
about 1.7 megabytes of usable ramdisk on my 2 meg machine. I intended for
it to Just Work(TM) and I believe it does.
And when you are done, a simple deiniz /md returns every byte it used to
the free memory pool. Restarting it after changing the cyl to some other
value does not recover what was there when it was deiniz'd.
Enjoy Allen, I think you will like it.
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page <http://geneslinuxbox.net:6309/gene>
US V Castleman, SCOTUS, Mar 2014 is grounds for Impeaching SCOTUS
More information about the Coco
mailing list