Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Peter Norton Programmer's Guide - Norton Guide http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]

  Although this chapter has included detailed information for direct use of
  the logical structure of the disk itself, including the boot sector, FAT,
  and directories, it is not a good idea to use these elements directly
  unless you have a compelling reason. In fact, except where such use is
  completely unavoidable, as in a copy-protection program, it's unwise to
  incorporate any knowledge of the disk format in your programs. On the
  whole, your best approach is to consider the standard hierarchy of
  operations and use the highest level of services that can satisfy your
  needs:

  .  First choice: Language services (the facilities provided by your
     programming language; for example, BASIC's OPEN and CLOSE statements)

  .  Second choice: DOS services (described in Chapters 16 and 17)

  .  Third choice: ROM BIOS disk services (described in Chapter 10)

  .  Last choice: Direct control (for example, direct programming of the
     disk-drive controller through commands issued via I/O ports)

  Most disk operations for the PC family can be handled quite easily with
  the services that your programming language provides. There are, however,
  two obvious circumstances that can call for more exotic methods. One,
  which we've already mentioned, occurs when your programming involves
  control of a disk on the same level exercised by DOS. This level of
  control would be called for if you were writing a program similar to DOS's
  CHKDSK or the Norton Utilities. The other circumstance involves copy
  protection. In one way or another, all diskette copy-protection schemes
  involve some type of unconventional diskette I/O. This type of control
  usually leads to the use of the ROM BIOS services, but may also lead to
  the extreme measure of directly programming the disk-drive controller
  itself.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson