View Full Version : Punch

March 8th, 2017, 03:46 PM
I've been working on a Friden Flexowriter, an interface for it and a conversion routine to convert ASCII to Flexowriter. I want to connect the Flexowriter to my CPM Machine. In fact I have done some simple communication with the Friden already. This brings up a question regarding how I'd change my CPM BIOS to accommodate the Friden typing machine or for that matter my Model 33 TTY. I suspect that the IOBYTE would be the way to use these devices. Since the Friden is so different, I had though that I'd use reader and punch. Is this as simple as placing my conversion routine in the punch of my BIOS and writing something to use the IOBYTE to swap devices?

Then just for my own curiosity, how was the punch/reader used to save/load programs? Did you have to make a *.com file, then just send it the punch. Then with some kind of BIN loader read it back into memory some time later? Thanks Mike

March 8th, 2017, 03:51 PM
A lot depends on how your BIOS is implemented, but as far as PIP is concerned, the devices PUN: and RDR: are the relevant ones.

If you're saving binary files, the usual format is .HEX, which includes a checksum in each record. With 7-level tape, you're going to have a problem trying to save 8-bit binary. :) Ordinary character files, of course can be saved directly. On TTYs, it was customary to end each line with CR-LF-RO-RO (rubout) to give the carriage time to do its thing.

March 8th, 2017, 04:00 PM
Even though I've been using CPM for a year or so, I'm still kinda green at this. I've used PIP to move files from drive to drive, but it sounds like I could PIP a drive file to the punch device. Whether it was the TTY tape or the Friden typing machine. This would not need the IOBYTE function at all? Thanks Mike

March 8th, 2017, 04:03 PM
Would this look like,



March 9th, 2017, 06:46 AM
OK, more reading. CPM has four logical devices, CON:, RDR:, PUN: and LST:, and 12 physical devices. But only the logical devices are defined in the BIOS. So, if I have my TeleVideo 920 connected at 9600 baud to CON:, how can I connect my ASR33 TTY at 110 baud to CON: ? The STAT command can switch the physical devices, but where would I change the baud rates?

Same goes for the printers I have. Currently I have an Epson FX86e connected at 9600 baud to LST:. I also have a Teletype Model 43 that runs at 300 baud, not to mention the Friden which is parallel.

So my question is, each logical device can be 4 different physical devices, but do these four physical devices have to be similar. That is all be serial or parallel, have the same baud rate, etal? Thanks Mike

March 9th, 2017, 08:32 AM
Nope, they can be wildly different. All that the BIOS requires is that they follow the usual calling and parameter conventions; output character in register C and input character in register A. It's nice if you can also furnish a "character ready" routine for input status, but it's not strictly necessary.

Note also, that IOBYTE allows for user-definable devices, such as UP1: and UP2: for special punches.

See the Alteration guide (http://www.gaby.de/cpm/manuals/archive/cpm22htm/ch6.htm#Figure_6-1) for details.

In the early days of CP/M, I had a Diablo Hitype I with the 12-bit OEM interface hooked to a parallel card. I wrote a BIOS driver to translate ASCII to "spin codes" and worked out "logic seeking" carriage movements, all for the list device. It wasn't that hard.