Searching \ for 'Subroutine locations' 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=subroutine+locations
Search entire site for: 'Subroutine locations'.

Truncated match.
PICList Thread
'Subroutine locations'
1998\03\30@163614 by Tim Crist

flavicon
face
    I have a question about subroutines that are located above and
    below 255H in the 16F84 and the 16C54A.  I understand that tables
    that use the program counter will not work if they cross 255H
    because of PCLATH.

    My question is:  Can I have a subroutine below 255H successfully
    call a subroutine above 255H without incident?  If not, how would
    one go about making it work.

    TIA,

    Tim Crist

1998\03\30@190355 by Andrew Warren

face
flavicon
face
Tim Crist <spam_OUTPICLISTTakeThisOuTspamMITVMA.MIT.EDU> wrote:

> I have a question about subroutines that are located above and
> below 255H in the 16F84 and the 16C54A.

   Tim:

   I think you mean "0FFH", or "255 decimal".

> My question is:  Can I have a subroutine below 255H successfully
> call a subroutine above 255H without incident?

   On the 16F84, it'll work just fine; subroutines can be anywhere
   in the memory space and can be called from anywhere else without
   any special effort.

   On the 16C54, it's a different story... All subroutine
   entry-points must be located in the first half of memory,
   between 000H and 0FFH.

   -Andy

=== Andrew Warren - .....fastfwdKILLspamspam@spam@ix.netcom.com
=== Fast Forward Engineering - Vista, California
=== http://www.geocities.com/SiliconValley/2499

1998\03\31@054744 by Caisson

flavicon
face
> Van: Tim Crist <tjcristspamKILLspamCCGATE.HAC.COM>
> Aan: .....PICLISTKILLspamspam.....MITVMA.MIT.EDU
> Onderwerp: Subroutine locations
> Datum: maandag 30 maart 1998 13:29
>
>      I have a question about subroutines that are located above and
>      below 255H in the 16F84 and the 16C54A.  I understand that tables
>      that use the program counter will not work if they cross 255H
>      because of PCLATH.

I assume you mean 255 Decimal (or FF HexaDecimal).

You are right, but for the wrong reasons.  It's not because of PCLATH, but
because the register PCL consists outof only 8 bits.  this means that you
can't put a number higher than FF (or 255 decimal) into PCL.  Said
otherwise,
if you add a Index of 0x05 to a PCL of 0xFE the result will become 0x03,
and
NOT 0x0103.  Ah. before I forget :  The low 5 bits of PCLATH will be
prepended
to PCL to obtain the full 13 -bit adres on a add-to-PCL -jump.  Not that
all
PIC's have that much Code-memory, but it seems to be a sort of standard for
Mid-range PIC's.

>      My question is:  Can I have a subroutine below 255H successfully
>      call a subroutine above 255H without incident?  If not, how would
>      one go about making it work.

Yes, they can.  A Goto or Call has a 11 Bit adres, wich means you can jump
from 0x0000 to 0x07FF.  If you would like to be able to jump to an adres
beyond this, you would have to (besides finding a PIC with more
Code-memory)
set bits 3 & 4 in the PCLATH register. these will be prepended to your
Jump/
Call adres to obtain (again) the full 13 -bit adres.

>      TIA,
>
>      Tim Crist

Greetz,
 Rudy Wieser

1998\03\31@061038 by Syd Kahn

flavicon
face
unsubscribe
remove
quit

{Quote hidden}


'Subroutine locations'
1998\04\01@060232 by Caisson
flavicon
face
----------
> Van: Syd Kahn <RemoveMEklassTakeThisOuTspamNETRAX.NET>
> Aan: spamBeGonePICLISTspamBeGonespamMITVMA.MIT.EDU
> Onderwerp: Re: Subroutine locations
> Datum: dinsdag 31 maart 1998 12:59
>
> unsubscribe
> remove
> quit
>
[Cut]

You may leave the list at any time by sending a "SIGNOFF PICLIST" command
to TakeThisOuTLISTSERVEraseMEspamspam_OUTMITVMA.MIT.EDU (or RemoveMELISTSERVspamTakeThisOuTMITVMA.BITNET).

Greetz,
 Rudy Wieser

1998\04\01@152417 by Matt Bonner

flavicon
face
Syd Kahn wrote:
>
> unsubscribe
> remove
> quit

How about:
stop
cease
desist
discontinue

My thesaurus is bigger than yours.  :-0

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