Question: Question 1 ( 1 0 points ) Convert the GCD algorithm given in this flowchart into ARM assembly using ONLY 4 instructions, where any instructions
Question points
Convert the GCD algorithm given in this flowchart into ARM assembly using ONLY instructions, where any instructions can be conditional. The only instructions you need are CMP B and SUB. To facilitate the automatic marking, always convert the "Yes" branch of the flow chart before the No branch. AREA prog, CODE, READWRITE
ENTRY
MOV RO#
MOV R#
GCD instruction
instruction
instruction
instruction
Loop B Loop
END
Test your code by assigning various values to R and R
What are the instructions you used?
Write your answer ie the instructions in TWO parts, the mnemonic in a box and ALL operands in another box.
To facilitate automatic marking,
Use CAPITAL letters ONLYexcept x make it a small letter.
Do NOT leave ANY spaces between operands.
The mnemonic of the st instruction is:
The operands of the st instruction are:
The mnemonic of the nd instruction is:
The operands of the nd instruction are:
The mnemonic of the rd instruction is:
The operands of the rd instruction are:
The mnemonic of the th instruction is:
The operands of the th instruction are:
Encode the nd instruction to ARM machine language code.
x x x x x x x x Encode the nd instruction to ARM machine language code.
xxxxxxxx A
A
A
A
A
A
A
A A
A
A A A A A
A
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
