/* clib.c   Stewart, December 17, 1981  11:47 AM   */

putstring(s)
  char *s;
  {
  while (*s) putchar(*s++);
  };

chav()
  {
  return(inbyte(0xfff2)&02);
  };

putnum(v, radix)
  int v, radix;
  {
  int digit;
  /* if radix is negative, signed, else unsigned */
  if (radix<0) {
    radix = -radix;
    if (v<0) {
      v = -v;
      putchar('-');
      };
    };
  if (v>=radix) putnum(v/radix, radix);
  digit = v % radix;
  if (digit>9) digit = digit + 'a';
  else digit = digit + '0';
  putchar(digit);
  };