SAM47 INSTRUCTION SET
KS57C2308/P2308/C2316/P2316
5-92
XCHI
— Exchange and Increment
XCHI
dst,src
Operation:
Operand
Operation Summary
Bytes
Cycles
A,@HL
Exchange A and data memory contents; increment
contents of register L and skip on overflow
1
2 + S
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
Binary Code
Operation Notation
A,@HL
0
1
1
1
1
0
1
0
A
↔
(HL), then L
←
L+1;
skip if L = 0H
Example:
Register pair HL contains the address 2FH and internal RAM location 2FH contains 0FH:
LD
HL,#2FH
LD
A,#0H
XCHI
A,@HL
; A
←
0FH and L
←
L + 1 = 0, (HL)
←
"0"
JPS
XXX
; Skipped since an overflow occurred
JPS
YYY
; H
←
2H, L
←
0H
YYY
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.
Содержание C2316
Страница 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Страница 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Страница 170: ......
Страница 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Страница 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Страница 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Страница 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Страница 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Страница 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Страница 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Страница 318: ......
Страница 320: ......
Страница 322: ......
Страница 325: ......
Страница 327: ......