For the initialisation of an I/O in the pic the datasheet indicates to clear set the TRIS correctly and clear both PORT and LAT bits. I thought I understood why and the program works. When looking at the disassembly however the PORT clearing and LAT clearing generate the same instructions. I did not look further but I think that the PORT bits are cleared as a result of the LAT bits clearing.
Is there a specific reason that the datasheet (asm) indicated to clear both PORT and LAT and in C it boils down to one action only on LAT.
C code example lead both to identical asm after compilation:
PORTAbits.RA0 = 0; LATAbits.LATA0 = 0;