home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / hamradio / wattcp.zip / QMSG.C < prev    next >
Text File  |  1990-11-05  |  600b  |  42 lines

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