home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / IBM / IBM2FLPY / FL2TRACE.C < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  3.4 KB  |  90 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*static char *SCCSID = "src/dev/dasd/ibm/ibm2flpy/fl2trace.c, flp2, ddk_subset, b_bdd.032 93/03/21";*/
  13. /**************************************************************************
  14.  *
  15.  * SOURCE FILE NAME = FL2TRACE.C
  16.  *
  17.  * DESCRIPTIVE NAME = IBM2FLPY.ADD - Adapter Driver for ABIOS Diskette
  18.  *
  19.  *
  20.  *
  21.  * VERSION = V2.0
  22.  *
  23.  * DATE
  24.  *
  25.  * DESCRIPTION : Internal Trace Routines
  26.  *
  27.  *
  28.  *
  29. */
  30.  
  31. #define INCL_NOPMAPI
  32. #define INCL_NOBASEAPI
  33. #include <os2.h>
  34. #include <dhcalls.h>
  35. #include <strat2.h>     /* needed to keep reqpkt.h happy */
  36. #include <reqpkt.h>
  37. #include <scb.h>        /* needed to keey abios.h happy */
  38. #include <abios.h>
  39. #include <iorb.h>
  40. #include <addcalls.h>
  41. #include "fl2def.h"
  42. #include "fl2proto.h"
  43. #include "fl2data.h"
  44. #include "fl2trace.h"
  45.  
  46.  
  47. /*****************************************************************************/
  48. /*                                                                           */
  49. /*   Routine     : CreateTraceBuff                                           */
  50. /*                                                                           */
  51. /*   Description :                                                           */
  52. /*                                                                           */
  53. /*                                                                           */
  54. /*****************************************************************************/
  55.  
  56. VOID NEAR CreateTraceBuff()
  57. {
  58.    SEL   TraceBuffSel;
  59.    ULONG PhysAddr;
  60.  
  61.    DevHelp_AllocGDTSelector( &TraceBuffSel, 1 );
  62.  
  63.    DevHelp_AllocPhys( 65536, 0, &PhysAddr );
  64.  
  65.    DevHelp_PhysToGDTSelector( PhysAddr, 0, TraceBuffSel );
  66.  
  67.    TraceBuffPtr = MAKEP( TraceBuffSel, 0 );
  68.  
  69.    ClearTraceBuff();
  70. }
  71.  
  72.  
  73. /*****************************************************************************/
  74. /*                                                                           */
  75. /*   Routine     : ClearTraceBuff                                            */
  76. /*                                                                           */
  77. /*   Description :                                                           */
  78. /*                                                                           */
  79. /*                                                                           */
  80. /*****************************************************************************/
  81.  
  82. VOID NEAR ClearTraceBuff()
  83. {
  84.    OFFSETOF( TraceBuffPtr ) = 0;
  85.  
  86.    do { *((PUSHORT)TraceBuffPtr)++ = 0; } while( OFFSETOF(TraceBuffPtr) != 0 );
  87. }
  88.  
  89.  
  90.