Handy printer tricks with the S132 and CP/M #137
donfroula
started this conversation in
S-132 add-on for IMSAI & Cromemco replicas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This might seem obvious, but a handy CP/M trick when using the S132 CRT VIO device is to redirect printer output to the TTY device with:
STAT LST:=TTY:
Typing CTRL-P at the CRT console will copy anything typed on the console afterward to the TTY VT100 device. Typing CTRL-P again disables the echoing. Switching to the TTY device with the S132 keyboard shortcut allows viewing the output. This works for printing from other applications too. VT100 scrolling works in the TTY window to review the saved output.
Although the first serial port seems locked to the TTY console, it is possible to set the second serial port to device "UC1" at 9600 baud with the following lines in boot.conf:
UART1=9600,cs8
...
SIO2.portA.device=UART1
SIO2.portB.device=UART1
(Note if BOTH SIO2.portA.device and SIO2.portB.device are not set to UART1, the machine will crash when using device UC1 in CP/M.)
I have an Epson TMU325D serial 40 column receipt printer connected to the second serial port. I can send a text file to the printer with:
PIP UC1:=FILE.TXT
Unfortunately, the BIOS in the emulation does not support setting the LST: printer device to UC1 in the IOBYTE mapping. The following does NOT work:
STAT LST:=UC1:
In XYBASIC, a program can selectively print to the printer on the second serial port using the ASSIGN command to move the CON device under program control by manipulating the IOBYTE value.
10 PRINT "This line will print to the CRT console"
20 ASSIGN CON#3
30 PRINT "This line will print on the UC1 serial printer"
20 ASSIGN CON#1
30 PRINT "This line will print back on the CRT console again
The number in the ASSIGN command maps as follows for the CON device:
#0 - TTY:
#1 - CRT:
#2 - BAT:
#3 - UC1: (Serial port 2)
Regards,
Don
Beta Was this translation helpful? Give feedback.
All reactions