PDA

View Full Version : Printing with CP/M?



RichCini
May 29th, 2013, 01:40 PM
All --

I've made some progress on my IMSAI in the last two weeks. I got a second serial board working (an Interfacer 1) for use with a modem and a printer. Using a customized Modem37, I can now connect to a demo Mystic BBS using an old Hayes Smartmodem 300. Yay! No files, but at least "CONNECT 300".

The next thing I want to get working is a serial printer. I know that the serial port itself works (using a loopback test program). I've also added code to my CBIOS for the printer, but I'm not quite sure how to test it. I can describe what I've done and maybe someone can point me to where I may have gone wrong.

The first test was using LLIST in BASIC. That didn't work. The next test was to PIP a file to the printer using "PIP LPT:=TESTFILE.DOC". That didn't work either, although there was disk activity. I also tried to set the IOBYTE using "STAT LST:=LPT:" but when you do "STAT VAL:" it lists the four devices with all four options next to them in the same order so I don't know how to interpret that.

Any ideas or tips would be appreciated. I can share the relevant CBIOS code as well. I feel that I'm close and just need a nudge in the right direction. Thanks!

Rich

RickNel
May 29th, 2013, 02:20 PM
Are you sure you a re-directing to the correct serial port, not a parallel port? LPT: may be parallel by default.

Rick

leeb
May 29th, 2013, 02:40 PM
Unless you specifically built the LPT driver section you would need to set LPT to the serial port you intend to use...
Otherwise, LST: would NORMALLY be a parallel port driver.

RichCini
May 29th, 2013, 05:26 PM
Thanks guys. My CBIOS had the appropriate serial code in the LIST and LISTST routines which I believe is the correct way to link the driver into CP/M. Based on Rick's query, I looked at the code again and it turns out that I had the wrong port numbers. So, it works now when I connected a second serial terminal to the port to capture the output.

The next issue is that I don't have any serial printers. So, I'm trying to use a Practical Peripherals Microbuffer Universal which does serial-parallel conversions with an IBM dot matrix printer. Right now, that doesn't work. I'm using a 25-pin straight-through cable, but I probably need to look into it more. Maybe it's not truly 25-straight through.

Thanks again.

leeb
May 29th, 2013, 06:28 PM
Check pins 2 and 3 to see if it is straight-thru...
If 2 does NOT go to 2, then the rest will not be right either.

TX_Dj
May 30th, 2013, 06:23 AM
Assuming the CBIOS is all set up correctly, you can also press ^P and anything from that point until you press ^P again will go out to the printer.

Otherwise if you're just looking to print a file, you can `PIP LPT:=A:FILE.TXT` or such.

RichCini
May 30th, 2013, 05:12 PM
Assuming the CBIOS is all set up correctly, you can also press ^P and anything from that point until you press ^P again will go out to the printer.

Good to know. I know the DOS has something similar but I didn't realize CP/M did too. I'll give that a try as a quick and easy test. I also tested the cable I'm using and it's 25-pin straight through. I don't know if that's what it should be, though -- the serial converter manual isn't specific. I might dig out a plain serial cable this weekend.


Otherwise if you're just looking to print a file, you can `PIP LPT:=A:FILE.TXT` or such.

This is what I was testing with. Works great.

RichCini
May 31st, 2013, 06:10 PM
Ok, here's the conclusion of my work on this. Printing now works fine through the PPI Microbuffer (serial->parallel converter) and the CompuPro Interfacer I.

I had the Interfacer port configured for "Terminal/printer" per the manual, which NULLs the RX/TX and handshaking lines. The Microbuffer port interface is probably configured as a DCE (not specified in the manual) because on a lark, I put a null-modem adapter on the cable and it worked. So, I changed the configuration jumper on the Interfacer port to "MODEM" and connected the Microbuffer to the Interfacer directly with a 25-pin all-lines cable and it worked perfectly.

So, I'm good to go. Thanks to all for the gentle nudges that got me there!