home *** CD-ROM | disk | FTP | other *** search
/ PC Player 1995 August / PCPL0895.ISO / programm / noidle / no_idle.txt next >
Encoding:
Text File  |  1994-05-16  |  3.0 KB  |  66 lines

  1. How to disable entry into IDLE mode:
  2.  
  3. Many of today's newer ATA interface drives have automatic energy savings
  4. modes implemented by default. The drive's typically are designed to go into
  5. an Idle mode which reduces power consumption and parks the drive heads
  6. after a defined period of inactivity.  If the inactivity period continues
  7. to another defined interval, the disc drive will further reduce its power
  8. consumption by spinning down the platters and entering Standby mode.
  9.  
  10. When the drives are Idle or in Standby, any subsequent disc I/O will "wake
  11. them up" and enter Active Mode. This requires a modest amount of time that
  12. may not be desired.  Disc drive Power Management Commands control these
  13. features and can be used to enable, disable or change the activation
  14. intervals of the power saving modes.  A general command FBh is used to
  15. cause a drive to enter Active mode and set the Idle timer.  If the Idle
  16. timer is set to 0 then the power management mode is disabled until a cold
  17. boot.
  18.  
  19. The executable program required to do this is very small at 42 bytes.
  20. It can be created through the DOS Debug utility.  Two Debug script files are
  21. included, one for each drive:
  22.                              master =  no_idle0.scr
  23.                              slave  =  no_idle1.scr
  24.  
  25. At the DOS prompt simply type:
  26.                              debug <no_idle0.scr
  27.  
  28. This will cause the script file to be redirected into Debug with the
  29. following results (without the comments and the xxxx is system dependant):
  30.  
  31. -n no_idle0.com              program name
  32. -a 100                       assemble at memory location 100
  33. xxxx:0100 call 120           call the instruction at location 120
  34. xxxx:0103 mov dx,1f6         select the drive/head register
  35. xxxx:0106 mov al,a0          setup for drive 0 (b0 for drive 1)
  36. xxxx:0108 out dx,al          output to the port address
  37. xxxx:0109 call 120           wait while busy
  38. xxxx:010C mov dx,1f2         select the sector count/timer register
  39. xxxx:010F mov al,0           set it to 0 msecs
  40. xxxx:0111 out dx,al          output to the port address
  41. xxxx:0112 call 120           wait while busy
  42. xxxx:0115 mov dx,1f7         select the drive command register
  43. xxxx:0118 mov al,fb          setup the Active/Set Idle command
  44. xxxx:011A out dx,al          output to the port address
  45. xxxx:011B call 120           wait while busy
  46. xxxx:011E nop                no operation (slight pause)
  47. xxxx:011F nop
  48. xxxx:0120 mov dx,1f7         select the status register
  49. xxxx:0123 in al,dx           input from the port
  50. xxxx:0124 and al,80          isolate the busy bit
  51. xxxx:0126 jnz 120            jump if not zero to location 120
  52. xxxx:0128 nop
  53. xxxx:0129 ret                return (finished)
  54. xxxx:012A
  55. -rcx
  56. CX 0000
  57. :2a                          number of bytes to save
  58. -w
  59. Writing 0002A bytes
  60. -q                           as in quit
  61.  
  62. When finished, a very small no_idle0.com file will exist that can be run to
  63. disable the Idle mode.  The statement @no_idle0.com may be added to your
  64. autoexec.bat file.
  65.  
  66.