Professional Documents
Culture Documents
LAB REPORT 1
1|Page
ABOUT KEIL SOFTWARE :
DESCRIPTION:
Keil Micro Vision is a free software which solves many of the pain points
for an embedded program developer. It is comprehensive software
solution to create, build, and debug embedded applications for ARM
based microcontrollers. This software is an integrated development
environment (IDE) to solve the complex problems facing embedded
software developers. When starting a new project, simply select the
microcontroller you use from the Device Database and the µVision IDE
sets all compiler, assembler, linker, and memory options for us.
This software can be downloaded from net. Here are the two links to
download the MDK-ARM software and the software for MDK Version 5:
https://www.keil.com/download/product/
https://www2.keil.com/mdk5/legacy
*****************************************************************************
ARM INSTRUCTIONS:
1. Data processing
2. Branch
3. Load and store ( that all arithmetic and logical instructions take only
register operands )
4. Status register transfer
5. Exception generating
6. Coprocessor
USER MODE:
1. ADDITION instruction:
ADD: ADD r0,r1,r2
2. SUBTRACTION instruction:
SUB: SUB R0,R1,R2
4. MULTIPLY instruction:
MUL: MUL R5,R6,R7
UMULL: R1,R2,R3,R4
5. DIVISION instruction:
SDIV: SDIV R3,R4,R5
//SDIV instruction implies signed divide and the operation
performed is R3=R4/R5. The values stored in register R4 and R5 are
divided and the result is stored in R3.
6. MOV instruction:
MOV: MOV R5, #25
*****************************************************************************
TOOLS UTILIZED:
PROCEDURE:
Program:
AREA arithmetic1, CODE, READONLY
END
// end of program
RESULT:
R1 = 0x0000000A
R2 = 0x00000006
R3 = 0x00000010
DATA:
INFERENCE:
On the basis of the program written above , the conclusion has been clearly
explained through the result. The register values of r1 and r2 have been
added and the result is stored in another register r3.
******************************************************************
TOOLS UTILIZED:
PROCEDURE:
Program:
AREA movinstruction, CODE, READONLY
MOV r5, #5
MOV r7, #8
MOV r7, r5
END
// end of program
RESULT:
r5 = 0x00000005
r7 = 0x00000005
DATA:
INFERENCE:
On the basis of the program written above , the conclusion has been clearly
explained through the result. The mov instructions copies the value of one
register into another which implies that the value of r5 is copied to r7.
******************************************************************
TOOLS UTILIZED:
PROCEDURE:
Program:
AREA reversesubtract, CODE, READONLY
// RSB means reverse subtract without carry. RSB {Rd} ,Rn, operand2.
Rd is the destination register, Rn is the register holding first
operand, operand2 is the second operand. The instruction subtracts
the value in r7 from the value of r6 and stores in r5.
END
// end of program
RESULT:
r5 = 0xffffff89
r6 = 0x00000000
r7 = 0x00000077
DATA:
INFERENCE:
On the basis of the program written above , the conclusion has been clearly
explained through the result. The value in r6 is subtracted from value in r7.
This can be seen can performed in keil IDE.
******************************************************************