dzzr@beta.UUCP (05/06/87)
I recently stuck an external modem on my old Northstar, using the second of its two serial ports. I then constructed a parallel cable, removed the serial interface card from the Epson MX-80, and modified my LifeBoat Associates CP/M 2.21 using MOVCPM and SYSGEN to tell the system that the printer was now on the parallel output port. What reached the printer was (seemingly) bit-shifted garbage. The handshaking worked fine, but I suspect that the printer driver in my CPM is fouled. I then wrote a little 8080 test code to send characters to the parallel output port, and it worked fine. I would like to modify my USER.ASM file to include a parallel port driver that I know works, but I don't know how to patch the user stuff into CPM after I'm done. Can anyone out there in NETLAND help? (Keith, are you listening?) Thanks in advance for all the good help.... --Doug Roberts
kenw@noah.arc.CDN.UUCP (05/08/87)
Patching the stuff in is (should be) trivial. It's a matter of reassembling your BIOS with the appropriate device handler stuff included. Since you appear to know 8080 assembler and how to handle a parallel port, the rest should be easy. I ASSUME you have the BIOS source. Without it you're stuck. At the very beginnning of BIOS are a bunch of CALL instructions. These are the standard BIOS entry points for all the things the BIOS does. I don't have my books here, so I can't tell you exactly which one it is. Your listing should have it commented/labeled as LSTOUT or some such. The character to be printed will be expected in a register, probably C. Your LSTOUT routine should wait until the printer's not busy, send the character, and return. I don't think return status is important here. As I said, you really need your BIOS listing. Read the existing code to see what it does, following the path from the entry point at the top. It also helps to have access to a CP/M Internals book. One of the best (I can't remember the title) was written by Donald Cortesi of Dr. Dobb's Journal. All you really need are the BIOS entry point and register-handling conventions. You MIGHT want to worry about the USTAT byte for device redirection (via STAT), but I never bother with that. Good luck. /kenw