Compare Instructions Flashcards

1
Q

< operation >
CMP – compare

A

Flags set to result of (Rn − Operand2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

< operation >
CMN – compare negative

A

Flags set to result of (Rn + Operand2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

< operation >

TST – bitwise test

A

Flags set to result of (Rn AND Operand2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

< operation >
TEQ – test equivalence

A

Flags set to result of (Rn EOR Operand2).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Comparisons produce no results –

A
  • they just set condition codes. Ordinary instructions will also set condition codes if the “S” bit is set. The “S” bit is implied for comparison instructions.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

CMP r0, #42

A

Compare R0 to 42.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

CMN r2, #42

A

Compare R2 to -42.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

TST r11, #1

A

Test bit zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

TEQ r8, r9

A

Test R8 equals R9.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SUBS r1, r0, #42

A

Compare R0 to 42, with result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

CMP is like

A

CMP is like SUB.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

CMN is like

A

ADD – subtract of a negative number is the same as add.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

TST is like

A

TST is like AND.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

TEQ is like

A

TEQ is like EOR – exclusive or of identical numbers gives result of zero.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly