On 19/2/2012 2:40 AM, Peter wrote: > I found some balky jal generated pic code which was disassembled by me to= yield > the use of what appears to be an undocumented instruction, used as in: > > 0821 movf 0x21, w ; load w with data from reg. 0x21 > 0065 tris 0x65 ; undocumented instruction Do you know which version of the Jal compiler and which libraries=20 created this code? I checked the libraries (as I said, the compiler by=20 itself would never generate a TRIS instruction): the stone-age library=20 (written by me, in the days that all 14-bit cores supported TRIS=20 instructions) does use it, because the library file jpic.jal had=20 constructs like procedure _trisa_flush is assembler bank movfw trisa tris 5 end assembler end procedure The current library files for 14-bit cores should not generate the TRIS=20 instruction, instead they use bank switching: var volatile byte TRISA at { 0x85 } var volatile byte PORTA_direction at TRISA Of course, the current library still uses TRIS for 12-bit cores: procedure PORTA_direction'put(byte in x) is pragma inline _TRISA_shadow =3D x asm movf _TRISA_shadow,W asm tris 6 end procedure --=20 Wouter van Ooijen -- ------------------------------------------- Van Ooijen Technische Informatica: www.voti.nl consultancy, development, PICmicro products docent Hogeschool van Utrecht: www.voti.nl/hvu C++ on uC blog: http://www.voti.nl/erblog --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .