Thursday 14 May 2015

CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1 Solution May 2015

CS401 - Computer Architecture and Assembly Language Programming Assignment No. 1 Solution and Discussion Spring 2015 Due Date: May 20, 2015 spring 2015 idea solution
You are required to calculate Physical Addresses for the following two combinations:


  1. BX+SI+0xFF00
  2. 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.


  1. Declare an array named as P_NUM of 5 elements that contains first five prime numbers.
  2. Set CX to 5 in decimal.
  3. Move the first element of P_NUM array to the AX.
  4. Move the fourth element of P_NUM array to the BX.
  5. Move last element from P_NUM array to the DX.
  6. Add the values of AX and BX and store the result in AX.
  7. Add the values of new AX and DX and store the result in BX.