> It is a very simple macro included as an example in the > gpasm assembler. > > movwf1 MACRO arg ;diddle regs in RAM bank 1 > movwf (arg^0x80) ;invert MSB > endm > > I thought this macro would invert the bank select bit and write > to 0x81 The only thing this macro does is what is in its body: movwf (arg^0x80) It inverts the 8th bit (assuming the LSB is the 0th) of the supplied addres= s and writes W to that address. What is the purose? To write to an address = that is in bank 1 without the assembler complaining (I dunno about gpasm, b= ut mpasm would complain) about the address not being in bank 0. It does NOT= set the bank bits! If you want it to set the bank bits, just add a line that does so in the bo= dy of the macro. (But why use assembler anyway? These days there are free C compilers, and t= here is Jal, and if that is not enough there is Basic, Pascal, ...) Wouter van Ooijen --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .