[comp.sys.amiga.tech] A68k vs Lattice 'C'

BAXTER_A@wehi.dn.mu.oz (05/25/90)

In article <136136@sun.Eng.Sun.COM>, cmcmanis@stpeter.Eng.Sun.COM (Chuck McManis) writes:
> In article <2196@dsacg3.dsac.dla.mil> ( Michael S Figg) writes:
>>How does learning assembly on the Amiga with A68k differ from using the
>>assembler with Lattice 'C'? Are there substantial differences? Do I gain
>>much from using one over the other?
> 
> Well I don't know but I do know that Xoper which is supposed to assemble
> with the A68k assembler does _not_ assemble with the Lattice asm assembler.
>
 And I know that overscan which _does_ assemble with something _doesn't_
assemble with the Lattice asm assembler.

Regards Alan 

jcs@crash.cts.com (John Schultz) (05/26/90)

.



  I've used CAPE 2.0, Devpac 2, and Lattice's Asm.  Devpac is by far the
fastest to assemble.  CAPE 2.0 is a little slower than Devpac, and Lattice's
Asm is much slower than both.  An earlier version of Lattice's Asm did not
handle nested macros properly, but that has been fixed.  Lattice's Asm and
Manx's assembler are currently the only assemblers that support the
68020/030 and 68881/68882. Devpac is supposed to have an 020/030/881/882
version someday.  CAPE and Devpac have optimization options, but a good
programmer will already have done the optimizations. You can do pretty
much whatever you want with any of these assemblers; only personal taste
differentiates.  I prefer Devpac for it's speed and features, then CAPE
(which doesn't require a funky OPT directive for linking, as does Devpac),
then Asm. I have no choice but to use Asm for 020/030/881/882 code (using
define constants to get the 020/../ instructions is a hack). 
  So, if A68k does what you need, use it. If both assemblers you are
comparing are equal in featues, pick the faster.



  John
 

caw@miroc.Chi.IL.US (Christopher A. Wichura) (05/26/90)

In article <136136@sun.Eng.Sun.COM> (Chuck McManis) writes:
>In article <2196@dsacg3.dsac.dla.mil> ( Michael S Figg) writes:
>>How does learning assembly on the Amiga with A68k differ from using the
>>assembler with Lattice 'C'? Are there substantial differences? Do I gain
>>much from using one over the other?
>
>Well I don't know but I do know that Xoper which is supposed to assemble
>with the A68k assembler does _not_ assemble with the Lattice asm assembler.

Nor do many other things.  I have long since abandoned the Lattice asm due
to its bugginess (sp?).  It often complains that perfectly legal
instructions are invalid, etc.  When sending the source though anything
else, such as A68k or Cape v2.0, though, no errors are generated.  I have
also had asm assemble correctly, but produce a corrupted object file.  All
in all, the only time I use it is when I need a variable name of the type
'@name' as Cape (which I primarily use) chokes on Lattice regesterized
labels.  And even then I sometimes just use DEFINES during the BLink
phase...  Asm is also one of the slowest assemblers around, too.

So my advice to M. Figg:  Stay as far away from Lattice's asm as you
possibly can!

-=> CAW

/////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
                          Christopher A. Wichura

               caw@miroc.chi.il.us      (my amiga)         
               u12401@uicvm.uic.edu     (my school account)

Please! Do not send mail to my school account unless mail to miroc bounces.
    I often do not check uicvm.uic.edu for periods in excess of a week.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////////////

jesup@cbmvax.commodore.com (Randell Jesup) (05/26/90)

In article <2812@crash.cts.com> jcs@crash.cts.com (John Schultz) writes:
> Lattice's Asm and
>Manx's assembler are currently the only assemblers that support the
>68020/030 and 68881/68882. Devpac is supposed to have an 020/030/881/882
>version someday.

	Cape V2.5 has '020/'030 (and I think '881/2) support.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"

jcs@crash.cts.com (John Schultz) (05/27/90)

In article <11834@cbmvax.commodore.com> jesup@cbmvax (Randell Jesup) writes:
>	Cape V2.5 has '020/'030 (and I think '881/2) support.

  I just checked, I've got CAPE version 67, release 2.5. It didn't handle
a simple muls.l d0,d1 (invalid addressing mode was the error). I talked to
Inovatronics a few months ago, and it didn't sound like an 020/030 version
was to appear anytime soon. They suggested using dc's to get the necessary
instructions.


  John
 

a218@mindlink.UUCP (Charlie Gibbs) (05/28/90)

In article <1551.AA1551@miroc.Chi.IL.US> caw@miroc.Chi.IL.US
(Christopher A. Wichura) writes:

>                                                                  .... All
>in all, the only time I use it is when I need a variable name of the type
>'@name' as Cape (which I primarily use) chokes on Lattice regesterized
>labels....

The latest version of A68k can also handle labels such as @name
(a local Lattice user asked for the feature).  Version 2.61 can
be found on Fish disk #314.

Charlie_Gibbs@mindlink.UUCP
I'm trying to develop a photographic memory.

wilker@descartes.math.purdue.edu (Clarence Wilkerson) (05/28/90)

I had some questions about using A68k as a cross-assembler on non-amiga
systems.
I got it to run ok on a SUN system. However on my IBM 
PC under Turbo C, it choked at places where space was Malloc'ed in a big
block, and then freed in smaller pieces, using free(ptr) where ptr was not a
pointer returned by a call to malloc. My real wonder is why the code works on
the Unix system... manual pages claim you can only free stuff allocated by
malloc. I don't know what behavior is standard on Amiga systems. Anyway, it
works pretty well otherwise, and it's nice to have the source.
  Another question is if the original modula 2 source for the Dr. Dobbs
68k assembler is available on line somewhere? I wanted to hack it to 
Turbo Pascal....
Clarence Wilkerson

mapjilg@gdr.bath.ac.uk (J I L Gold) (05/29/90)

In article <2812@crash.cts.com> jcs@crash.cts.com (John Schultz) writes:
>.
>
>
>
>  I've used CAPE 2.0, Devpac 2, and Lattice's Asm.  Devpac is by far the
>  etc etc...
>68020/030 and 68881/68882. Devpac is supposed to have an 020/030/881/882
>version someday.  

They do now! There is a Devpac Proffesional package out now, at a much higher
price, it has to be said.

> etc etc...
>programmer will already have done the optimizations. You can do pretty
>much whatever you want with any of these assemblers; only personal taste
>differentiates.  

Well just try the equivalent of INCBIN with either Lattice OR current versions
of A68k (I've mailed Charlie Gibbs, the author, and he's said the next version
will have it.)

>  John
> 


-- 
#  J.Gold                            |    mapjilg@uk.ac.bath.gdr               #
#  University of Bath , UK           |    jilg@uk.ac.bath.maths                #

jcs@crash.cts.com (John Schultz) (05/31/90)

In article <1990May29.122539.18550@gdr.bath.ac.uk> mapjilg@gdr.bath.ac.uk (J I L Gold) writes:
[stuff deleted, refering to 68020/30 assemblers]

>They do now! There is a Devpac Proffesional package out now, at a much higher
>price, it has to be said.

  Cool, what's the cost?

>Well just try the equivalent of INCBIN with either Lattice OR current versions
>of A68k (I've mailed Charlie Gibbs, the author, and he's said the next version
>will have it.)

  Ok, just write a little program to convert binary to dc's :-). Devpac's so
fast that even large iff images are quickly assembled. Of course INCBIN is
still a nice feature.


  John

markv@kuhub.cc.ukans.edu (06/01/90)

> How does learning assembly on the Amiga with A68k differ from using the
> assembler with Lattice 'C'? Are there substantial differences? Do I gain
> much from using one over the other?

Well, in terms of the actual assembly code, not much.  On the other
hand, Lattice uses mostly their own Psudeo-ops and doesn't support all
of the standard ones.  So most PD Assem code wont assemble directly
since most of it uses standard ops (the de-facto standard being the
original Metacomo assembler).  A68k does support these formats.

On the other hand the Lattice Assembler provides many directives aimed
at making interfacing to C code a lot easier (like MASM on a PC) and
fully supports 68000/10/20/881/882 instructions which is useful if you
want to do chip specific things (like cache control, VBR, or inline
floating point).

Recommendations?  If you are doing straight assembly and want to be
able to use existing PD code, use A68k.  If you are writing primarily
to link with Lattice C or need the extra instruction support, use
Lattice's.  (Note you can use both, everything will BLink just fine,
its just with A68k its completely up to you to get calling/caller
conventions etc correct).
 
> Thanks, Mike
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  markgood	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~