SAM47 INSTRUCTION SET KS57C2308/P2308/C2316/P23165-92XCHI — Exchange and IncrementXCHI dst,srcOperation: Operand Operation Summary Bytes CyclesA,@HL Exchange A and data memory contents; incrementcontents of register L and skip on overflow1 2 + SDescription: The instruction XCHI exchanges the contents of the accumulator with the RAM locationaddressed by register pair HL and then increments the contents of register L. If the content ofregister L is 0H, a skip is executed. The value of the carry flag is not affected.Operand Binary Code Operation NotationA,@HL 0 1 1 1 1 0 1 0 A ↔ (HL), then L ← L+1;skip if L = 0HExample: Register pair HL contains the address 2FH and internal RAM location 2FH contains 0FH:LD HL,#2FHLD A,#0HXCHI A,@HL ; A ← 0FH and L ← L + 1 = 0, (HL) ← "0"JPS XXX ; Skipped since an overflow occurredJPS YYY ; H ← 2H, L ← 0HYYY XCHI A,@HL ; (20H) ← 0FH, A ← (20H), L ← L + 1 = 1H•••The “JPS YYY” instruction is executed since a skip occurs after the XCHI instruction.