19CS303 - Embedded System - Midterm Answer Key
19CS303 - Embedded System - Midterm Answer Key
No
1 3+2
a). Write the machine code for the instruction LHLD AF7CH in 8085 microprocessors. (Hint: Opcode of LHLD
is 2AH)
Machine Code: Stored in the memory as 2A, 7C, AF (1.5M)
Binary Code: 0010 1010 0111 1100 1010 1111 (1.5M)
ii). How many locations are required to store the above program in memory? 17 memory location
(Specify how many locations for each instruction) – 3 M
iii). What is the overall logic of the program? Transferring 15 memory location data from 3000H to 5000H. –
3M
4 5+5
a). Consider the array given as
Array DCD 0xAABCDEFF
If the starting address of an array is 0X0000000F, then show how the bytes of the 32-bit array elements are
stored in the memory:
a. If the computer system is Big endian
b. If the computer system is Little endian
a)
Memory Data
Address
0X0000000F 0xA
A
0X00000010 0XB
C
0X00000011 0XD
E
0X00000012 0XF
F
b)
Memory Address Data
0X0000000F 0xFF
0X00000010 0XDE
0X00000011 0XBC
0X00000012 0XAA
Address- 2M
Table – 3M
b). In ARM, let register R0 has the value 0xDFACEBA. Predict the output for the following operations? Write
the respective ARM instruction for the following operations.
i. Logical Right Shift by 5-bits
ii. Arithmetic Left Shift by 3-bits
b). List the enhanced RISC features added to ARM processors? [3M}
Control over ALU and shifter for every data processing operations to maximize their usage.
Auto increment and decrement addressing modes to optimize program loops
Load and store multiple instructions to maximize data throughput.
Conditional execution of instruction to maximize execution throughput.
c). What type of access is provided to CPSR during Privileged and Non privileged modes? [2M]
Processor Modes determines
Which registers are Active
Access Rights to CPSR Register itself
Each Processor Mode is either
Privileged :
• Full Read-Write access to the CPSR
Non-Privileged :
• Only Read access to the Control Field of
CPSR but Read-Write access to the Condition Flags
d). Find the value in R3 and R5 after execution of the following instructions? [2M]
MOV R1, #0x0A
MOV R2, #0x05
ADD R3, R1, R2 – R3=0x0F
BIC R5, R1, R2 - R5=0xFA