Hi Paul. Ok. Step by step explanation what you are doing. It is wrong at all but why it can be compiled successfully ? 1. W is defined in include file as 0 (see .inc file for more info) 2. comf operation takes data from register, invert it and put back to destination, destination can be the same reg itself or W reg In your case : COMF W is compiled as : COMF 0 which means that pic has to take data from INDF (0) reg. Looks like destination is omitted. By MPLAB defaults it means put data back in register ( ,F or ,1 ) if you didn't redefined it. So in you example processor will take value from INDF, invert it and put back to INDF. INDF is register that for some magical reason becomes the data memory cell which address is specified by FSR register in some strange way ;) (read your pic docs about that) Good luck in research ! ;) (Better to read some real working progs, it really can help, search inside of piclist archive for that) WBR Dmitry. ----- PDRUNEN@AOL.COM wrote: > > Hi Group, > > The MPLAB assembler will compile the COMF W statement but does not work on > the simulator. Since it did compile then I assume that the COMF W is doing > something, but I am not sure what it does? > > Anyone provide a bit of light on this? Paul