P2 T2 L11 - Assembly Language Flashcards
Computers can only process instructions that are written in ________ ______.
machine code
A machine code instruction has an ______ and an ______.
opcode (operation code)
operand
Assembly language uses ___________ to represent operation codes and addresses.
mnemonics
All the instructions for a given CPU form its ___________ ___.
instruction set
The assembly code instructions are unique to a given __________ __________.
computer architecture
LDR Rd, < memory ref >
What does it mean?
1 point
- Load the value stored in < memory ref > into register d
STR Rd, < memory ref >
What does it mean?
1 point
- Store the value in register d into memory location specified by < memory ref >
ADD Rd, Rn, < operand >
What does it mean?
1 point
- Add the value specified in < operand > to the value in register n and store the result in register d
SUB Rd, Rn, < operand >
What does it mean?
1 point
- Subtract the value specified by < operand > from the value in register n and store the result in register d
MOV Rd, < operand >
What does it mean?
1 point
- Copy the value specified by < operand > into register d
What could < operand > be?
2 things
- an actual value, specified by #
OR
- a value stored in another register specified by R
In the instruction SUB R3, R2, #5 what type of addressing does it use?
(1 point)
- uses immediate addressing, i.e. the instruction uses the actual value 5 as the operand
In the instruction LDR R1, 300 what type of addressing does it use?
(1 point)
- uses direct addressing, i.e. the instruction uses the memory address (300) holding the value as the operand
In assembly language, there are no IF statements. What do they use instead?
(2 things)
- Compare instruction
2. Branch instruction
CMP Rn, < operand >
What does it mean?
1 point
- Compare the value stored in register n with the value specified by < operand >