We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.


+ Link For Assignments, GDBs & Online Quizzes Solution


+ Link For Past Papers, Solved MCQs, Short Notes & More

Assignment No. 3


Semester Fall 2015
Computer Architecture and Assembly Language Programming– CS401


Total Marks: 20


         Due Date: 20/01/2016


                  The assignment has been designed to enhance your knowledge about Software Interrupts and Real Time Interrupts and Hardware Interfacing.



Please read the following instructions carefully before solving & submitting assignment:


  1. 1.       The assignment will not be accepted after due date.
  2. 2.       Zero marks will be awarded to the assignment that does not open or the file is corrupt.
  3. 3.       The assignment file must be an MS word (.doc) file format; Assignment will not be accepted in any other format.
  4. 4.       Zero marks will be awarded to the assignment if copied (from other student or copied from handouts or internet).


For any query about the assignment, contact only at CS401@vu.edu.pk

Do not post queries related to assignment on MDB.







Question: 1                                                                                                                                       [20 Marks]


Suppose we have interfaced 2 different AC devices with our system’s parallel port and want those to be controlled using 2 different keyboard keys. You have to read and write the parallel port’s data block using IN and OUT instructions.

Devices: Microwave


You have to write an assembly code that will read the device status (read the parallel port) and on the basis of that status, it will turn the specific device ON or OFF depending upon your input provided through keyboard as shown in Table: 1.

Keyboard Key

Data pin linked

Device Controlled or Action Performed


Data Pin 0

Microwave Controlled


Data Pin 1

LCD Controlled



Program Quit or Terminate

Table: 1






In your assembly code, you have to read an input character (ASCII code only) from keyboard and then have to send a specific HEX value to parallel port to turn ON or OFF the specific device depend upon the current state.

For example :

 If a device is ON, by pressing the assigned key the device should be set to OFF or vice versa. For example, if you have pressed “M” to switch ON the Microwave then by pressing the key “M” again will switch OFF the Microwave as shown in Table: 2.

You have to write a code in an assembly language using ASCII standard that take an input character from keyboard (Capital letters: M, L and Q) and on the basis of these characters, you have to control attached AC devices via the parallel port using IN and OUT instructions.


Key Pressed

























Table: 2




Note : You will submit your code written in Word File.







+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Views: 13056


Replies to This Discussion

Can you please help I am not able to understand, because i didn't cover these new topics

Aqsa agar ap solution share kar dein tu we'll be really thankful.

Itny lecture attend kiye hotay to yahan ghoom rahay hotay 

yeh jo pichle page per waleed arshad ne diya hua solution aur pooch raha  theek hai ya nhi ye correct hai?

Aqsa Sister!
Waleed arshad  ki file mein double code (copy,paste) hai
Ap patahein k single code ko pick kr na hai na 

But ap nay assignments to khud ki hain na  Or itna sa ishara hi day deti k Waleed wala solution theek hai, kitno ki life bn jati  tb say keh rahi ho k idea hai idea hai 

aqsa baji assignment ka solution send kar do plz


Looking For Something? Search Here

Latest Activity

Mirha Malik replied to +M.Tariq Malik's discussion CS501 Final Term Papers Spring 2020 & Past Solved Papers, MCQs for Exam Preparation in the group CS501 Advance Computer Architecture
24 minutes ago
Profile Icon+Anastasiya and iqra faiz joined Virtual University of Pakistan
45 minutes ago
AAESH ZEE replied to +M.Tariq Malik's discussion VU MSCS (MS Computer Science) Entry Test Past Papers
1 hour ago
AAESH ZEE replied to +M.Tariq Malik's discussion VU MSCS (MS Computer Science) Entry Test Past Papers
1 hour ago
AAESH ZEE replied to +M.Tariq Malik's discussion VU MSCS (MS Computer Science) Entry Test Past Papers
1 hour ago
Mani Siddiqui BS VIII posted a status
"*_شراب پلا کر مجھے بے دین نہ کر ساقی *_مدہوش ہی کرنا ہے تو محفل میں ذکر یار کر دے."
1 hour ago
Mani Siddiqui BS VIII liked +++**Zuni khan**+++'s discussion ❤️❤️❤️Rasool (S.A.W) Farmaty Hain ❤️❤️❤️
2 hours ago
Mani Siddiqui BS VIII posted a status
"زندگی بڑی عجيب ہے کبھی گلزار سی کبھی بیزار سی"
2 hours ago


This is a member-supported website. Your contribution is greatly appreciated!

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service