Memory scanning, code injection, debugger internals and other gamemodding related discussion
- What is cheating?
- Posts: 1
- Joined: Mon Jul 31, 2017 7:30 pm
- Reputation: 0
i have a problem understanding the carry flag :/
i added these lines to the SUB instruction in the CE's step 2 TUT
Code: Select all
after the add instruction, why is the carry flag being set? (CF=1)
and why is it cleared (CF=0) when i replaced this code:
with either 7,A or even F the carry flag is cleared? (CF=0)
Thanks for reading, and your help inadvanced..
- RCE Fanatics
- Posts: 36
- Joined: Mon May 08, 2017 4:08 am
- Reputation: 8
According to the x86 official documentation from Intel
, the CF is set if an arithmetic operation generates a carry of the most significant bit. It also indicates an overflow condition for unsigned integers.
You'll notice that the AF flag was set on your 2nd permutation of the code. That's the Adjust Flag. This means that the lower 4 bits were carried instead.
Who is online
Users browsing this forum: No registered users