Samsung KS57C2308 Manual page 166

Single-chip cmos microcontroller
Table of Contents

Advertisement

SAM47 INSTRUCTION SET
XCHI
— Exchange and Increment
XCHI
dst,src
Operation:
Operand
A,@HL
Description:
The instruction XCHI exchanges the contents of the accumulator with the RAM location
addressed by register pair HL and then increments the contents of register L. If the content of
register L is 0H, a skip is executed. The value of the carry flag is not affected.
Operand
A,@HL
Example:
Register pair HL contains the address 2FH and internal RAM location 2FH contains 0FH:
YYY
The "JPS YYY" instruction is executed since a skip occurs after the XCHI instruction.
5-92
Operation Summary
Exchange A and data memory contents; increment
contents of register L and skip on overflow
Binary Code
0
1
1
LD
HL,#2FH
LD
A,#0H
XCHI
A,@HL
JPS
XXX
JPS
YYY
XCHI
A,@HL
1
1
0
1
0
; A
0FH and L
; Skipped since an overflow occurred
; H
2H, L
0H
; (20H)
0FH, A
KS57C2308/P2308/C2316/P2316
Bytes
1
Operation Notation
A
(HL), then L
L+1;
skip if L = 0H
L + 1 = 0, (HL)
"0"
(20H), L
L + 1 = 1H
Cycles
2 + S

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents