Changes

Z80

185 bytes added, 10:01, 1 September 2024
/* Z80 Instructions: O */
! Instruction !! Opcode !! Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| or R || 10110rrr || 4 || + || + || + || 0 || + || P || 0 || 0 || a := a OR R||rowspan=5|Logical Inclusive OR
|-
| or J || 11i11101 1011010b || 8 || + || + || + || 0 || + || P || 0 || 0 || a := a OR J
| or (I+D) || 11i11101 10110110 dddddddd || 19 || + || + || + || 0 || + || P || 0 || 0 || a := a OR (I+D)
|-
| out (N),a || 11010011 nnnnnnnn || 11 || - || - || - || - || - || - || - || - || ((N)) := a||rowspan=3| I/O Output
|-
| out (c),R || 11101101 01rrr001 || 12 || - || - || - || - || - || - || - || - || ((c)) := R
| out (c),0 || 11101101 01110001 || 12 || - || - || - || - || - || - || - || - || ((c)) := ? (seems to vary with CPU)
|-
| outd || 11101101 10101011 || 16 || + || + || + || X || + || X || X || X || tmp := (hl), ((c)) := tmp, hl -= 1, b -= 1 => flags, nf := tmp.7, tmp2 = tmp + l, pf := parity of [[tmp2 AND 0x07] XOR b], hf := cf := tmp2 > 255|| I/O Output and Decrement
|-
| otdr || 11101101 10111011 || 21/16 || + || + || + || X || + || X || X || X || outd, if b <> 0 then pc -= 2|| I/O Output and Decrement, Repeat
|-
| outi || 11101101 10100011 || 16 || + || + || + || X || + || X || X || X || tmp := (hl), ((c)) := tmp, hl += 1, b -= 1 => flags, nf := tmp.7, tmp2 = tmp + l, pf := parity of [[tmp2 AND 0x07] XOR b], hf := cf := tmp2 > 255|| I/O Output and Increment
|-
| otir || 11101101 10110011 || 21/16 || + || + || + || X || + || X || X || X || outi, if b <> 0 then pc -= 2|| I/O Output and Increment, Repeat
|}
13,173
edits