11-29-2004, 11:19 AM
Anyone here understand the carry flag in HP41C ?
The carry flag is actually two flags!
The process of the carry flag is automatic with every fetch.
The CPU cannot overburden every possible instruction with overhead. The NULL instruction does nothing to the carry flag!
Here is one possible method to implement carry:
C= carry flag
A= "carry was set flag" = Aux carry
At every fetch the fetch process does this automatically, it has nothing to do with the particular function being loaded:
1: clear the "carry was set flag" (A)
2: swap the carry flag with the A flag.
That's it, and it's automatic.