On 10-Sep-17 08:14, David or Jan Takle wrote: > Using the NOVA simulator, after every use of the printer it seems > necessary to escape to the simH console and DETACH LPT in order to > flush the rest of the simH buffer to the Windows file. Otherwise, the > file may be incomplete. > Is there another way to flush the buffer? By sending a particular > control character to LPT? Or raising a control line? (NIOP LPT for > example). > I would really like to accomplish this under program control rather > than having to interrupt the simulator manually. > Thanks, > ~David
This is a software issue in SimH, not something that code running under simulation can (or should) fix. Depending on the simulator, there can be two levels of buffering (plus whatever the simulated OS does). One is internal to the emulator - typically buffering up to a line waiting for paper motion or hardware buffer full. The other is the usual C RTL buffering. (You'd expect _IOLBF, which will flush when the simulator outputs a newline, but since it's a disk file, it's _IOFBF - fully buffered. How big that is is unpredictable. Plus WIN32 ignores _IOLBF...) It's not uncommon for the hardware buffer to be full, as paper motion is (somewhat counter-intuitively) often determined at the START of a line. (E.g. the sequence seen by hardware is <LF>text<CR> or <FF>text, or...) I don't recall what NOVA does. When I rewrote the LPT support for SimH to support PDF a several years ago, I included code to flush output to the printers when they go idle (for all output types). This was done for all the then-existent simulators. The code was not accepted (there was an infinite stream of 1+ requests & I ran out of patience), but exists in my SimH fork. However, I have not kept it up with SimH evolution; the effort to merge it into current sources is unknown; it's 4 years old & a quick look shows that fork is 1500 commits behind master...
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ Simh mailing list [email protected] http://mailman.trailing-edge.com/mailman/listinfo/simh
