Lab_1
Lab_1
Lab 1
Introduction
To use the simulated behavior of Keil:
__Vectors
DCD 0x20008000
DCD Reset_Handler
ALIGN
Reset_Handler
Faculty of Engineering CSE 211s [Spring 2024]
Computer and Systems Engineering Department Introduction to Embedded
Systems
Assembler Directives
END indicates to the assembler the end of the source (asm) file
EQU defines a constant value or a fixed address. It does not set aside
storage for a data item, but associates a constant number with a data or
an address label
DCB, DCW, DCD allocate aligned byte, half-word (16-bit), word (32-bit)
memory locations
Lab Exercise
Q1. Write an assembly code that performs the same functionality as the
following C code:
int sum;
int n=20;
sum = 0;
while (n>0) {
sum = sum + n;
n = n -1;
}
Lab Submission
Q2. Write assembly code that performs the below C code:
int j=0;
int i;
for ( i = 0 ; i < 15 ; i++){
j = j + i;
For the lab submission, you should submit a pdf document contains the
following.