Changes

Z80

217 bytes added, 09:07, 1 September 2024
/* Z80 Instructions: C */
! Instruction !! Opcode !! Cycles !! S !! Z !! X !! H !! Y !! P !! N !! C !! Effect !! Description
|-
| call A || 11001101 alalalal ahahahah || 17 || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A|| Unconditional Call
|-
| call C,A || 11ccc100 alalalal ahahahah || 17/10 || - || - || - || - || - || - || - || - || if C then sp -= 2, (sp) := pc, pc := A|| Conditional Call
|-
| ccf || 00111111 || 4 || - || - || A || X || A || - || 0 || X || hf := cf, cf := ~cf|| Complement Carry Flag
|-
| cp R || 10111rrr || 4 || + || + || X || + || X || V || 1 || + || tmp := a - R, xf := R.5, yf := R.3||rowspan=5|Compare
|-
| cp J || 11i11101 1011110b || 8 || + || + || X || + || X || V || 1 || + || tmp := a - J, xf := J.5, yf := J.3
| cp (I+D) || 11i11101 10111110 dddddddd || 19 || + || + || X || + || X || V || 1 || + || tmp := a - (I+D), xf := (I+D).5, yf := (I+D).3
|-
| cpd || 11101101 10101001 || 16 || + || + || X || + || X || C || 1 || - || tmp := a - (hl) => flags, bc -= 1, hl -= 1, xf := [tmp - hf].1, yf = [tmp - hf].3|| Compare and Decrement
|-
| cpdr || 11101101 10111001 || 21/16 || + || + || X || + || X || C || 1 || - || cpd, if bc <> 0 and nz then pc -= 2|| Compare and Decrement, Repeat
|-
| cpi || 11101101 10100001 || 16 || + || + || X || + || X || C || 1 || - || tmp := a - (hl) => flags, bc -= 1, hl += 1, xf := [tmp - hf].1, yf = [tmp - hf].3|| Compare and Increment
|-
| cpir || 11101101 10110001 || 21/16 || + || + || X || + || X || C || 1 || - || cpi, if bc <> 0 and nz then pc -= 2|| Compare and Increment, Repeat
|-
| cpl || 00101111 || 4 || - || - || + || 1 || + || - || 1 || - || a := ~a|| Complement
|}
13,173
edits