-4

My Question is regarding the assembly Language programming for a project i am going to deliver to Professor Aghazarian ... There goes the Question: Why is it that the Increment and/or the Decrement instructions have no change nor effect over the carry flag ?!

Modekai
  • 1
  • 2

1 Answers1

-1

Think of it like this, you wish to add two binary values together:

1111
1111

This if you add these together it will trigger the carry flag, as adding two 1's together in a register will write a 0 at the registers position and will carry over a 1. Thus setting the carry flag to 1.

Inc/Dec instructions will just increment and decrement a value stored in a register.

Unless an overflow occurs from the incrementing, this will also set the carry flag.

Rami
  • 37
  • 1
  • 1
  • 9