Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!ut-sally!husc6!mit-eddie!ll-xn!cit-vax!oberon!sdcrdcf!trwrb!cadovax!kaz From: kaz@cadovax.UUCP (Kerry Zimmerman) Newsgroups: comp.sys.amiga Subject: Printer drivers and Aztec 3.04a Message-ID: <1522@cadovax.UUCP> Date: Mon, 4-May-87 15:57:13 EDT Article-I.D.: cadovax.1522 Posted: Mon May 4 15:57:13 1987 Date-Received: Wed, 6-May-87 04:47:27 EDT Reply-To: kaz@cadovax.UUCP (Kerry Zimmerman) Organization: Contel Business Systems, Torrance, CA Lines: 32 Keywords: Aztec 3.04a Printer Driver Summary: Problem with compiler not preserving register A6 [] I ran into a problem this weekend converting an Epson LQ800 printer driver to Manx Aztec 3.04a. I have read the recent notes posted by others describing their efforts in this area. No one seems to have mentioned what I ran into. I compiled the driver with no problem using the +BCD compiler options and linked it with the cl32.lib. The driver worked fine until graphic printing was finished, at which point the system GURUed. I eventually isolated the problem by using the +AT option to get the assembly source for render.c. What I determined (using DB) was that register A6 is used by render, but not saved and restored before and after the routine. As a result, the printer.device who calls render, and who expected A6 to be preserved, crashed. I solved the problem (with a bandaid) by adding some assembly code to save and restore A6 at the entrance and exit of render. My question is shouldn't A6 have been protected automatically by the compiler? The compiler does preserve D2 and D3, why not A6? Is there another option I should have used? Is there anyway to make A6 be the frame pointer (like in lattice) instead of A5? This seems necessary since the printer.device was probably created with lattice, and assumes A6 will be the frame pointer. Thanks for any help. Kerry Zimmerman # {ucbvax,ihnp4,decvax}!trwrb!cadovax!kaz # cadovax!kaz@ucla-locusre the