www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/21/06:13:04

Date: Mon, 21 Apr 1997 12:06:15 +0000
From: Michael Flegel <FLEGEL AT physnet DOT uni-hamburg DOT de>
To: Leath Muller <leathm AT solwarra DOT gbrmpa DOT gov DOT au>
Cc: Liam <marl AT rmplc DOT co DOT uk>, djgpp AT delorie DOT com
Subject: Re: spawning NASM from GCC?
In-Reply-To: <199704202328.JAA03863@solwarra.gbrmpa.gov.au>
Message-Id: <Pine.VMS.3.91-b11-vms.970421120340.492F-100000@sat111.physnet.uni-hamburg.de>
Mime-Version: 1.0

On Mon, 21 Apr 1997, Leath Muller wrote:

> > > Because, frankly AT&T syntax is giving me the shits. I always
> > > thought that anything non-intel was better, but I don't think it's
> > > the case here. (Who ever heard of differentiating between movl,
> > > movw and movb, when it's obvious from the kinds of operands 
> > > you use...)
> 
> Just on this, whats the problem? If you know what your doing, you
> should be able to automatically insert the correct character...
>  
> > I don't like the PC AT&T syntax either, its too much of a
> > cross between Intel and the one I describe below.
> > The Amiga uses what is more like AT&T than Intel but
> > A LOT easier than that on the IBM PC.
> 
> I programmed the 680x0 range extensively, and found it extremely
> easy to move from the ol' defunct Amiga to AT&T on the PC...
> AT&T is _MUCH_ more closely related to Motorola syntax than
> Intel...
So I heard, but I never did program the Motorola

> 
> The architectures are completely different, so you have to expect
> completely different instructions, registers etc. Having segmented
> registers has its advantages on the PC - fixed point math can be so
> much easier on a PC simply because of this...
> 
> > which would move the word in register d0 into d1.
> > This all makes life easier when referring to memory
> > locations and constants, you don't have to use
> > 'WORD PTR'.
> 
> You don't have to use WORD PTR _AT_ALL_ under DJGPP. Forget about
> it. AT&T on the PC is extremely similar to Motorola syntax.
> 
> Motorola:
> 	mov.l	(a0), d0
> AT&T:
> 	movl	(%esi), %eax
> 
> Porting of code between the two is extremely easy, with the only
> problems occuring when you have used a lot of 680x0 registers. I
> would say you don't understand AT&T very well, or haven't bothered
> to learn it...
I understand it alright: I'm just used to intel, and AT&T is intel 
backwards: dest is the second operand and src is first. You have to use % 
every time, and have to classify a mov with l,w,b because the assembler 
can't figure it out for himself. ~~:-)

  MLF/SLi

;----------------------------------------------------------------------------;
;  Michael Lamar Flegel  ;  Student of Math and Physics in Hamburg, Germany  ;
;  Am Ehrenmal 2         ;---------------------------------------------------;
;  21516 Schulendorf     ;  www.physnet.uni-hamburg.de/home/vms/flegel       ;
;  Germany               ;  flegel AT physnet DOT uni-hamburg DOT de                    ;
;----------------------------------------------------------------------------;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019