0 Members and 2 Guests are viewing this topic.
LD HL,256 ; Two-byte number LD DE,257 ; Another two-byte number OR A ; Reset carry flag SBC HL,DE ; Subtraction with carry JR C,Carried ; This will get executed because HL-DE is less than zero
CPDEBC: push de ex de, hl or a sbc hl, bc ex de, hl pop de ret
oh yeah can you explain what's "or a" or "xor a" is? i dont know where to learn about them.
11110101 (A)and 10011011 (B)------------------ 10010001
11110101 (A)or 10011011 (B)------------------ 11111111
11110101 (A)xor 10011011 (B)------------------ 01101110
or a ;reset carry flag sbc hl, de add hl, de
And just like SirCmpwn said, this messes with the flags in the exact same way that CP A does.