WIN-PRINT is built into HTBasic. If a default Windows printer is available, WIN-PRINT will be loaded and assigned to ISC 10 automatically. WIN-PRINT supports OUTPUT, CONTROL, and STATUS (but not ENTER, READIO, WRITEIO, ON INTR, and ENABLE INTR).
Selecting a Printer
Printing normally occurs through the Windows Print Manager (ISC 10), but HTBasic supports direct printing through ISC 26. This is helpful when sending escape codes to a printer that the print manager normally removes from the print command.
A new print job begins on an ISC after:
PRINT, LIST, or CAT with PRINTER IS Isc
OUTPUT Isc
The first point is plotted with PLOTTER IS Isc
DUMP GRAPHICS with DUMP DEVICE is Isc
A print job ends after:
CONTROL Isc,111;1 (flush)
RESET Isc
PLOTTER IS Isc with PLOTTER IS Isc
PRINTER IS Isc with PRINTER IS Isc
DUMP GRAPHICS with DUMP DEVICE IS Isc
CAT or LIST with PRINTER IS Isc
To send data to a different printer, change the default printer using the Device Setup dialog or use CONTROL register 102 to access the Printer Setup dialog. You can also change the orientation (portrait or landscape) of the print job, . If the printer does not support the current margin settings, they are automatically adjusted. The following statement causes a Printer Setup dialog box to pop-up.
CONTROL 10,102;1 ! Let user choose printer
Printing to the Printer
Example:
ASSIGN @Prn TO 10 ! Assign an I/O Path
OUTPUT @Prn;"PI = ";PI ! Now use the I/O Path
! Insert other printer statements here
ASSIGN @Prn TO * ! End of print job, print it
END
Windows Print Manager collects printer output into "jobs." and only prints when the job is done. You signal that your print job is done by closing the I/O path as above, or by changing the PRINTER IS device, executing RESET, resetting the interface through control register 0, or writing a value to control register 111. For example: