home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_07_02 / v7n2065a.txt < prev    next >
Text File  |  1988-09-15  |  826b  |  30 lines

  1. /* STRATEGY.C ** "Strategy" code as defined for device drivers.
  2.                                                         -- R.D.Allen, 9/4/87
  3. Copyright 1987, 1988 PARS Service Partnership
  4. */
  5.  
  6. #pragma    inline
  7.  
  8. #include    "rqh.h"
  9.  
  10. /*********
  11. *    NAME:    STRATEGY        (a far function)
  12. *     USE:    Store the address of the request header for later
  13. *            processing by DOSIO. This is the classic "strategy" routine
  14. *            as described in Device Driver manuals. DOS passes the request
  15. *            header and this routine saves it for DOSIO (the "interrupt"
  16. *            routine) to parse.
  17. *            Can be done in C with pseudo variables (but ASM is tighter): 
  18. *                ptr.address.offset = _BX;
  19. *                ptr.address.segment = _ES;
  20. *   INPUT:    void
  21. *  OUTPUT:    void
  22. *********/
  23.  
  24. void far strategy(void)
  25. {
  26. asm        extrn _ptr:near
  27. asm        mov    cs:Word Ptr _ptr,        bx
  28. asm        mov cs:Word Ptr _ptr + 2,    es
  29. }
  30.