WorksheetsAssembly Code
Total questions: 15
Worksheet time: 8mins
When writing assembly language, what is the name for the opcode part of the instruction (1 word, beginning with a silent m)
(a)
Which part of a machine code instruction does the addressing mode belong to?
opcode
operand
What is the addressing mode called when the operand is the value to be used? (1 word)
(a)
What is the addressing mode called when the operand is a memory address? (1 word)
(a)
Which type of language gives you more control over the CPU and memory?
Low level
High level
Which type of language can be run on more than one type of CPU?
Low level
High level
Which type of language is faster to write and easier to read and debug?
Low level
High level
Which type of language produces programs that use less memory?
Low level
High level
What instruction would you run before doing CMP R0, #0 to decide if the number in R1 was odd or even?
ADD R0, R1, #1
AND R0, R1, #1
XOR R0, R1, #1
ORR R0, R1, #1
Which of these is valid AQA assembly code?
ADD R0 R0 1
ADD R0, R0, 1
ADD R0, R0, #1
ADD R0 R0 #1
Which of these is valid AQA assembly code?
LDR R0 #100
LDR R0, #100
LDR R0 100
LDR R0, 100
Which of these is valid AQA assembly code?
Loop:
B Loop
Loop
B Loop
Loop:
B Loop:
Loop
B Loop:
What pair of instructions are needed to make the equivalent of an 'if' statement in a HLL?
CMP & BEQ
ADD & CMP
ADD & BEQ
CMP & XOR
What does a caesar cipher do to an alphabet?
Shifts each letter along by a KEY amount
Performs an XOR of each letter with a KEY
Performs a hash operation on a string
What happens to the PC on a BEQ instruction if the EQ status flag is NOT set?
It is incremented
The CPU halts
It is unchanged
It moves to the next label
