www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/06/18/03:32:22

Message-ID: <3D0ED3B3.9090801@attbi.com>
From: oldCoder <tinstaafl AT attbi DOT com>
Organization: Programming and Network Administration
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2
X-Accept-Language: en-us
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: djasm: size of immediate unknown error message
References: <1024181369 DOT 484336 AT queeg DOT ludd DOT luth DOT se>
Lines: 47
NNTP-Posting-Host: 24.128.41.67
X-Complaints-To: abuse AT attbi DOT com
X-Trace: rwcrnsc51.ops.asp.att.net 1024381870 24.128.41.67 (Tue, 18 Jun 2002 06:31:10 GMT)
NNTP-Posting-Date: Tue, 18 Jun 2002 06:31:10 GMT
Date: Tue, 18 Jun 2002 06:31:10 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

If I'm not mistaken (and I very easily could be), djasm, like gas, uses 
the AT&T syntax, and an intrinsic part of that syntax is appending the 
data type onto the mnemonic.  My guess is that the maintainers of both 
programs overlooked error messages pertaining to data type because it's 
such a basic part of the syntax.  I'm no assembler expert, by the way; 
the last time I wrote serious assembly was on the Z80 and the PDP-11. 
What _hasn't_ changed is that error messages don't tell you much about 
your error.  I think it's because of Murphy's Law.

					-Phil

Martin Str|mberg wrote:

> Consider this very simplistic asm program:
> 
>         .org 0x100
> start:
>         mov [var], 0
> 
>         ret
> 
> var:
>         .dw 0
> 
> and the assembling:
> 
> nietzsche:~/djgpp> lfn.1/djasm djasm.error_message.1.asm djasm.error_message.1.com djasm.error_message.1.map
> djasm.error_message.1.asm:3: parse error, expecting `REG8' or `REG16' or `REG32' or `SREG'
> djasm.error_message.1.asm:3: Last token was `0' (NUMBER)
> djasm.error_message.1.asm: 1 errors
> 
> The error is because djasm doesn't know the size of var. If I use
> "movb", movw" or movd" instead of "mov" all is fine.
> 
> Now, this error message is pretty hard to understand, until you are
> aware of djasm particularities. 
> 
> How hard would it be to improve it to say ``Size of destination of
> immediate value is unknown. Use "movb", "movw" or "movd" to specify
> size of value''?
> 
> 
> Right,
> 
> 						MartinS
> 

- Raw text -


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