A - (HL), HL <- HL-1, BC <- BC-1
The contents of the memory location addressed by the HL register pair is compared with the contents of the Accumulator. During a compare operation, a condition bit is set. The HL and Byte Counter (register pair BC) are decremented.
|S||is set if result is negative, otherwise it is reset.|
|Z||is set if A equal (HL), otherwise it is reset.|
|H||is set if borrow from bit 4, otherwise it is reset.|
|P/V||is set if BC-1 != 0, otherwise it is reset|
|C||is not affected.|
If the HL register pair contains $1111, memory location $1111 contains $3B, the Accumulator contains $3B, and the Byte Counter contains $0001. Upon the execution of
the Byte Counter contains $0000, the HL register pair contains $1110, the flag in the F Register is set, and the P/V flag in the F Register is reset. There is no effect on the contents of the Accumulator or address $1111.