>>> I have never seen a RAMdisk that was not file-based
>> Maybe we have a misunderstanding here.. The driver itself
>> is of course a file, but the disk is a DOS block device,
>> so for DOS it is just a bunch of sectors. The DOS kernel
>> will then use those sectors as a FAT filesystem which can
>> contain files, sure, but the ramdisk itself has no idea
>> what a (FAT) file is. It only needs to provide an initial
>> state which looks like an empty formatted FAT filesystem.
> NO misunderstanding, and that is exactly what RDISK and other
> RAMdisk drivers do.   After setting RAM memory to an "initial
> state", a RAMdisk does memory-moves, not file transfers, with
> a one-to-one correspondence -- every DOS "read" or "write" to
> a RAMdisk causes exactly one XMS move request.   Thus, one is
> better-off viewing a RAMdisk as a FILE handler, rather than a
> "sector" handler.

Looking from DOS, the RAM disk is a block device. It doesn't handle data  
on a per-file basis; I don't understand why to call it a file handler  
then. It "handles" or provides sectors to DOS and that's it, so one is  
better off viewing a RAM disk as a sector handler. The "Phantom" RAM disk  
presented in the "Undocumented DOS" books was a file-based RAM disk: it  
hooked the redirector interface and provided the appropriate functions for  
each file. These files were stored in Phantom's own file system, in RAM.  
(Of course it makes more sense to use DOS's built-in file system driver,  
but the UDOS guys just did it to show how the redirector interface works.)  
Unless you recently changed RDISK to use the inferior redirector approach  
(that was a joke), it's still a block device as last time I looked at the  

What do you define as "DOS read"? Calling the "Read from file" DOS  
function? If that's the case then you're wrong, DOS usually calls block  
devices multiple times to read the FAT and the necessary sectors of the  
file's data to carry out such a request. If you meant "DOS read" as  
reading a single or some sectors from a block device, this is correct.


Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
Freedos-user mailing list

Reply via email to