NPTEL C Programming And Assembly Language Assignment Solutions
NPTEL C Programming And Assembly Language Week 1 Assignment Answers 2023
1. What are the values of the registers AX and BX after the following assembly code executes ?
- AX=2, BX=1
- AX=1, BX=1
- AX=3, BX=1
- AX=2, BX=3
Answer :-For Answer Click Here
2. What is the value of the zero flag at the end of this program’s execution
- 0
- 1
Answer :- For Answer Click Here
3. For the following instructions
When MOV AL,01 is reached it is necessarily the case that CL= 0
- True
- False
Answer :- For Answer Click Here
4. Say the following 7 bytes are stored in the extra segment
with address of the last element 81 being stored at START_ADDR and the addresses increasing as you go up the list from the bottom up. Consider the following program to search for 47.
What is the value of ECX when REPNE SCASB finishes executing?
Answer :- For Answer Click Here
5. Say the opcode size of REP MOVSB is 1 byte and at present EIP=0x0F21 and ECX=09. The instruction REP MOVSB is executed. After the execution, we observe that CX=00. Then, EIP= _ ?
- 0x0F2B
- 0x0F29
- 0x0F22
- 0x0F2A
Answer :- For Answer Click Here
6. NOTE:- ECS=0x0141, EDS=0x1600, ESS=0x2512, EES=0x3509, EAX=0x0116, EBP=0x4567.
Assume that there are two arrays as follows:-
After the following snipped code executes, what will be the values in Array-1, Array-2?
Answer :- For Answer Click Here
7. The value stored in the registers EAX, EDX after the execution of the following code snippet is
- EAX=06, EDX=00
- EAX=12, EDX=00
- EAX=06, EDX=02
- EAX=12, EDX=02
Answer :- For Answer Click Here
8. If EAX=0x2117, ECX=0x2434, ESS=0x1041 and ESP=0xF612. Analyse the following assembly code snippet. What is the value of ESP after the following code executes?
- 0xF610
- 0xF611
- 0xF612
- 0xF613
Answer :- For Answer Click Here
9. If ECS=0x0141, EDS=0x1634, ESS=0x2512, EES=0x3509, EAX=0x0116, EBP=0x4567, the Address accessed by the instruction [EAX+0x0026] is
- 0x1647C
- 0x1647D
- 0x01771
- 0x01770
Answer :- For Answer Click Here
10. The value stored in the ECX register after the above code snippet executes:
- 6
- 7
- 5
- 4
Answer :- For Answer Click Here
11. The value stored in the register EDI after the above code snippet executes:
- 0x0213
- 0x0214
- 0x0215
- 0x0216
Answer :- For Answer Click Here
12. What is the value of the Direction Flag after the above code snippet executes
- 0
- 1
- Cannot say
Answer :- For Answer Click Here
Course Name | C Programming And Assembly Language |
Category | NPTEL Assignment Answer |
Home | Click Here |
Join Us on Telegram | Click Here |