Changes

Z80

10 bytes added, 10 March
/* Z80 Instructions */
|-
| 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
|}
 
=== Control flow group ===
 
{| class="wikitable" style="white-space: nowrap;"
|-
! Instruction !! Opcode !! NOPs|| Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| call A || 11001101 alalalal ahahahah || 5 || 17 (4,3,4,3,3) || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A || Call
|-
| call C,A || 11ccc100 alalalal ahahahah || 5/3 || 17/10 (4,3,4,3,3)/(4,3,3) || - || - || - || - || - || - || - || - || if C then sp -= 2, (sp) := pc, pc := A || Conditional Call
|-
| jp A || 11000011 alalalal ahahahah || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || pc := A ||rowspan=3|Jump
|-
| jp (hl) || 11101001 || 1 || 4 (4) || - || - || - || - || - || - || - || - || pc := hl
|-
| jp (I) || 11i11101 11101001 || 2 || 8 (4,4) || - || - || - || - || - || - || - || - || pc := I
|-
| jp C,A || 11ccc010 alalalal ahahahah || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || if C then pc := A || Conditional Jump
|-
| jr E || 00011000 dddddddd || 3 || 12 (4,3,5) || - || - || - || - || - || - || - || - || pc := E || Relative Jump
|-
| jr nz,E || 00100000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if nz then pc := E ||rowspan=4|Conditional Relative Jump
|-
| jr z,E || 00101000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if zf then pc := E
|-
| jr nc,E || 00110000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if nc then pc := E
|-
| jr c,E || 00111000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if cf then pc := E
|-
| ret || 11001001 || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2 || Return
|-
| ret C || 11ccc000 || 4/2 || 11/5 (5,3,3)/(5)|| - || - || - || - || - || - || - || - || if C then pc := (sp), sp += 2 || Conditional Return
|-
| reti || 11101101 01001101 || 4 || 14 (4,4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2, iff1 := iff2 || Return from Interrupt
|-
| retn || 11101101 01***101 || 4 || 14 (4,4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2, iff1 := iff2 || Return from NMI
|-
| rst S || 11sss111 || 4 || 11 (5,3,3) || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := S || Restart
|}
|-
! Instruction !! Opcode !! NOPs !! Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| call A || 11001101 alalalal ahahahah || 5 || 17 (4,3,4,3,3) || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A || Call
|-
| call C,A || 11ccc100 alalalal ahahahah || 5/3 || 17/10 (4,3,4,3,3)/(4,3,3) || - || - || - || - || - || - || - || - || if C then sp -= 2, (sp) := pc, pc := A || Conditional Call
|-
| cpl || 00101111 || 1 || 4 (4) || - || - || + || 1 || + || - || 1 || - || a := ~a || Complement
Note: The INI instruction has incorrect timing in the official Zilog manual. [https://forums.nesdev.org/viewtopic.php?p=181645f#p181645 Source]
 
=== Letter J ===
 
{| class="wikitable" style="white-space: nowrap;"
|-
! Instruction !! Opcode !! NOPs|| Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| jp A || 11000011 alalalal ahahahah || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || pc := A ||rowspan=3|Jump
|-
| jp (hl) || 11101001 || 1 || 4 (4) || - || - || - || - || - || - || - || - || pc := hl
|-
| jp (I) || 11i11101 11101001 || 2 || 8 (4,4) || - || - || - || - || - || - || - || - || pc := I
|-
| jp C,A || 11ccc010 alalalal ahahahah || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || if C then pc := A || Conditional Jump
|-
| jr E || 00011000 dddddddd || 3 || 12 (4,3,5) || - || - || - || - || - || - || - || - || pc := E || Relative Jump
|-
| jr nz,E || 00100000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if nz then pc := E ||rowspan=4|Conditional Relative Jump
|-
| jr z,E || 00101000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if zf then pc := E
|-
| jr nc,E || 00110000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if nc then pc := E
|-
| jr c,E || 00111000 dddddddd || 3/2 || 12/7 (4,3,5)/(4,3) || - || - || - || - || - || - || - || - || if cf then pc := E
|}
=== Letter L ===
|-
! Instruction !! Opcode !! NOPs !! Cycles !! S !! Z !! 5 !! H !! 3 !! P !! N !! C !! Effect !! Description
|-
| ret || 11001001 || 3 || 10 (4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2 || Return
|-
| ret C || 11ccc000 || 4/2 || 11/5 (5,3,3)/(5)|| - || - || - || - || - || - || - || - || if C then pc := (sp), sp += 2 || Conditional Return
|-
| reti || 11101101 01001101 || 4 || 14 (4,4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2, iff1 := iff2 || Return from Interrupt
|-
| retn || 11101101 01***101 || 4 || 14 (4,4,3,3) || - || - || - || - || - || - || - || - || pc := (sp), sp += 2, iff1 := iff2 || Return from NMI
|-
| rld || 11101101 01101111 || 5 || 18 (4,4,3,4,3) || + || + || + || 0 || + || P || 0 || - || tmp := [(hl) << 4] + [a AND 0x0f], (hl) := tmp,
a := [a AND 0xf0] + [tmp AND 0x0f] => flags
|| Rotate Right Decimal
|-
| rst S || 11sss111 || 4 || 11 (5,3,3) || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := S || Restart
|}
13,173
edits