home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / microcrn / issue_45.arc / TECHTP45.ARC / TECHTIPS.4 < prev   
Text File  |  1988-03-23  |  771b  |  21 lines

  1. /* Micro Cornucopia Magazine Issue #45 TECHTIPS Figure 4
  2.    Turbo C step rate code */
  3.  
  4. /* step.c - alters disk parameter table to vary floppy step rate */
  5.  
  6. #include <stdio.h>
  7. #include <dos.h>
  8.  
  9. const int step_rate = 0xef;                     /* 0xcf = 8 msec */
  10.                                                 /* 0xdf = 6 msec */
  11.                                                 /* 0xef = 4 msec */
  12.                                                 /* 0xff = 2 msec */
  13.                                                 /* 0xgf = 0 msec */
  14. main ()
  15. {
  16.   pokeb (0x00, 0x522, step_rate);    /* set new step rate in DPB */
  17.   _AH = 0x00;                                /* set up for reset */
  18.   geninterrupt (0x13);                /* reset floppy controller */
  19. }
  20.  
  21.