1. Assume M and N are two variables in assembly language. Find the mathematical relationship between M and N for the given assembly code. What is the value of N when M is 6?
Func
MOV RO, #1
MOV R2, #1
Loop MUL R2, R2, RO
ADD RO, #1
CMP R1, RO
BHS Loop
BX LR
Start LDR RO, =M
LDR R1, [RO] BL Func
MOV R3, R2
SUB R1, R1, #1
BL Func
MOV R4, R2
SUB R3, R3, R4
LDR RO, =N
STR R3, [R0]
2. Draw a flow chart to compute the sum of N odd numbers. N is a user input.