Lab n05
Lab n05
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
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.