cv.c 447 B

123456789101112131415161718192021222324
  1. /* $Header$ */
  2. /*
  3. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  4. * See the copyright notice in the ACK home directory, in the file "Copyright".
  5. *
  6. */
  7. #include <stdio.h>
  8. unsigned memaddr = 0x100;
  9. main() {
  10. char buf[256];
  11. register i,len;
  12. while((len=read(0,buf,sizeof(buf))) > 0) {
  13. putw(memaddr,stdout);
  14. putw(0,stdout);
  15. putw(len,stdout);
  16. memaddr += len;
  17. for(i=0;i<len;i++)
  18. putc(buf[i],stdout);
  19. }
  20. }