home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / CEREBRUM / WAT9609.ZIP / ELIB / QMSG.C < prev    next >
Text File  |  1994-11-28  |  635b  |  41 lines

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