Darrel, what is the value of STATUS.0 at start up? I assume it should be zero (no borrow no carry) , are you going to set it at start up, in order to have your snippet @ post #12 working?
Cheers
Al.
Darrel, what is the value of STATUS.0 at start up? I assume it should be zero (no borrow no carry) , are you going to set it at start up, in order to have your snippet @ post #12 working?
Cheers
Al.
Last edited by aratti; - 18th September 2011 at 01:50.
All progress began with an idea
Not that Darrell needs it, but I feel compelled to jump in here and row his boat. To my knowledge, borrow/carry flag in the status reg is the same across ALL PIC's. It is not a compilier thing. It is a basic hardware reg no different then any other. It exists the same as W. That said, I believe it is cleared at POR, but it doesn't matter. it only has value directly after an addition or subtraction. Well it is also used on rotate R/L through carry, but PBP doesn't support that. Some devices even have 1 for borrow or carry between nibbles, but again only used during math.
So startup value makes no difference for the snippet in post 12 as it follows a math operation.
-Bert
The glass is not half full or half empty, Its twice as big as needed for the job!
http://foamcasualty.com/ - Warbird R/C scratch building with foam!
Bookmarks