LAB2 ECE521 - GROUP EE2414C - Update

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

LAB 2 (Looping & Branching) EE2414C

PLEASE INCLUDE FLOW CHART AND COMMENT FOR EACH PROGRAM. SHOW THE DETAIL
PROGRAM AND RESULTS STEP BY STEP USING KEIL IDE COMPILER. DISCUSS AND EXPLAIN
ALL THE RESULTS OBTAINED. ALSO PROVE THE RESULTS MANUALLY THROUGH
CALCULATIONS.
QUESTION 1 (GROUP 6)
Write ARM assembly program to fill a block of memory with a fixed value (any value).The
block of memory starting with memory location 0x40000100 to memory location
0x40000120.
QUESTION 2 (GROUP 5)
Write ARM assembly program to transfer the block of data starting in memory location
0x40001000 to new area of memory starting in memory location 0x40002000.
QUESTION 3 (GROUP 4)
Write ARM assembly program to find the highest value for a given set of numbers i.e 68,
88,97,44,76,90,33,56,34,76. Please use directive DCD to read the set of numbers.
Question 4 (GROUP 3)
Write ARM assembly program to load the value 0x23456789 into locations 0x40000060–
0x4000006F, and add them together and place the result in R9. Use EQU to assign the names
TEMP0–TEMP3 to locations 0x40000060–0x4000006F. Draw a flow chart for this program.
Question 5 (GROUP 2)
Write an ARM assembly program to inspect the content of R2.If the content is greater than
0x15, subtract the value with 0x05 and store the result in memory location 0x40002000.
Otherwise, add the content with 0x10 and store in memory location 0x40002001.

Question 6 (GROUP 1)

Write an ARM assembly program to compute the following expression; Y=(A-B)+(C*D),


where A=20, B=13, C=6 and D=3 and store the final result Y into memory location
0x40000000.

Question 7 (GROUP 8)
Write a program to toggle all the bits of address 0x40000010 by sending to it the values
0x55 and 0xAA continuously. Put a time delay between each issuing of data to address
location. (Can use any time delay subroutine in lecture note). Assume the the crystal
frequency is 100 MHz.
Question 8 (GROUP 7)
Write a program that will added the digit of student ID: 202012356. If the sum is not equal 21
store the result in memory location to 0x40000400. Otherwise, save the result in memory
content 0x40000500.

You might also like