Wouter van Ooijen wrote: >I am making my first steps into 18Fxxx programming. >When asembling something like > goto 1 >I get the warning 'Destination address must be word aligned'. I see bo hints >in the 18F datasheet of such a restriction. The warning seems to happen only >when the destination is specified as a value, not when it is a label. What >is going on? If you have been using other PIC families, there are some things that you need to understand about the PIC18 family. First off, it's program memory is BYTE oriented rather than WORD oriented. This means that every 16-bit instruction takes two bytes of program memory (double word instructions take four bytes), so the instructions are ALWAYS aligned on even addresses. So GOTO 1, or GOTO is not a legal instruction. You cannot jump into the middle of an instruction and the PC will always be even aligned. This architecture helps the compiler quite a bit when dealing with transferring data from program memory to file registers, and the latest MPLAB C18 C compiler v2.00 is very efficient. In fact if you actually look at the hex values for the instructions, there is no way to "encode" the odd addresses. Addresses are actually "shifted right" by one when encoded. The nice thing about the 18Fxxx is that there are no program memory "pages" and data memory can be accessed as a linear 4K array using the FSR registers. Register banking is still required to do direct access to most file registers, but SFRs can be addressed without banking. No more BANKSELs needed when changing a port from an input to an output. Darrel Johansen -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body