Search This Blog

Saturday, August 13, 2011

Single bit operation with Carry


Instruction
Function
SETB C
Make CY = 1
CLR C
Clear CY bit
CPL C
Complement CY bit
MOV b, C
Copy carry status to bit
MOV C, b
Copy bit location status to carry
JNC TARGET
Jump to target when CY = 0
JC TARGET
Jump to target when CY = 1
ANL C, bit
AND CY with bit and save it on CY
ANL C, /bit
AND CY with inverted bit and save it on CY
ORL C, bit
OR CY with bit and save it on CY
ORL C, /bit
OR CY with inverted bit and save it on CY

No comments:

Post a Comment