Cmp src, Cmp src -9, Cpl -9 – Maxim Integrated MAXQ Family User Manual
Page 186: Maxq family user’s guide

18-9
MAXQ Family User’s Guide
CMP src
Compare Accumulator
Description:
Compare for equality between the active accumulator and the least significant byte of the specified src. The
MAXQ20 may use the PFX[n] register to supply the high byte of data for 8-bit sources.
Status Flags:
E
Operation:
Acc = src: E
← 1
Acc <> src: E
← 0
Encoding:
15
0
MAXQ10
Example(s):
CMP A[1]
; Acc = 45h, A[1] = 10h, E=0
CMP #45h
; Acc = 45h, E=1
CMP DP[0]
; Acc = 45h, DP[0]=0345h, E=1
MAXQ20
Example(s):
CMP #45h
; Acc = 0145h, E=0
CMP #145h
; PFX[0] register used
; MOVE PFX[0], #01h (smart-prefixing)
; CMP #45h E=1
CPL
Complement Acc
Description:
Performs a logical bitwise complement (1's complement) on the active accumulator (Acc or A[AP]) and returns the
result to the active accumulator.
Status Flags:
S, Z
Operation:
Acc
← ~Acc
Encoding:
15
0
MAXQ10
Example(s):
; Acc = FFh, S=1, Z=0
CPL
; Acc
← 00h, S=0, Z=1
; Acc = 09h, S=0, Z=0
CPL
; Acc
← F6h, S=1, Z=0
MAXQ20
Example(s):
; Acc = FFFFh, S=1, Z=0
CPL
; Acc
← 0000h, S=0, Z=1
; Acc = 0990h, S=0, Z=0
CPL
; Acc
← F66Fh, S=1, Z=0
f111
1000
ssss
ssss
1000
1010
0001
1010
Maxim Integrated