How printers work on the SimH NOVA.exe.
Printers on SimH do not connect to any real device. Instead, all output is written to a host TEXT file. You can then open the file on the host and print it if necessary.
No file needs to be pre-defined for a printer. Just tell SimH what you want to call the file and it will build it for you. For example:
sim> ATTACH LPT sim-printer.txt
will create the file ‘sim-printer.txt’ and connect it to NOVA.exe.
We have written a driver for IRIS called $LPT.SIM which is distributed on the LU0’s on our download page. You can open it in a basic program and print to it just like any other printer:
10 OPEN #0,"$LPT.SIM" 20 PRINT #0;"THIS IS A LINE OF TEXT" 30 CLOSE #0
Please note that SimH usually buffers the output to its LPT device, so your file “sim-printer.txt” many not always contain the last few bytes you printed. You have to disconnect it in order to flush the buffer. Then you can use the file on the host system.
sim> DETACH LPT
The nice thing about this is that you can use $LPT.SIM to export any text file to the host system. See the Basic program “EXPORT” for an example.
Handling End-of-Line characters
On Windows, all text lines end with two bytes, <return><line-feed>.
On IRIS, lines only end in <return>.
So during printing, $LPT.SIM has been written to append a <line-feed> to all <return> characters.
If your host is not Windows and handles things differently, you may need a different driver. If you do not know how to create one, let me know.