Searching \ for ' [PIC] 16c84 Problem' in subject line. ()
Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/devices.htm?key=16C
Search entire site for: '16c84 Problem'.

No exact or substring matches. trying for part
'[PICLIST] [PIC] 16c84 Problem'
2000\09\22@104826 by

this is the code

0x0142        movf    offset ; offset = 0
0x0144        goto    0x154

at 0x0143  it jumps to 0x0044

now computed jumps (anything that writes to PCL) so l have just read in an556 read the PCLATH value which would limit me to 256 byte pages...

l have another addwf pcl at 0x00C2 that goes to 0x00D0 but the GOTO instruction can jump anywhere through pages as long as it is within 256 bytes of its destination...

tricky...thanks for the help to all that replied...grately

Paul Drummond

--
http://www.piclist.com#nomail Going offline? Don't AutoReply us!
use listservmitvma.mit.edu?bodyT%20PICList%20DIGEST

Paul wrote:

> l have another addwf pcl at 0x00C2 that goes to 0x00D0 but the GOTO
> instruction can jump anywhere through pages as long as it is within 256
> bytes of its destination...

AAAAAAAANK!! [sound of buzzer going off]

The GOTO can jump to anywhere in a 2K boundary (2048 bytes)

Addresses supplied in a GOTO instruction = 11 bits = 2K

The GOTO can jump to anyhere in an 8K boundary (8192 bytes) because of
the PCLATH bits <4:3>.

Now GOTO address = 13 bits = 8K

PCLATH bits <4:3> are "always" concatenated onto the GOTO's 11 bits. If
the PIC has 2K or less of address space then the PCLATH bits are
ignored. (What good is 13 bits when you only have 11 to play with).

CALL instructions follow the same rule.

--
Best regards

Tony

ICmicro's
http://www.picnpoke.com
salespicnpoke.com

--
http://www.piclist.com hint: PICList Posts must start with ONE topic:
"[PIC]:" PIC only "[EE]:" engineering "[OT]:" off topic "[AD]:" ad's

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