Changes

Z80

No change in size, 09:37, 1 September 2024
/* Opcodes */
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| adc a,R || 10001rrr || 4 || + || + || + || + || + || V || 0 || + || a += R + cf ||rowspan=6|Add with Carry
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| bit B,R || 11001011 01bbbrrr || 8 || + || + || + || 1 || + || P || 0 || - || tmp := R AND [1 << B] ||rowspan=3|Test Bit
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| call A || 11001101 alalalal ahahahah || 17 || - || - || - || - || - || - || - || - || sp -= 2, (sp) := pc, pc := A || Unconditional Call
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| daa || 00100111 || 4 || + || + || + || X || + || P || - || X || tmp := a,
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| ei || 11111011 || 4 || - || - || - || - || - || - || - || - || iff1 := 1, iff2 := 1 after the next instruction || Enable Interrupts
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| halt || 01110110 || 4 || - || - || - || - || - || - || - || - || wait for interrupt || Suspends CPU operation
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| im 0 || 11101101 01*0*110 || 8 || - || - || - || - || - || - || - || - || mode 0: execute instruction on bus ||rowspan=3|Set Interrupt Mode
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| jp A || 11000011 alalalal ahahahah || 10 || - || - || - || - || - || - || - || - || pc := A ||rowspan=3|Unconditional Jump
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| ld R1,R2 || 01rrrsss || 4 || - || - || - || - || - || - || - || - || R1 := R2 ||rowspan=34|Load
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| neg || 11101101 01***100 || 8 || + || + || + || + || + || V || 1 || + || a := 0 - a || Negate
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| or R || 10110rrr || 4 || + || + || + || 0 || + || P || 0 || 0 || a := a OR R
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| pop P || 11pp0001 || 10 || - || - || - || - || - || - || - || - || P := (sp), sp += 2 ||rowspan=2|Pop a value from the stack
{| class="wikitable" border="1"
|-
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| res B,R || 11001011 10bbbrrr || 8 || - || - || - || - || - || - || - || - || R := R AND ~[1 << B]
{| class="wikitable"
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| sbc a,R || 10011rrr || 4 || + || + || + || + || + || V || 1 || + || a -= R + cf
{| class="wikitable"
! Instruction !! Opcode !! Cycles !! S !! Z !! X 5 !! H !! Y 3 !! P !! N !! C !! Effect !! Description
|-
| xor R || 10101rrr || 4 || + || + || + || 0 || + || P || 0 || 0 || a := a XOR R ||rowspan=5|Logical eXclusive OR
13,173
edits