520
CHAPTER 21 INSTRUCTION OPERATIONS
(20) Special instructions: CHKL, CHKLA
Mnemonic
Operands
Bytes
Operation
Flags
S
Z
AC P/V CY
CHKL
sfr
3
(Pin level)
|
(output latch)
A
¨
(pin level)
|
(output latch)
¥
¥
P
CHKLA
sfr
3
¥
¥
P
(21) String instructions:
MOVTBLW, MOVM, XCHM, MOVBK, XCHBK, CMPME, CMPMNE, CMPMC, CMPMNC,
CMPBKE, CMPBKNE, CMPBKC, CMPBKNC
Mnemonic
Operands
Bytes
Operation
Flags
S
Z
AC P/V CY
MOVTBLW
!addr8, byte
4
(addr8 + 2)
¨
(addr8), byte
¨
byte – 1,
addr8
¨
addr8 – 2 End if byte = 0
MOVW
[TDE + ], A
2
(TDE)
¨
A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0
[TDE – ], A
2
(TDE)
¨
A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0
XCHM
[TDE + ], A
2
(TDE)
′
A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0
[TDE – ], A
2
(TDE)
′
A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0
MOVBK
[TDE + ], [WHL +]
2
(TDE)
¨
(WHL), TDE
¨
TDE + 1,
WHL
¨
WHL + 1, C
¨
C – 1 End if C = 0
[TDE – ], [WHL –]
2
(TDE)
¨
(WHL), TDE
¨
TDE – 1,
WHL
¨
WHL – 1, C
¨
C – 1 End if C = 0
XCHBK
[TDE + ], [WHL +]
2
(TDE)
′
(WHL), TDE
¨
TDE +1,
WHL
¨
WHL + 1, C
¨
C – 1 End if C = 0
[TDE – ], [WHL –]
2
(TDE)
′
(WHL), TDE
¨
TDE – 1,
WHL
¨
WHL – 1, C
¨
C – 1 End if C = 0
CMPME
[TDE + ], A
2
(TDE) – A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0 or Z = 0
¥
¥
¥
V
¥
[TDE – ], A
2
(TDE) – A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0 or Z = 0
¥
¥
¥
V
¥
CMPMNE
[TDE + ], A
2
(TDE) – A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0 or Z = 1
¥
¥
¥
V
¥
[TDE – ], A
2
(TDE) – A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0 or Z = 1
¥
¥
¥
V
¥
CMPMC
[TDE + ], A
2
(TDE) – A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0 or CY = 0
¥
¥
¥
V
¥
[TDE – ], A
2
(TDE) – A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0 or CY = 0
¥
¥
¥
V
¥
CMPMNC
[TDE + ], A
2
(TDE) – A, TDE
¨
TDE + 1, C
¨
C – 1 End if C = 0 or CY = 1
¥
¥
¥
V
¥
[TDE – ], A
2
(TDE) – A, TDE
¨
TDE – 1, C
¨
C – 1 End if C = 0 or CY = 1
¥
¥
¥
V
¥
CMPBKE
[TDE + ], [WHL +]
2
(TDE)
¨
(WHL), TDE
¨
TDE + 1,
WHL
¨
WHL + 1, C
¨
C – 1 End if C = 0 or Z = 0
¥
¥
¥
V
¥
[TDE – ], [WHL –]
2
(TDE)
¨
(WHL), TDE
¨
TDE – 1,
WHL
¨
WHL – 1, C
¨
C – 1 End if C = 0 or Z = 0
¥
¥
¥
V
¥