home *** CD-ROM | disk | FTP | other *** search
/ Super Net 1 / SUPERNET_1.iso / PC / OTROS / MSDOS / WATTCP / MSWATTCP.ZIP / ELIB / QMSG.C < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-25  |  723 b   |  43 lines

  1. /***
  2.  *
  3.  * File: qmsg.c
  4.  *
  5.  * 18-Jun-92 lr
  6.  *
  7.  * debugging messages... can be used inside interrupts
  8.  *
  9.  * I suspect it is not used anywhere - lr
  10.  */
  11.  
  12. static int far *screenptr = (int far *)0xB8000000L;
  13. void dputch( char x )
  14. {
  15.     if (x == '\n') screenptr = (int far *)0xb8000000L;
  16.     else *(screenptr++) = (x&0xff) | 0x700;
  17. }
  18. void dmsg( char *s )
  19. {
  20.     dputch('\n');
  21.     while ( *s )
  22.     dputch( *s++ );
  23. }
  24.  
  25. void dhex1int( int x )
  26. {
  27.     x &= 0x0f;
  28.     if ( x > 9 ) x = 'A' + x - 0xa;
  29.     else x += '0';
  30.     dputch( (char)x );
  31. }
  32. void dhex2int( int x )
  33. {
  34.     dhex1int( x>>4 );
  35.     dhex1int( x );
  36.     dputch(' ');
  37. }
  38. void dhex4int( int x )
  39. {
  40.     dhex2int( x >> 8 );
  41.     dhex2int( x );
  42. }
  43.