Hi. It's a normal case of goto (in pic18F) GOTO is a 2-word instruction, and is coded like that: 1110 1111 K7_K6_K5_K4 K3_K2_K1_K0 1111 K19_K18_K17_K16 K15_K14_K13_K12 K11_K10_K9_K8 Where K is the address where you want to jump "GOTO K" If K < 0xFF (for example your RS0 is 0x36) your instruction is 1110 1111 0011 0110 1111 0000 0000 0000 and this second word is also the code of nop (nop has two codes: 0000 0000 0000 0000 or 1111 xxxx xxxx xxxx) Regards. Paco Tortosa www.microladder.com Mensaje citado por gtyler : > Hi, I have a strange case of appearing NOP's :) > This is the assembly code I have written in MPLAB 6.4 > ie. what is in the .asm file: > > Line # > 22 addwf PCL,1,0 > 23 goto RS0 > 24 goto RS1 > 25 goto RS2 > 26 goto RS3 > 27 return > > But when I assemble it, I get this in the "Program Memory" file, this is > from the .hex file: > > Line# Address > 18 22 ADDWF 0xff9, 0x1, 0 > 19 24 GOTO 0x36 > 20 26 NOP > 21 28 GOTO 0x42 > 22 2A NOP > 23 2C GOTO 0x4c > 24 2E NOP > 25 30 GOTO 0x56 > 26 32 NOP > 27 34 RETURN 0 > > There are strange NOP's that it has added in every 4 memory locations. > Why does the Assembler do this? Is there any way to stop it doing this? > > Thanks > Christopher Tyler > > -- > http://www.piclist.com hint: The list server can filter out subtopics > (like ads or off topics) for you. See http://www.piclist.com/#topics > -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics