Texas Instruments MSP50C6xx manual Cmpb Compare Two Bytes, Cmpb R3

Models: MSP50C6xx

1 390
Download 390 pages 41.72 Kb
Page 179
Image 179

Individual Instruction Descriptions

4.14.11 CMPB

 

 

Compare Two Bytes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[label]

name

 

src, src1

 

 

 

 

 

 

Clock, clk

 

Word, w

 

 

With RPT, clk

 

Class

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMPB

 

An, imm8

 

 

 

 

 

 

 

1

 

 

 

1

 

 

 

 

 

N/R

 

 

 

2a

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMPB

 

Rx, 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 An, imm8

 

1

 

0

1

0

0

 

1

1

An

 

 

 

 

 

 

 

 

imm8

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CMPB Rx, imm8

 

 

1

 

0

1

1

1

 

1

k4

k3

k2

 

k7

 

k6

 

k5

 

 

Rx

 

k1

 

k0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

Subtract value of src1 (zero filled in upper 8 bits) from src (i.e., srcsrc1) and

 

 

 

only modify the status flags. Contents of src not changed.

 

 

 

 

 

 

See Also

CMP, CMPS, Jcc, 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.

Assembly Language Instructions

4-93

Page 179
Image 179
Texas Instruments MSP50C6xx manual Cmpb Compare Two Bytes, Cmpb R3