[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PDP11 RSTS 7



>Note also that you can read the output to pp.txt or lp.txt immediately with
>another Windows app ... but not all of it; the last record isn't written to
>disk until you leave the sim. If you want to, e.g., put source code of a
>CUSP into your computer to look at with Word, you have to write some extra
>blank lines to the file afterward to fill out the record.


alan-

   i think the data is getting buffered by stdio.   try editing 
pdp11_lp.c and search for lpt_svc().   find the call to putc()
and put a call to fflush() if the char put is \n .... something like:

if (putc (lpt_unit.buf & 0177, lpt_unit.fileref) == EOF) {
        perror ("LPT I/O error");
        clearerr (lpt_unit.fileref);
        return SCPE_IOERR;  }
if ((lpt_unit.buf & 0177) == '\n') fflush(lpt_unit.fileref); /* NEW LINE */
lpt_csr = lpt_csr & ~CSR_ERR;


that should cause it to flush data to disk every time it puts a 
line-feed out.

there should prob. be a device flag that will call setvbuf() to
make the lp _IOLBF (line buffered).


chuck