#include "exec/types.h"
#include "libraries/dos.h"
#define QUIT 0x51 /* uppper chase "Q" key */

extern struct FileHandle *Open();

main()

 { 
  char userinput[256];
  int howmany,j;
  struct FileHandle *dos_fh;

  dos_fh = Open("RAW:10/10/500/150/New Window",MODE_NEWFILE); /* open console */ 
  for(;;)
  {
   howmany = Read(dos_fh,userinput,255);
   userinput[howmany] = '\0';
   printf("Just got %ld values:\n",howmany); /* mogelijk meer dan 1 value */
   printf("Value stream was: ");
   for(j=0;j<howmany;j++) printf("%lx",userinput[j]);
   printf("\n");
   if(userinput[0]==QUIT)break;
  };

  Close(dos_fh);

 }


