What I find odd is that Microchip hasn't updated most of its core app notes (math, etc.) with 18F code/examples. I was recently looking at writing a signed comparison using the CPFxxx on the 18F, since all I found everywhere was the classic sub/check sign method. Cheers, Ishaan ----- Original Message ----- From: "Biswanath Dutta" To: Sent: Monday, July 21, 2003 21:32 Subject: Re: [PIC] : 18F452 MPLAB SIM Question > Thanks Mr. Ammerman > > Is there any document where the differnces between the 16 and 18 series are > summarised ? > > Biswanath Dutta > > ----- Original Message ----- > From: Bob Ammerman > To: > Sent: Monday, July 21, 2003 6:36 PM > Subject: Re: [PIC] : 18F452 MPLAB SIM Question > > > > Unlike the 16 series, in the 18 series INCF and DECF affect the carry > flag. > > > > DECF is treated like a subtraction of one. > > > > Since for subtraction the carry is treated as "not borrow", the carry will > > be set for every value except 0x00, which will cause a borrow. > > > > Bob Ammerman > > RAm Systems > > > > > > ----- Original Message ----- > > From: "Alan B. Pearce" > > To: > > Sent: Monday, July 21, 2003 8:22 AM > > Subject: Re: [PIC] : 18F452 MPLAB SIM Question > > > > > > > >When any GPR is decremented using the DECF instruction, the register > > > >is getting decremented, but the C bit (STATUS,0) is getting set no > > > >matter what the value of the register. > > > > > > > >Why is this so ? Is this a bug ? Anyone alse face the same problem ? > > > > > > What does the instruction set portion of the datasheet say should happen > > for > > > this instruction? > > > > > > -- > > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics