Changes

Jump to: navigation, search

Z80

No change in size, 11 March
/* Block group */
|-
! Instruction !! Opcode !! NOPs !! Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| cpd || 11101101 10101001 || 4 || 16 (4,4,3,5) || + || + || X || + || X || C || 1 || - || tmp := a - (hl) => flags, bc -= 1, hl -= 1,
f5 := [tmp - hf].1, f3 = [tmp - hf].3
|| Compare and Decrement
|-
| cpi || 11101101 10100001 || 4 || 16 (4,4,3,5)|| + || + || X || + || X || C || 1 || - || tmp := a - (hl) => flags, bc -= 1, hl += 1,
|| Compare and Increment
|-
| cpdr cpd || 11101101 10111001 10101001 || 6/4 || 21/16 (4,4,3,5,5)/(4,4,3,5) || + || + || X || + || X || C || 1 || - || cpdtmp := a - (hl) => flags, if bc <> 0 and nz then pc -= 2 1, hl -= 1,f5 := [tmp - hf].1, f3 = [tmp - hf].3|| Compare and Decrement, Repeat
|-
| cpir || 11101101 10110001 || 6/4 || 21/16 (4,4,3,5,5)/(4,4,3,5) || + || + || X || + || X || C || 1 || - || cpi, if bc <> 0 and nz then pc -= 2 || Compare and Increment, Repeat
|-
| ldd cpdr || 11101101 10101000 10111001 || 5 6/4 || 21/16 (4,4,3,5,5)/(4,4,3,5) || - + || - + || X || 0 + || X || C || 0 1 || - || tmp := (hl)cpd, (de) := tmp, de -= 1, hl -= 1,if bc <> 0 and nz then pc -= 1, f5 := [tmp + a].1, f3 := [tmp + a].32 || Load Compare and Decrement, Repeat
|-
| ldi || 11101101 10100000 || 5 || 16 (4,4,3,5) || - || - || X || 0 || X || C || 0 || - || tmp := (hl), (de) := tmp, de += 1, hl += 1,
|| Load and Increment
|-
| lddr ldd || 11101101 10111000 10101000 || 6/5 || 21/16 (4,4,3,5,5)/(4,4,3,5) || - || - || X || 0 || X || C || 0 || - || lddtmp := (hl), if (de) := tmp, de -= 1, hl -= 1,bc <> 0 then pc -= 2 1, f5 := [tmp + a].1, f3 := [tmp + a].3|| Load and Decrement, Repeat
|-
| ldir || 11101101 10110000 || 6/5 || 21/16 (4,4,3,5,5)/(4,4,3,5) || - || - || X || 0 || X || C || 0 || - || ldi, if bc <> 0 then pc -= 2 || Load and Increment, Repeat
|-
| ind lddr || 11101101 10101010 10111000 || 6/5 || 21/16 (4,4,3,5,5)/(4,4,3,5) || - || - || X || 0 || X || C || 0 || - || ldd, if bc <> 0 then pc -= 2 || Load and Decrement, Repeat|-| ini || 11101101 10100010 || 5 || 16 (4,5,4,3) || + || + || + || X || + || X || X || X || tmp := ((c)), (hl) := tmp, hl -+= 1,
b -= 1 => flags, nf := tmp.7,
tmp2 := tmp + [[c - + 1] and 0xff],
pf := parity of [[tmp2 and 0x07] xor b],
hf := cf := tmp2 > 255
|| I/O Input and DecrementIncrement
|-
| ini ind || 11101101 10100010 10101010 || 5 || 16 (4,5,4,3) || + || + || + || X || + || X || X || X || tmp := ((c)), (hl) := tmp, hl +-= 1,
b -= 1 => flags, nf := tmp.7,
tmp2 := tmp + [[c + - 1] and 0xff],
pf := parity of [[tmp2 and 0x07] xor b],
hf := cf := tmp2 > 255
|| I/O Input and Increment|-| indr || 11101101 10111010 || 6/5 || 21/16 (4,5,4,3,5)/(4,5,4,3) || + || + || + || X || + || X || X || X || ind, if b <> 0 then pc -= 2 || I/O Input and Decrement, Repeat
|-
| inir || 11101101 10110010 || 6/5 || 21/16 (4,5,4,3,5)/(4,5,4,3) || + || + || + || X || + || X || X || X || ini, if b <> 0 then pc -= 2 || I/O Input and Increment, Repeat
|-
| outd indr || 11101101 10101011 10111010 || 6/5 || 21/16 (4,5,4,3,5)/(4,5,4,3) || + || + || + || X || + || X || X || X || ind, if b <> 0 then pc -= 2 || I/O Input and Decrement, Repeat|-| outi || 11101101 10100011 || 5 || 16 (4,5,3,4) || + || + || + || X || + || X || X || X || tmp := (hl), ((c)) := tmp, hl -+= 1,
b -= 1 => flags, nf := tmp.7, tmp2 = tmp + l,
hf := cf := tmp2 > 255
|| I/O Output and DecrementIncrement
|-
| outi outd || 11101101 10100011 10101011 || 5 || 16 (4,5,3,4) || + || + || + || X || + || X || X || X || tmp := (hl), ((c)) := tmp, hl +-= 1,
b -= 1 => flags, nf := tmp.7, tmp2 = tmp + l,
hf := cf := tmp2 > 255
|| I/O Output and Increment|-| otdr || 11101101 10111011 || 6/5 || 21/16 (4,5,3,4,5)/(4,5,3,4) || + || + || + || X || + || X || X || X || outd, if b <> 0 then pc -= 2 || I/O Output and Decrement, Repeat
|-
| otir || 11101101 10110011 || 6/5 || 21/16 (4,5,3,4,5)/(4,5,3,4) || + || + || + || X || + || X || X || X || outi, if b <> 0 then pc -= 2 || I/O Output and Increment, Repeat
|-
| otdr || 11101101 10111011 || 6/5 || 21/16 (4,5,3,4,5)/(4,5,3,4) || + || + || + || X || + || X || X || X || outd, if b <> 0 then pc -= 2 || I/O Output and Decrement, Repeat
|}
13,173
edits