Como pueden ver, el MPASM al ensamblar, agrega un NOP despues de cada GOTO.
No pude encontrar explicacion alguna en el datasheet.
Si el GOTO es una instruccion que ocupa 2 Words como el resto, no encuentro explicación de por qué me agrega un NOP a continuación de cada uno. ¿Está impuesto por la arquitectura?¿O es una opción del MPASM que puede deshabilitarse?
Gracias a quien puedan ayudarme.
Título: Re: Problemas con Computed Goto en PIC 18F
Publicado por: Nocturno en 13 de Diciembre de 2009, 14:54:20
5.2.4 TWO-WORD INSTRUCTIONS The standard PIC18 instruction set has four two-word instructions: CALL, MOVFF, GOTO and LSFR. In all cases, the second word of the instructions always has ‘1111’ as its four Most Significant bits; the other 12 bits are literal data, usually a data memory address. The use of ‘1111’ in the 4 MSbs of an instruction specifies a special form of NOP. If the instruction is executed in proper sequence, immediately after the first word, the data in the second word is accessed and used by the instruction sequence. If the first word is skipped for some reason and the second word is executed by itself, a NOP is executed instead. This is necessary for cases when the two-word instruction is preceded by a conditional instruction that changes the PC. Example 5-4 shows how this works
Título: Re: Problemas con Computed Goto en PIC 18F
Publicado por: BrunoF en 13 de Diciembre de 2009, 15:05:32
Ufff gracias Mano.
Ya había visto eso. Creo que estaba perturbado, pero gracias a ti, releer ese párrafo puede que haya sido mi salvación.
O sea que tengo que multiplicar por 4 para poder saltar correctamente... :rolleyes: