cpir

Block Search // CPIR (ComPare and Increment Repeated)

0xEDB1 - u60849

Description

Compares the value of the memory location pointed to by hl with a. Then hl is incremented and bc is decremented. If bc is not zero and z is not set, this operation is repeated. Interrupts can trigger while this instruction is processing.

T States Bytes
21 2

Condition Bits Affected

S affected as defined
Z affected as defined
H affected as defined
P/V reset
N set
C unaffected

source
{
  "flags": {
    "S": "affected as defined",
    "Z": "affected as defined",
    "H": "affected as defined",
    "P/V": "reset",
    "N": "set",
    "C": "unaffected"
  },
  "operation": "cpir",
  "opcode": "cpir",
  "operand": [],
  "code": "EDB1",
  "bytes": 2,
  "time": 21,
  "description": "Compares the value of the memory location pointed to by hl with a. Then hl is incremented and bc is decremented. If bc is not zero and z is not set, this operation is repeated. Interrupts can trigger while this instruction is processing.",
  "category": "Block Search",
  "subCategory": "CPIR (ComPare and Increment Repeated)"
}