I use PIC24 for this
PIC24
;cp{.b} f mov #0x0003,W1 mov W1,0x0830 mov #0x0002,W0 cp 0x0830 ; DC=1 , N=0 , OV=0, Z=0, C=1 mov #0x0003,W0 cp 0x0830 ;