delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/18/20:20:46

Message-Id: <199704190008.AAA26796@mx2.rmplc.co.uk>
From: "Liam" <marl AT rmplc DOT co DOT uk>
To: "Michael Flegel" <FLEGEL AT physnet DOT uni-hamburg DOT de>
Cc: <djgpp AT delorie DOT com>
Subject: Re: spawning NASM from GCC?
Date: Fri, 18 Apr 1997 22:45:18 +0100
MIME-Version: 1.0

Michael Flegel <FLEGEL AT physnet DOT uni-hamburg DOT de> 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...)

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.
Each register only has ONE name, therefor the size
of the operation is indicated by .b, .w, .l after the instruction.
Example, the Amiga has 8 32-bit Data registers d0-d7. So
what ever the size of the operation, you use the same
register name, just indicate the size after the instruction.
move.w d0, d1
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'.

> Oh, and a related question: How do I make procs public in NASM, and how 
> do I include it in GCC? (extrn void _procedure(void) ??)
You would use [GLOBAL _PROCEDURE_NAME_]
Look at 'Cofftest.asm' and 'Cofftest.c' that come with NASM
for a good example of how to write your own procedures.
Liam

- Raw text -


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