Question: ARM ASSEMBLY Assignment (ARM7TDMI) Consider the operations described by if (R0 is less than R1) begin swap(R0,R1) end else if (R0 equals R1) begin R1

ARM ASSEMBLY Assignment (ARM7TDMI)

Consider the operations described by

if (R0 is less than R1) begin

swap(R0,R1)

end

else if (R0 equals R1) begin

R1 = -R0;

R0 = 0;

end

else begin

R1 = NOT R0;

R0 = -1;

end

PROBLEM: Use the following template to solve part 1,2

PART1: The first one is required to use unconditional instructions except branches may be conditional.

PART2: Use conditional instructions, but no branches at all.

Use the following template.

AREA FLASH, CODE, READONLY

ARM

INCLUDE LPC23xx.inc ;MMR definitions

EXPORT __main

R0VAL EQU 0x6 ; different value will be used to test your program

R1VAL EQU 0x7 ; assume that numbers are signed numbers

__main

; PART 1

MOV R0, #R0VAL ;load test case

MOV R1, #R1VAL

. . .

. . .

endpart1

; PART 2

MOV R0, #R0VAL ;load test case

MOV R1, #R1VAL

. . .

. . .

endpart2

B endpart2

END

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!