Q1. Write a subroutine that will find the first even number from an array of your VU ID and calculate its factorial. (10 Marks)
Note: Skip 0’s in your VU ID as shown below,
VU ID: BC190206435
After skipping 0’s, array would be:
Array: 1, 9, 2, 6, 4, 3, 5
The first even number is 2 in the array so its factorial will be calculated and saved in AX register. Solution:
data: dw 1, 9,2,6,4,3,5
cmp ah,00h ;checking remainder
start: mov si,00h
Q2. Write a code in assembly language (using appropriate jumps) equivalent to this given code in C. (10 Marks)
int n1=1, n2=2;
largest = n2;
n1 db 1
n2 db 2
largest db 0
mov ax, [n1]
mov bx, [n2]
large: mov [largest],ax
mov ax, 0x4c00
Total Marks 5
Starting Date Thursday, February 11, 2021
Closing Date Friday, February 12, 2021
Question Title Cortex-A OR Cortex-M
A smartwatch is a very useful device developed by several companies these days including Apple, Samsung, Motorola and several others. It has a touch screen interface providing features like GPS tracking, heart rate and sleep monitoring etc. with power efficient batteries. The ARM Cortex processors are used in smartwatches providing several benefits.
Suppose we have to choose between ARM Cortex-A or Cortex-M series architecture for our next generation smartwatch. Which one would you select between the two and why? Support your selection of either architecture with solid reasoning considering memory management, cost, performance and chip size.
Please note that no extra time will be given for posting comments on GDB.
Use the font style “Times New Roman” with font size “12”.
Do not copy or exchange your answer with other students. Two identical comments will be marked zero.
Your comments should not exceed 120 words.