05-15-2015, 03:45 AM
[h=1]CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1 Solution and Discussion Spring 2015 Due Date: May 20, 2015 spring 2015 idea solution[/h]
Question 1 Marks 10
Suppose the current state of all registers, pointers and segments are provided through the AFD snap
![[Image: attachment.php?attachmentid=24787&stc=1]](http://www.vuhelp.net/attachment.php?attachmentid=24787&stc=1)
You are required to calculate Physical Addresses for the following two combinations:
Question 2 Marks 10
Assume the following Pseudo Code and convert it into proper assembly language instructions that should be assembled and debugged using NASM.
Question 1 Marks 10
Suppose the current state of all registers, pointers and segments are provided through the AFD snap
You are required to calculate Physical Addresses for the following two combinations:
- BX+SI+0xFF00
- BP+DI+0xA000
Question 2 Marks 10
Assume the following Pseudo Code and convert it into proper assembly language instructions that should be assembled and debugged using NASM.
- Declare an array named as P_NUM of 5 elements that contains first five prime numbers.
- Set CX to 5 in decimal.
- Move the first element of P_NUM array to the AX.
- Move the fourth element of P_NUM array to the BX.
- Move last element from P_NUM array to the DX.
- Add the values of AX and BX and store the result in AX.
- Add the values of new AX and DX and store the result in BX.