0% found this document useful (0 votes)
19 views2 pages

Lab n05

The document outlines a lab exercise focused on using ARM Cortex-M4 Assembly language to implement sorting algorithms and arithmetic operations. It includes source code demonstrating the use of the LDR command to load data into registers and showcases efficient programming techniques. The conclusion highlights the successful demonstration of these concepts and the insights gained into low-level programming.

Uploaded by

Zulqurnan Anjum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views2 pages

Lab n05

The document outlines a lab exercise focused on using ARM Cortex-M4 Assembly language to implement sorting algorithms and arithmetic operations. It includes source code demonstrating the use of the LDR command to load data into registers and showcases efficient programming techniques. The conclusion highlights the successful demonstration of these concepts and the insights gained into low-level programming.

Uploaded by

Zulqurnan Anjum
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Lab no 05

Use LDR command to load Data on any Register in ARM


Cortex-M4 Assembly

Objective:
To Design and Implement ARM Cortex-M4 Assembly language programs to
perform sorting algorithms and arithmetic operations on data optimizing code efficiency and
understanding low level programming concepts.

Source code.
AREA MYDATA,DATA,READWRITE
sort
DCB 3,4,5,6
AREA Mycode,CODE, READONLY
ENTRY
EXPORT Reset_Handler
Reset_Handler
LDR R0, = sort
MOV R2, #0
MOV R3,#2
Loop
LDR R1, [R0, R2]
UDIV R4, R1, R3
MUL R5, R4, R3
SUB R6, R1, R5
CMP R6, #0
ADD R2, #1
CMP R2, #4
BLT Loop
END

Aleeza Imran (2022-EE-30)


Fig 5.1

Output:

Fig 5.2

Conclusion :
The lab successfully demonstrated the implementation of sorting algorithms and
arithmetic operations in ARM Cortex-M4 assembly programming skills, showcasting efficient
sorting and arithmetic operations implementation and providing valuable insights into low level
programming.

Aleeza Imran (2022-EE-30)

You might also like