addon

Peter Johnson peter at tortall.net
Wed Feb 28 14:20:58 PST 2007


On Wed, 28 Feb 2007, pingved at gmail.com wrote:
> Yes, loop instruction use cx, loopw - ecx.

Yasm follows NASM behavior on this.  If BITS is 16, it uses cx by default, 
if BITS is 32 it uses ecx (and BITS=64, rcx).  To force use of ecx it's 
"LOOP label, ECX".

>> Is there a problem in accepting it?  There's nothing ambigious about this.
> I think any compiler must have strong syntax checking. For example 
> stupid borland compiler don't any request (warnings) for double function 
> prototype definitions. And then i port big source code to gcc i must 
> correct this 'errors'.

I suppose I could add a warning option to enable a warning for this.

It's offtopic, but duplicate identical function prototypes shouldn't be an 
error on any C compiler, although GCC might have an option for a warning 
on it.  (I believe the ANSI C standard says it's okay.)  Assembly, on the 
other hand, has no standard, so it's very assembler-specific on what's 
allowed where.

>> Are you expecting to see something in msg?
> Errors for example, but it shows in console, not this file. In linux 
> this problem for gcc may be correct by 'script' program. Can you fix 
> this for windows?

It looks like NASM has a -E option to specify an alternative file to 
output errors to.  I'll add support for this in Yasm.

Thanks,
Peter


More information about the yasm-devel mailing list