Searching \ for 'Can't figure out these assembler errors and messag' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/index.htm?key=cant+figure+out
Search entire site for: 'Can't figure out these assembler errors and messag'.

Truncated match.
PICList Thread
'Can't figure out these assembler errors and messag'
1996\07\25@024721 by NEIL GANDLER

flavicon
face
 1. When entering an interrupt routine, the pic data book instructs
to store the current values of the W and STATUS registers. They
say that the register W_TEMP must be defined in both banks. So
I assume I can do just that by putting the following in my code

       W_TEMP EQU 25
       W_TEMP EQU 0xA5

       But I get errors, stating that symbol can not be redefined.


       How else Can I do this?

2. When refining my code, I eliminate all assembling errors, but I
still have quite a few assembler messages. They mostly are the following:

       Arugment out of range. Least significant bits used.

       This message occurs, almost everytime I try modifying the
tris registers or the option register and a few others. I have tried
assuring that I only move an 8-bit equivalent and nothing more.
This message sometimes also occurs when using the BSF and BCF commands.


I would appreciate any help. Thanks

1996\07\25@025552 by Clyde Smith-Stubbs

flavicon
face
NEIL GANDLER <spam_OUTV064MB9KTakeThisOuTspamubvms.cc.buffalo.edu> wrote:

>   1. When entering an interrupt routine, the pic data book instructs
> to store the current values of the W and STATUS registers. They
> say that the register W_TEMP must be defined in both banks. So
> I assume I can do just that by putting the following in my code
>
>         W_TEMP EQU 25
>         W_TEMP EQU 0xA5
>
>         But I get errors, stating that symbol can not be redefined.

What the book really means is "allocated in both banks", i.e. you must
reserve one byte at offset 25 in both banks. But you only need to
define the symbol once, as e.g. 25, since when you reference this it
will be relative to the currently selected bank anyway.

Clyde

--
Clyde Smith-Stubbs       | HI-TECH Software,       | Voice: +61 7 3300 5011
.....clydeKILLspamspam@spam@hitech.com.au      | P.O. Box 103, Alderley, | Fax:   +61 7 3300 5246
http://www.hitech.com.au | QLD, 4051, AUSTRALIA.   | BBS:   +61 7 3300 5235
----------------------------------------------------------------------------
For info on the World's best C cross compilers for embedded systems, point
your WWW browser at http://www.hitech.com.au, or email infospamKILLspamhitech.com.au

1996\07\25@153445 by Michael Wheeley

flavicon
face
NEIL GANDLER <.....V064MB9KKILLspamspam.....ubvms.cc.buffalo.edu> wrote:

>   1. When entering an interrupt routine, the pic data book instructs
> to store the current values of the W and STATUS registers. They
> say that the register W_TEMP must be defined in both banks. So
> I assume I can do just that by putting the following in my code
>
>         W_TEMP EQU 25
>         W_TEMP EQU 0xA5
>
>         But I get errors, stating that symbol can not be redefined.

To which Clyde Smith-Stubbs replied:
"What the book really means is "allocated in both banks", i.e. you must
reserve one byte at offset 25 in both banks. But you only need to
define the symbol once, as e.g. 25, since when you reference this it
will be relative to the currently selected bank anyway."

Beware though the offset between the two addresses must be 0x80. Make sure that you use 0x25 rather than 25t (decimal) else this method of storing W and STATUS does not work. (The start of the interrupt routine will have a line which stores to the reserved location 'movwf W_TEMP' but at the moment of storage it is not known whether bank zero or bank one is being addressed. Therefore it is imperative that the offset is 0x80)

More... (looser matching)
- Last day of these posts
- In 1996 , 1997 only
- Today
- New search...