11 cmpb compare two bytes – Texas Instruments MSP50C614 User Manual

Page 184

Advertising
background image

Individual Instruction Descriptions

4-92

4.14.11

CMPB

Compare Two Bytes

Syntax

[label]

name

src, src1

Clock,

clk

Word,

w

With RPT,

clk

Class

CMPB

A

n, imm8

1

1

N/R

2a

CMPB

R

x, imm8

1

1

N/R

4b

Execution

status flags set by

src – src1 byte

PC

PC + 1

Flags Affected

src is An:

OF, SF, ZF, CF are set accordingly

src is Rx:

RCF, RZF are set accordingly

Opcode

Instructions

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

CMPB A

n, imm8

1

0

1

0

0

1

1

A

n

imm8

CMPB R

x, imm8

1

0

1

1

1

1

k4

k3

k2

k7

k6

k5

R

x

k1

k0

Description

Subtract value of

src1 (zero filled in upper 8 bits) from src (i.e., src–src1) and

only modify the status flags. Contents of

src not changed.

See Also

CMP, CMPS, J

cc, Ccc

Example 4.14.11.1

CMPB A0, 0xf3

Compare immediate value 0xf3 to accumulator A0.

Example 4.14.11.2

CMPB R3, 0x21

Compare immediate value 0x21 to R3.

Advertising