home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 1: Collection A / 17Bit_Collection_A.iso / files / 223.dms / 223.adf / Source / kp.c < prev    next >
Text File  |  1988-07-25  |  1KB  |  46 lines

  1. /*
  2.  *      This is a debug library which interacts directly with the Serial
  3.  *      port. If you have Manx 3.6a, you don't need this - the same
  4.  *      functions are included in the standard library. - RRL
  5.  *
  6.  *      Functions are:
  7.  *                     kprintf(fmt, arg1, arg2,....);
  8.  *                                    kputchar(char);
  9.  *                                     kputs(string);
  10.  */
  11.  
  12. kprintf(fmt, args)
  13. char *fmt;
  14. int args;
  15. {
  16.         int kputchar();
  17.  
  18.         return(format(kputchar, fmt, &args));
  19. }
  20.  
  21. kputs(str)
  22. char *str;
  23. {
  24.         while (*str)
  25.                 kputchar(*str++);
  26.         kputchar('\n');
  27. }
  28.  
  29. #asm
  30.         public  _LVORawPutChar
  31.         public  _kputchar
  32. _kputchar
  33.         move.l  4,a6
  34.         move.w  4(sp),d0      ;make the 'w' an 'l' if using c32.lib
  35.         cmp.b   #$a,d0
  36.         bne.s   .1
  37.         jsr             _LVORawPutChar(a6)
  38.         move.l  #$d,d0
  39. .1
  40.         jsr             _LVORawPutChar(a6)
  41.         move.w  4(sp),d0
  42.         rts
  43. #endasm
  44.  
  45.