Академический Документы
Профессиональный Документы
Культура Документы
To find the differences between ARM families and programming in ARM assembly
ASSIGNMENT DESCRIPTION:
1. Explain about ARM7 and ARM9 families. Explain major differences in their architecture
especially about their pipeline structures.
2. Explain RISC and CISC processors in details. Take one sample processor each and
compare their features. CISC – 8086 or 8085 and RISC – ARM
3. Write an Assembly language program for adding three numbers and finding the average of
the sum.
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
5 Marks are awarded for the architectural differences
5 Marks are awarded for the assembly program
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 2
AIM OF THE ASSIGNMENT:
Verify the below conditions (CZNV) for each of the conditional checks used by the ARM
processor.
ASSIGNMENT DESCRIPTION:
Perform arithmetic by taking sample numbers and verify the conditional checks using ARM
instructions with the help of ARMSim# simulator.
In the above, example, since r0 and r1 are having the same contents, BLEQ will be true and
the control branches to the label same.
Exercises: Similar to the above BLEQ conditional check, perform checks for other conditions,
like BLNE, BLCS, BLHS, etc. by initializing the r0, r1 registers with appropriate signed and
unsigned values and performing check and running it on the simulator.
Each student should try out different set of numbers on r0 and r1 then look at the Condition
flags (CZNV) and verify their states by performing the operation themselves manually too.
Note: The CMP is the Compare instruction which subtracts Operand2 from Operand1 and
based on the status of conditional flags (as shown in the table below) branches to the label
mentioned in the code. In the above example, (r0 – r1) is performed, without changing the
contents of r0 and r1. Based on the conditional flags set, branch is taken or not taken.
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 3
AIM OF THE ASSIGNMENT:
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
5 Marks are awarded for the arithmetic operations
5 Marks are awarded for the logical operations
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 4
AIM OF THE ASSIGNMENT:
Perform multiplication on two operands without using MUL instruction in ARM assembly language
ASSIGNMENT DESCRIPTION:
Without using MUL instruction, perform multiplication operation on any two operands, with
both of them being: Verify the values computed.
a. Positive numbers
b. One positive and other negative number
c. Both negative numbers
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 5
AIM OF THE ASSIGNMENT:
Compare three register values in r0, r1 and r2 for the largest, the smallest and equality
conditions by suitably initializing them with both negative and positive values.
a. All combinations need to be checked
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 6
AIM OF THE ASSIGNMENT:
To describe condition of CPSR flags using different assembly programs
ASSIGNMENT DESCRIPTION:
Explain CPSR register in detail with examples for all the condition flags (CZNV)
Perform the following functions to set the specific CZNV flags
a. Arithmetic operations (ADD, SUB, RSB)
b. CMP instructions by comparing preset values in registers
c. TST instruction by testing specific bits set in registers
d. Logical operations (LSL, LSR, ASR, ROR, RRX)
e. Perform these special operations and justify the results got (LSL #0, LSR #0, ASR #0, ROR
#0)
2) Explain the following ASM code in detail, giving the reasons for the status of flags (CZNV)
after every instruction is executed.
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 7
AIM OF THE ASSIGNMENT:
To write assembly program to swap the contents of two registers and to reverse a given
string.
ASSIGNMENT DESCRIPTION:
1) Write an assembly language program to swap the contents of register r0 and r1.
2) Write a program to reverse a given string in a known location in memory and writing
the reversed string in another location in memory.
TIME LINES OF THE ASSIGNMENT:
The duration of the assignment is 3 Hours.
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
5 Marks are awarded for swapping the register contents
5 Marks are awarded for reversing the string
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 8
AIM OF THE ASSIGNMENT:
To copy data from one memory location to another memory location using ARM assembly
language programming
ASSIGNMENT DESCRIPTION:
1) Write a program to copy a block of 64 bytes from any memory address location to
another memory location. Set the source and destination registers with suitable
addresses. Use the simulator to initialize those locations with known values and
verify the destination address is copied with those values after executing the
program.
a. Use all the supported addressing modes to perform this memory copy and
verify the contents at the destination address.
b. Verify the behaviour when the starting and/or destination addresses are:
1.b.i. word aligned
1.b.ii. half-word aligned
1.b.iii. byte aligned
TIME LINES OF THE ASSIGNMENT:
The duration of the assignment is 3 Hours.
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 9
AIM OF THE ASSIGNMENT:
Having initialized with a known values in a known locations in memory, perform the
following operations on their contents by writing assembly programs for each and verify by
looking at those values using the simulator:
e. Initialize it with ASCII alphabets, both small and capital letters, then change them
all too capital letters
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta
cognitive
Knowledge
Assignment 10
AIM OF THE ASSIGNMENT:
1) Initialize 256 bytes in memory with the following values and find number of zeros and
ones in them by writing the count of 1's and 0's in two registers
a. All zeros
b. All ones
2) write two different strings in two different locations in memory, of length 64 bytes each.
Then write assembly programs to perform the following operations:
a. Interchange the strings without saving them into any other location in memory
c. Create a new string in another location of 64 bytes, with odd byte locations from
s1 and even byte locations from s2
EVALUATION CRITERIA:
The assignment is evaluated for 10 marks.
5 Marks are awarded for the architectural differences
5 Marks are awarded for the assembly program
SKILL MATRIX
Remember Understand Apply Analyze Evaluate Create
Factual
Knowledge
Conceptual
Knowledge
Procedural
Knowledge
Meta cognitive
Knowledge