

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Your assignment must be uploaded/submitted before or on 17 th^ April 2012
Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.
Assignment should be in .doc format. Save your assignment with your ID (e.g. bx020200786.doc). Assignment submission through email is highly discouraged.
It should be clear that your assignment will not get any credit if: The assignment is submitted after due date. The submitted assignment file is corrupted. The assignment is copied.
Your answer must follow the below given specifications. You will be assigned zero marks if you do not follow these instructions. Font style: “Times New Roman” Font color: “Black” Font size: “12” Bold for heading only. Font in Italic is not allowed at all. No formatting or bullets are allowed to use.
Total Marks = (15 + 5)
Q1.
Part a. Write an SRC assembly language program to evaluate the following expression:
a = 32(b-c) +8(d+32)
Note that your code should not change the source operands and also keep in mind that the SRC does not have a multiply instruction
Part b. You need to determine memory map for the above program using the following scenario.
.ORG 100 ; start the next line at address 100 b: .DW 1 ; reserve one word for the label b in the memory c: .DW 1 ; same for c… this will be at address 104 d: .DW 1 ; the 32-bit memory word d will be at address 108 a: .DW 1 ; reserve one word for the result also ;
.ORG 200 ; start the code at address 200 The code starts at address 200 and each instruction takes 32 bits in the memory.
docsity.com