4.7.3.5 Fo CompOrgArch (Assembly Language) Flashcards

(45 cards)

1
Q

What does the LDR instruction do?

A

Load the value stored in the memory location specified by <memory> into register d.</memory>

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

What is the purpose of the STR instruction?

A

Store the value that is in register d into the memory location specified by <memory>.</memory>

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

What operation does the ADD instruction perform?

A

Add the value specified in <operand2> to the value in register n and store the result in register d.</operand2>

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

What does the SUB instruction do?

A

Subtract the value specified by <operand2> from the value in register n and store the result in register d.</operand2>

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

What is the function of the MOV instruction?

A

Copy the value specified by <operand2> into register d.</operand2>

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

What does the CMP instruction compare?

A

The value stored in register n with the value specified by <operand2>.</operand2>

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

What does the B instruction do?

A

Always branch to the instruction at position <label> in the program.</label>

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

What are the possible conditions for the B <condition> <label> instruction?</label></condition>

A
  • EQ: equal to
  • NE: not equal to
  • GT: greater than
  • LT: less than
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What does the AND instruction perform?

A

A bitwise logical AND operation between the value in register n and the value specified by <operand2>.</operand2>

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

What is the effect of the ORR instruction?

A

Perform a bitwise logical OR operation between the value in register n and the value specified by <operand2>.</operand2>

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

What does EOR stand for and what does it do?

A

Exclusive OR (XOR) operation between the value in register n and the value specified by <operand2>.</operand2>

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

What is the purpose of the MVN instruction?

A

Perform a bitwise logical NOT operation on the value specified by <operand2>.</operand2>

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

What does the LSL instruction do?

A

Logically shift left the value stored in register n by the number of bits specified by <operand2>.</operand2>

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

What is the function of the LSR instruction?

A

Logically shift right the value stored in register n by the number of bits specified by <operand2>.</operand2>

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

What does the HALT instruction do?

A

Stops the execution of the program.

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

What does a label in assembly code signify?

A

An identifier followed by a colon (:) used to refer to a specific instruction position.

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

What does <operand2> represent in assembly instructions?</operand2>

A

<operand2> can be a decimal value preceded by # or a register value.
</operand2>

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

What does the immediate addressing mode signify?

A

The operand is included in the instruction.

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

What is direct addressing in assembly language?

A

The address of the operand in memory is part of the instruction.

20
Q

Fill in the blank: The _______ instruction stores a value that is in a register into a memory location.

21
Q

Fill in the blank: The _______ instruction adds a specified value to the value within a register.

22
Q

True or False: The BNE instruction branches if the condition not equal is met.

23
Q

What operation does the BLT instruction perform?

A

Branches to the instruction if the condition less than is met.

24
Q

What operation does the BGT instruction perform?

A

Branches to the instruction if the condition greater than is met.

25
What is the purpose of the CMP instruction?
Compare value in operand1 to value in operand2.
26
What is the function of the ADD command?
Adds a specified value to the value within a register.
27
What does the SUB command do?
Subtracts a specified value from the value within a register.
28
Fill in the blank: The _______ instruction performs a logical AND operation.
AND
29
Fill in the blank: The _______ instruction performs a logical OR operation.
ORR
30
Fill in the blank: The _______ instruction performs a logical XOR operation.
EOR
31
Fill in the blank: The _______ instruction performs a logical NOT operation.
MVN
32
What happens if the number in memory location 100 is greater than the number in location 110?
Subtract the value in 110 from the value in 100 and store the result in memory location 120.
33
What action does the program take if the number in memory location 100 is smaller than the number in location 110?
Add the value in 110 to the value in 100 and store the result in memory location 120.
34
What occurs if the values in memory locations 100 and 110 are equal?
The program does nothing.
35
What assembly instruction is used to load a value from memory into a register?
LDR
36
What assembly instruction is used to store a value from a register into memory?
STR
37
What is the logical operation used to determine if a number is odd or even?
LOGICAL AND
38
Fill in the blank: A number is odd if oddNumber.00000001 equals _______.
1
39
Fill in the blank: A number is even if evenNumber.00000001 equals _______.
0
40
What does the program do if the number in memory location 100 is odd?
Adds one to the value and stores it back in memory location 100.
41
What type of addressing mode is used in the instruction ADD R3, R3, R0?
Direct addressing
42
What instruction is used to compare two values in the assembly program?
CMP
43
What happens in the loop if R1 equals 0?
The program exits.
44
What is the purpose of the instruction LSL in the program?
To perform a logical shift left on R0.
45
What is the purpose of the instruction LSR in the program?
To perform a logical shift right on R1.