pic microcontroller discussion list <> wrote on Thursday, June 12, 2003 4:33 PM: >> BTDTGTTS, but not since I started using the ^0x80 method mentioned >> on the piclist occasionally. >> > Would you repeat that ? The technique, credited to Andrew Warren (IIRC), is to add XOR 0x80 (^0x80) to each register within a bsf STATUS,RP0 - bcf STATUS,RP0 section. That suppresses warnings for registers in bank 1, and causes warnings for registers in bank 0. e.g. movlw 0x12 movwf PORTA ; OK movwf TRISA ; Produces warning 302 bsf STATUS,RP0 ; Now in Bank 1 movwf TRISA^0x80; No warning movwf PORTA^0x80; Warning 302, if you accidentally try to set a bank 0 register in bank 1 bcf STATUS,RP0 ; Back to bank 0 I'm sure that Olin's famed development environment is a technically 'better' way, the above is far from perfect, but I don't usually do significantly sized projects in assembler, so this approach works well for me, and avoids learning yet another set of macros... Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk -- 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