Author Topic: My final border: How to create/work with AppVars?  (Read 7154 times)

0 Members and 1 Guest are viewing this topic.

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: My final border: How to create/work with AppVars?
« Reply #15 on: August 05, 2010, 03:30:42 am »
You just check the c flag.  If during the "sbc" part of the code, there was a carry, it would mean that de was larger than hl.  That means that immediately after when you do the "add" instruction that if there was a carry during the subtraction, there must also be a carry during the addition to get back to the original value.  So the c flag is still in the correct state by the end of that routine.  If you don't need to preserve the value of hl after the comparison, you can omit the "add" part.
___Axe_Parser___
Today the calculator, tomorrow the world!