When I write this code in 8051 simulator:
MOV 07h, #45h
MOV C, 07h
It works and make the carry bit zero. But what does this code do, and why carry bit is zero?
What you are observing is accidental. The 07h
in the two instructions is not the same. The first one is byte address, the second one is bit address which is actually the most significant bit of byte address 20h
.