home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / MSOFT / MSFTNW-1.MAR < prev    next >
Text File  |  2000-06-30  |  2KB  |  39 lines

  1.  
  2.                    --------------------------------
  3.                          MICROSOFT NEWSLETTER
  4.                            MARCH-APRIL 1982
  5.                    --------------------------------
  6.  
  7.    How do Microsoft Products Interface with CP/M Disk Files?  We've 
  8. had a lot of requests for more information regarding the manner in 
  9. which Microsoft products function with CP/M when dealing with files.  
  10. In the next few months we'll attempt to explain in detail how we deal 
  11. with various types of files. First, a few ground rules: We're going to 
  12. discuss version 2.2 and later of CP/M.  Older versions (or the so 
  13. called "look-alikes", including MP/M,) may behave differently! We'll 
  14. begin with a review of CP/M's disk allocation schemes. While most of 
  15. the disk file access routines are up to the manufacturer of the 
  16. particular system you're using; there are some basic facts to keep in 
  17. mind.  The most important is that CP/M ALWAYS deals with files as 
  18. collections of 128 byte records.  CP/M ALLOCATES files in larger 
  19. blocks, which may range from 256 bytes to 16K bytes.  This "block" is 
  20. the smallest unit of disk space that CP/M will allocate for any file. 
  21. Finally, there is a unit of storage called an "extent", which is a 
  22. multiple of the minimum allocation.  For example, with a 1K 
  23. allocation, the extent size might be 16K. When you run the CP/M 
  24. program STAT (type STAT *.*), the program will tell you the size of 
  25. each of the files on your disk, in terms of the number of records, the 
  26. number of extents, and the size of the file in bytes (always a 
  27. multiple of the minimum allocation block). CP/M handles the "mapping" 
  28. of physical sectors to logical 128 byte records through a 
  29. "blocking/deblocking" algorithim, which can be treated as a "black 
  30. box" for all but the most esoteric applications. Finally, when we 
  31. start trying to compute how much space we have remaining on a given 
  32. disk; we're also limited by the number of "directory entries";  since 
  33. the CP/M system allocates a fixed space on the disk for the directory.  
  34. To obtain information about the physical characterisics of your 
  35. particular disk system you can use the STAT DSK:  command. I hope this 
  36. provides a good introduction to the CP/M file system.  Next month, 
  37. we'll discuss sequential files and how they are handled by MBASIC, 
  38. FORTRAN, and COBOL.  
  39.