CLR f ASM instruction generate wrong HEX code.
Example :
Address of TMR3 is 0x010A
CLR TMR3 must give me $EF210A instead of $EF010A
Bit 13 from hex code must be 1 if destination is file register and 0 for WREG.
From dsPIC30F Programmer’s Reference Manual
Code: Select all
1110 1111 0BDf ffff ffff ffff
The ‘B’ bit selects byte or word operation (0 for word, 1 for byte).
The ‘D’ bit selects the destination (0 for WREG, 1 for file register).
The ‘f’ bits select the address of the file register.