gnupic: gpasm question/may be a bug


Previous by date: 18 Oct 2002 20:27:27 -0000 gpasm question/may be a bug, Tobias Schlottke
Next by date: 18 Oct 2002 20:27:27 -0000 Re: gpasm question/may be a bug, Tobias Schlottke
Previous in thread: 18 Oct 2002 20:27:27 -0000 gpasm question/may be a bug, Tobias Schlottke
Next in thread: 18 Oct 2002 20:27:27 -0000 Re: gpasm question/may be a bug, Tobias Schlottke

Subject: Re: gpasm question/may be a bug
From: Samuel Tardieu ####@####.####
Date: 18 Oct 2002 20:27:27 -0000
Message-Id: <2002-10-18-22-24-07+trackit+sam@rfc1149.net>

On 18/10, Tobias Schlottke wrote:

| 	xorwf PORTB,PORTB

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

  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.

  Sam
-- 
    Samuel Tardieu -- ####@####.#### -- http://www.rfc1149.net/sam
  Give PICs the power of Forth -- http://www.rfc1149.net/devel/picforth


Previous by date: 18 Oct 2002 20:27:27 -0000 gpasm question/may be a bug, Tobias Schlottke
Next by date: 18 Oct 2002 20:27:27 -0000 Re: gpasm question/may be a bug, Tobias Schlottke
Previous in thread: 18 Oct 2002 20:27:27 -0000 gpasm question/may be a bug, Tobias Schlottke
Next in thread: 18 Oct 2002 20:27:27 -0000 Re: gpasm question/may be a bug, Tobias Schlottke


Powered by ezmlm-browse 0.20.