Andy- Although there are probably by now several answers to your question waiting to show up on my end, here is my explanation: Check the datasheet description of the GOTO mnemonic. There you will find that 11 bits of destination address are mapped into the machine language instruction (same goes for the CALL mnemonic.) The range for the Program Counter (PC) is of course 13 bits. Therefore in order to address the full program memory range the upper two bits are provided in the PCLATH register. Your address of 0x100 contains 9 bits of information, therefore no additional PCLATH information is needed. In fact, 2^11 = 2048 = 0x800 and the '84 has no memory above 0x3ff so for call and goto instructions you won't have to use PCLATH at all. So why is there a PCLATH register at all???? There are a couple of explanations. One is to provide future expandability in the 16X8X line. The other is for mnemonics which do not include 11 bits of operand information. The prime example is for computed gotos, i.e. tables. The ADDWF mnemonic includes only 8 bits of operand information, so in order to provide for cases where a table will lie above the 8 bit boundary (your example of 0x100 for example) the PCLATH information becomes useful. Refer to Figure 4-8 in the 16f84 datasheet for pictorial evidence of this rant. Brian -----Original Message----- From: Andrew Hall To: PICLIST@MITVMA.MIT.EDU Date: Wednesday, January 28, 1998 11:05 AM Subject: Newbie question > goto too_far ; Shouldn't work ? > > > org 0x100 >too_far ; PCL will contain 0 > > nop > >When I ran the simulation I was surprised to see the "goto" jump to the >memory address 0x100 even though PCLATH contained zero :( I had >expected it to end up at address 0x0 ! In the register display PCL >contained 0 !!