[comp.sys.amiga.tech] Sample printer driver

dwl10@uts.amdahl.com (Dave Lowrey) (01/19/90)

I have been trying to compile/assemble the sample EpsonX printer
driver that is listed in the "RKM: Libraries and Devices" manual, and
I have had several problems.

First, the file printertag.asm has the following line:
        XREF    _PrinterSegmentData

The linker can't resolve this reference. Since the code makes no
reference to this label, I just took out the XREF.

Second, I am using Manx to compile the C code. What compile flags
do I need to use? I have use +p +B +D +C, and all I get is a visit
from the GURU (codes 0000000A or 00000004). The Lattice flags
that they say to use are -b0 -d0 -v.

I made sure that printertag is the first file to be linked (It
contains the PED). I verified with a disassembler that it is indeed
the first module in the file.

Any suggestions????

-- 
"What is another word  |  Dave Lowrey    | [The opinions expressed MAY be
 for 'Thesaurus'?"     |  Amdahl Corp.   | those of the author and are not
                       |  Houston, Texas | necessarily those of his
   Steven Wright       |  amdahl!dwl10   | employer]   (`nuff said!)

kent@swrinde.nde.swri.edu (Kent D. Polk) (01/19/90)

In article <25ea02JB80q901@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com (Dave Lowrey) writes:
>I have been trying to compile/assemble the sample EpsonX printer
>driver that is listed in the "RKM: Libraries and Devices" manual, and
>I have had several problems.
>
>Second, I am using Manx to compile the C code. What compile flags

The 1.3 RKM? If not, go purchase the 1.3 Developer's kit for $@0 I
believe & get the 1.3 source. Much better than pre-1.3.

Secondly, I am working on the last problem with my Prowriter printer
driver (correctly flushing buffers on an abort), and have been through
this also...  I tried for some time to get a driver to link properly
with Manx; had some limited success, but essentially couldn't get the
printer device to correctly call my functions with parameters. Wrote
some stubs which got several of them working, but finally gave up and
went back to Lattice 3.02 (Actually my old 3.03, but it was too buggy &
borrowed a friend's copy of 3.02 which mostly worked). Anyway, I think
I may still have some of those stubs around, but I was shooting in the
dark & don't think they would really help that much. Also, to assemble
the .asm files, I used the MetaComco assembler (another friend) since
it worked with Alink :^)

If you get the Manx stubs working, send me a note - I'd like to rework
the driver for Manx also, just for grins.

====================================================================
Kent Polk - Southwest Research Institute - kent@swrinde.nde.swri.edu
        Motto : "Anything worth doing is worth overdoing"
====================================================================

valentin@cbmvax.commodore.com (Valentin Pepelea) (01/19/90)

In article <25ea02JB80q901@amdahl.uts.amdahl.com> dwl10@uts.amdahl.com
(Dave Lowrey) writes:
>
>        XREF    _PrinterSegmentData
>
>The linker can't resolve this reference. Since the code makes no
>reference to this label, I just took out the XREF.

Either this will not hurt at all, or you forgot add a file to the compilation
process.

>Second, I am using Manx to compile the C code. What compile flags
>do I need to use? I have use +p +B +D +C, and all I get is a visit
>from the GURU (codes 0000000A or 00000004). The Lattice flags
>that they say to use are -b0 -d0 -v.

-b0:	Use absolute addressing. (full 32-bit pointers for all data references)
-d0:	Don't add any debugging information
-v:	Don't add any stack checking code

If you don't set the equivalent of -v and -b0 with the Manx compiler, you are
guaranteed to get Guru's all the time.

Valentin