On Tue, 23 May 2000 14:24:05 +0200 Sumiec Jerry writes: > Hello all, > > Could someone give a brief example or description of how to use > the > different addressing modes with the PIC, e.g. Direct, Indirect and > relative? > It doesn't have to be extremely detailed as I have the basic > understanding > of the modes already... > Quick descriptions: DIRECT - The absolute address of the operand is encoded in the object code. This could be the source of data to be acted upon, the destination of data, or the destination of a goto or subroutine call (pc is loaded with this operand). RELATIVE - The offset from the current PC to the operand is encoded in the object code. This results in relocatable code (without reassembly), but requires a calculation of the operand address at run time (which may take more time). INDIRECT - Normally, the address of a memory location or register that holds the address of the operand is encoded in the object code. On PICs, instead of using an "indirect mode," we load an FSR with the address of the operand, then use the corresponding INDF to access the operand. This is a little like "indexed addressing" on other processors. Harold ________________________________________________________________ YOU'RE PAYING TOO MUCH FOR THE INTERNET! Juno now offers FREE Internet Access! Try it today - there's no risk! For your FREE software, visit: http://dl.www.juno.com/get/tagj.