[comp.sys.amiga] Making a Printer Driver with Lattice C 4.0

marks@csd4.milw.wisc.edu (Mark Spankus) (02/09/88)

["Line Eater Fodder" by Justin Case :-)]


Hi Net-Amigoids!
 
     I've a problem that I can't figure out.  After a month of thinking 
about it, playing around trying to make it work a different way, thinking
some more, trying older compilers, assemblers, linkers, etc...Well, you
get the general picture.

     HAS ANYONE GOTTEN A PRINTER-DRIVER TO COMPILE, ASSEMBLE, AND LINK
USING Lattice C 4.0 AND Asm 4.0?

     I am trying to get as complete a printer driver as possible made for
my Toshiba P321SL printer.  After going through all the motions (using the
examples provided in the "RKM: Libraries and Devices") I tried to make it
all work.  So, first I try to use ASM on the .asm pieces (printertag, init,
and pwait).  ASM comes back and screams bloody murder in any of these that
uses the SECTION feature.  It accepts the first reference, but then isn't
happy if it encounters the same name thereafter.  To illustrate:


...   SECTION PRINTER
      
      "code stuff"

      SECTION PRINTER,DATA

      "data defns"

      SECTION PRINTER,CODE

      "code stuff"

When ASM sees this, it screams about duplicate section names.  As I under-
stand SECTION, that's what we want.  I want it to start with code, pause
a little for data, and then put more code right after the previous code
section (implicit by the first SECTION).  Is this right?  What am I doing
wrong?

	So, facing this, I scrounge up an old copy of the MetaComCo ASSEM
and use it.  It gets through without complaing about anything.  I think,
ALL RIGHT!  Now on to the C portions.  Lattice C 4.0 compiles my little
pieces without a hitch.  Things are now looking up.  Now we go on to
BLINK 7.2.  I first tried to link together all the parts in addition to
astartup.obj from the assembler (in the specified order) and use the new
amiga.lib and lc.lib from Lattice.  It didn't work -- plus a whole bunch
of things were undefined.  So, I try to use c.o instead of astartup.o.
Now most things are defined, but it's still no go.  Then I tried an old
version of Blink (6.7).  Nope.  Then I tried all old software.  Still
nada.  I'm really confused.  Results were among the following, I don't
remember which caused which:

     Unknown Data Type 255  (or something close to that)
     Symbol _PD unmerged    (see above)
     GURU                   (this was always a fun one)

There may have been others.  Everything dies at linking time.  So, in
conclusion, does anyone know what's up?  Am I forgetting switches,
syntax, etc. that I should be using?  If nothing is obvious (I know this
isn't presented the most lucidly) can some kind soul EMail me a driver
(I don't care what printer) that they successfully put together with
Lattice C 4.0, Asm 4.0 and Blink 7.2?
 
Desperately yours,
 
       MDS

=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Mark Spankus              New Tourism Motto: "Wisconsin, you're among Fiends"
-----------------------------------------------------------------------------
Internet: marks@csd4.milw.wisc.edu  Uucp: {uwvax|ihnp4}!uwmcsd1!uwmcsd4!marks 
Csnet:	  marks%uwmcsd4@uwm  
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=