Searching \ for '[PIC]: Assembler Errors' 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/microchip/devices.htm?key=pic
Search entire site for: 'Assembler Errors'.

Exact match. Not showing close matches.
PICList Thread
'[PIC]: Assembler Errors'
2002\08\22@143717 by Michael A. Powers

picon face
Hello,

I have a program in which I use two interrupt routines,  one for Timer 0 and
one for Peripheral (UART).  My code looks like this:

;;----------------------------------------------------
PAGE
org 0x000

goto Mainline

org 0x004

;;----------------------------------------------------

Int
   ; TMR0 Interrupt code
retfie

;;----------------------------------------------------
org  0x020 ; peripheral interupt
Int
   ; Peripheral (UART) interrupt code
retfie
;;----------------------------------------------------

This yields a few assembly errors that I am unfamiliar with.  It is my
understanding that TMR0 interrupts to 0x004 and Peripherals interrupt to
0x020, which I have done here.  However, I get errors to the tune of:

ERROR[118]:    .............................  Overwriting previous address
contents (0020)

on the lines for the peripheral interrupt.  What does that mean?  Have I set
up these interrupts correctly?

-Mike

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\22@145439 by Nick Veys

flavicon
face
My guess would be you are re-using the 'Int' label and it doesn't like
that.

spam_OUTnickTakeThisOuTspamveys.com | http://www.veys.com

> {Original Message removed}

2002\08\22@153438 by Spehro Pefhany

picon face
At 02:31 PM 8/22/02 -0400, you wrote:
>Hello,
>
>I have a program in which I use two interrupt routines,  one for Timer 0 and
>one for Peripheral (UART).  My code looks like this:

I'll assume you've got the interrupt vector addresses right...


{Quote hidden}

If there is code there that is more than 28 words long
you'll emit code for address 0x20 and perhaps higher
addresses.

>;;----------------------------------------------------
>  org  0x020 ; peripheral interupt
>Int
>     ; Peripheral (UART) interrupt code
>retfie
>;;----------------------------------------------------

Then you come back and try to set those addresses to
something else, and you get error message(s), starting at
address 0x20. If this is the problem, just put the code
somewhere else and jump to it like you did with the reset
vector.

Best regards,

Spehro Pefhany --"it's the network..."            "The Journey is the reward"
.....speffKILLspamspam@spam@interlog.com             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com
9/11 United we Stand

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\22@153502 by Mark Samuels

flavicon
face
Once the label is straightened out, it may compile without that error, but
still won't ever get your UART  interrupt.
18 series parts have interrupt vectors at 0x0008 and 0x0018, others have
only one interrupt vector at 0x0004, so where did the 0x020 come from?

At 01:53 PM 8/22/02 -0500, you wrote:
>My guess would be you are re-using the 'Int' label and it doesn't like
>that.
>
>nickspamKILLspamveys.com | http://www.veys.com
>
> > {Original Message removed}

2002\08\22@155944 by Andrew Warren

flavicon
face
Michael A. Powers <.....PICLISTKILLspamspam.....mitvma.mit.edu> wrote:

> It is my understanding that TMR0 interrupts to 0x004 and
> Peripherals interrupt to 0x020

   Untrue for all PICs of which I'm aware, including the PIC17 and
   PIC18 families.  On your PIC, which is probably a PIC16, ALL
   interrupts vector to 0x004, and it's up to your firmware to
   determine (by reading the various interrupt flags) the source of
   the interrupt.

> I get errors to the tune of:
>
> ERROR[118]:    .............................  Overwriting previous address
> contents (0020)
>
> on the lines for the peripheral interrupt.  What does that mean?

   It means that you already have code at address 0x020 (from your
   TMR0 interrupt routine that started at 0x004), and your "ORG
   0x020" is forcing the assembler to overwrite it with new code.

   -Andy

=== Andrew Warren -- EraseMEaiwspam_OUTspamTakeThisOuTcypress.com
=== Principal Design Engineer
=== Cypress Semiconductor Corporation
===
=== Opinions expressed above do not
=== necessarily represent those of
=== Cypress Semiconductor Corporation

--
http://www.piclist.com hint: The PICList is archived three different
ways.  See http://www.piclist.com/#archives for details.


2002\08\22@191339 by Richard Mellina

picon face
I can't speak for any other series, but according to the Microchip Mid-Range
Reference Manual *all* of the 16C series vectors to 0x04 on *all*
interrupts.

{Original Message removed}

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