Zilog Z80380 Manual do Utilizador Página 72

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 268
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 71
5-38
Z380
USER'S MANUAL
DC-8297-03
ZILOG
CPI
COMPARE AND INCREMENT (BYTE)
CPI
Operation: A - (HL)
if (XM) then begin
HL(31-0) HL(31-0) + 1
end
else begin
HL(15-0) HL(15-0) + 1
end
BC(15-0) BC(15-0) - 1
This instruction is used for searching strings of byte data. The byte of data at the location
addressed by the HL register is compared with the contents of the accumulator and the Sign
and Zero flags are set to reflect the result of the comparison. The contents of the accumulator
and the memory bytes are unaffected. Two’s complement subtraction is performed. Next the
HL register is incremented by one, thus moving the pointer to the next element in the string.
The BC register, used as a counter, is then decremented by one.
Flags: S: Set if the result is negative; cleared otherwise
Z: Set if the result is zero, indicating that the contents of the accumulator and the memory
byte are equal; cleared otherwise
H: Set if there is a borrow from bit 4 of the result; cleared otherwise
V: Set if the result of decrementing BC is not equal to zero; cleared otherwise
N: Set
C: Unaffected
Addressing Execute
Mode Syntax Instruction Format Time Note
CPI 11101101 10100001 3+r X
Vista de página 71
1 2 ... 67 68 69 70 71 72 73 74 75 76 77 ... 267 268

Comentários a estes Manuais

Sem comentários