Chapter 4 Flashcards

1
Q

What instruction is used to copy data between registers or memory?

A

MOV destination, source

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

What does the XCHG instruction do?

A

Exchange values

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

What are the two types of memory addressing?

A

Direct and indirect memory addressing

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

What instruction is used to add two values?

A

ADD destination, source

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

What instruction is used to subtract one value from another?

A

SUB destination, source

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

What does the INC instruction do?

A

Increment by 1

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

What does the DEC instruction do?

A

Decrement by 1

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

What is the purpose of the NEG instruction?

A

Negates value using two’s complement

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

What is immediate addressing in assembly language?

A

MOV AL, 5

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

What is register addressing?

A

MOV AX, BX

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

What is direct memory addressing?

A

MOV AX, [myVar]

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

What is indirect addressing?

A

MOV AX, [BX]

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

What does MOVZX do?

A

Zero-extend smaller values into larger registers

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

What does MOVSX do?

A

Sign-extend smaller values into larger registers

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

What does the JMP instruction do?

A

Unconditional jump

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

What does the LOOP instruction do?

A

Repeats block until CX reaches 0

17
Q

What is the Carry Flag (CF)?

A

Set when unsigned arithmetic overflow occurs

18
Q

What does the Overflow Flag (OF) indicate?

A

Set when signed arithmetic overflows

19
Q

What does the Zero Flag (ZF) signify?

A

Set when result is zero

20
Q

What does the Sign Flag (SF) indicate?

A

Set when result is negative

21
Q

What is the purpose of the Parity Flag (PF)?

A

Set when even number of 1s in result