Question: 1 ) The factorial program is given as follows: AREA Prog 2 , CODE, READONLY ENTRY MOV r 6 , # 1 0 ; load
The factorial program is given as follows:
AREA Prog CODE, READONLY
ENTRY
MOV r # ; load into r
MOV r r ; copy n into a temp register
loop SUBS r r # ; decrement next multiplier
MULNE r r r ; perform multiply
BNE loop ; go again if not complete
stop B stop
END
a Using the Disassembly window Keil mu Vision write out the first six machine codes bit
instructions for the above program in hex format.
b Change the value in register r at the start of the program to What value is in the register r when
the code terminates? Verify that this hex number is correct.
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
