Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!cbmvax!daveb From: daveb@cbmvax.UUCP Newsgroups: comp.sys.amiga Subject: Re: Need help with printer driver Message-ID: <1650@cbmvax.cbmvax.cbm.UUCP> Date: Thu, 9-Apr-87 08:18:06 EST Article-I.D.: cbmvax.1650 Posted: Thu Apr 9 08:18:06 1987 Date-Received: Sat, 11-Apr-87 11:33:17 EST References: <457@unisec.USI.COM> Reply-To: daveb@cbmvax.UUCP (Dave Berezowski GUEST) Distribution: comp Organization: Commodore Technology, West Chester, PA Lines: 39 Keywords: printer driver Aztec Manx link howjadoit? In article <457@unisec.USI.COM> mark@unisec.USI.COM (Mark Rinfret) writes: $preparations for building my own Epson LQ-800 printer driver. I had $been waiting for Aztec C V3.4 which allows me to create printer drivers. $Really! It says so, right in the book! And that's all it says! GRRRR! $ $The first problem I encountered was with an undefined PrinterSegmentData $which is XREF'ed in printertag.asm, but has no other references. So, $I commented out the XREF. I compiled with the +A option to force $longword alignment. My problems lie with the linking process. I suspect $that there is a well-known (but not revealed to me) process for linking $device drivers that probably involves a flag or two and a magic library. $Right now, I'm getting some symbol overrides (library base pointers) and $an undefined _main(). I suspect that if I was doing things right, the $reference to main wouldn't be generated, right? I'm currently linking $with c.lib. Is there some other library (amiga.lib?) that I should use $or a different startup file that I'm supposed to include? $ I have successfully written a printer driver under Manx. 1. The XREF can be commented out. 2. You have use the compiler +B option to tell the system that you don't want a 'public .begin' generated. This will get rid of your _main problem. 3. Unless you REALLY know what you doing (and up against) I HEAVILY recommend that you use the large code/data option. If you don't be warned that you'll have to write little stub interface routines for those routines that get called by the system (ie. Render, DoSpecial, Open, Close, and Expunge). This is necessary as the small module uses A4 for data references. ie. You'll have to save A4, init A4, call the specific routine, restore A4. You'll ALSO have to save/restore A6 before/after calling the specific routine. By now you've probably guessed that my printer driver was written using the small code/data option. 4. The first object file should be printertag.o. Good luck! (At least now you know it CAN be done).