4.7.3.5 Fo CompOrgArch (Assembly Language) Flashcards
(45 cards)
What does the LDR instruction do?
Load the value stored in the memory location specified by <memory> into register d.</memory>
What is the purpose of the STR instruction?
Store the value that is in register d into the memory location specified by <memory>.</memory>
What operation does the ADD instruction perform?
Add the value specified in <operand2> to the value in register n and store the result in register d.</operand2>
What does the SUB instruction do?
Subtract the value specified by <operand2> from the value in register n and store the result in register d.</operand2>
What is the function of the MOV instruction?
Copy the value specified by <operand2> into register d.</operand2>
What does the CMP instruction compare?
The value stored in register n with the value specified by <operand2>.</operand2>
What does the B instruction do?
Always branch to the instruction at position <label> in the program.</label>
What are the possible conditions for the B <condition> <label> instruction?</label></condition>
- EQ: equal to
- NE: not equal to
- GT: greater than
- LT: less than
What does the AND instruction perform?
A bitwise logical AND operation between the value in register n and the value specified by <operand2>.</operand2>
What is the effect of the ORR instruction?
Perform a bitwise logical OR operation between the value in register n and the value specified by <operand2>.</operand2>
What does EOR stand for and what does it do?
Exclusive OR (XOR) operation between the value in register n and the value specified by <operand2>.</operand2>
What is the purpose of the MVN instruction?
Perform a bitwise logical NOT operation on the value specified by <operand2>.</operand2>
What does the LSL instruction do?
Logically shift left the value stored in register n by the number of bits specified by <operand2>.</operand2>
What is the function of the LSR instruction?
Logically shift right the value stored in register n by the number of bits specified by <operand2>.</operand2>
What does the HALT instruction do?
Stops the execution of the program.
What does a label in assembly code signify?
An identifier followed by a colon (:) used to refer to a specific instruction position.
What does <operand2> represent in assembly instructions?</operand2>
<operand2> can be a decimal value preceded by # or a register value.
</operand2>
What does the immediate addressing mode signify?
The operand is included in the instruction.
What is direct addressing in assembly language?
The address of the operand in memory is part of the instruction.
Fill in the blank: The _______ instruction stores a value that is in a register into a memory location.
STR
Fill in the blank: The _______ instruction adds a specified value to the value within a register.
ADD
True or False: The BNE instruction branches if the condition not equal is met.
True
What operation does the BLT instruction perform?
Branches to the instruction if the condition less than is met.
What operation does the BGT instruction perform?
Branches to the instruction if the condition greater than is met.