gnupic: gpasm question/may be a bug


Previous by date: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Next by date: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Previous in thread: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Next in thread: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu

Subject: Re: gpasm question/may be a bug
From: Tobias Schlottke ####@####.####
Date: 18 Oct 2002 20:58:45 -0000
Message-Id: <Pine.LNX.4.31.0210182243160.19161-100000@lemorio.netcs.com>

On Fri, 18 Oct 2002, Samuel Tardieu wrote:

> | 	xorwf PORTB,PORTB
>
> This has no meaning, as the second argument as to be "w" or "f".
> Your assembler probably assembles xorwf as:

Ok, but if it _has_ to be f or w, at least a
warning would be nice to have. I.E. if I write
bsf 0x20,8
the compiler generates a warning that 8 is out of
range.
I feel xorwf PORTB,PORTB easier to read,
even if the second argument must be the same like
the first one (or equal w).

>   0x600 | port address | (flag << 7)
>
> where "flag" is 0 for "w" and 1 for "f".
> As you erroneously used "PORTB" (whose value is 6) as "flag", this gives:
>
>   0x600 | 6 | (6 << 7) = 0x706
>
> 0x706 just happens to be the opcode for "addwf PORTB,w", no mistery here.

:-), ok, if you know how the assembler is
implemented, then there is no mistery.

Thanks for your fast response and clearification,

Toby


Previous by date: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Next by date: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Previous in thread: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu
Next in thread: 18 Oct 2002 20:58:45 -0000 Re: gpasm question/may be a bug, Samuel Tardieu


Powered by ezmlm-browse 0.20.