01-04-2013, 09:15 PM
CS401 Computer Architecture and Assembly Language Programming Assignment No.3 , 2013
Assignment No. 03
Semester: Fall 2012
CS401: Computer Architecture and Assembly Language Programming
Total Marks: 20
Due Date: 10 January,2013
Your assignment must be uploaded/submitted before or on 10 January, 2013.
Uploading instructions:
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.
Rules for Marking:
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.
Note:
Your answer must follow the below given specifications. You will be assigned zero marks if you do not follow these instructions.
o Font style: “Times New Roman”
o Font color: “Black”
o Font size: “12”
o Bold for heading only.
o Font in Italic is not allowed at all.
o No formatting or bullets are allowed to use.
Objective
The objective of this assignment is to enhance your knowledge about;
Software Interrupts
Real Time Interrupts and Hardware Interfacing
Assignment No. 3
Question: 1
In this assignment, you have to deal with parallel ports as shown in Fig: 1.You have to read and write the parallel port’s data block using IN and OUT instructions.
We can control AC devices (switching them ON/OFF) by interfacing them with system’s Parallel Port as shown in Fig: 2.We have to use some external Electrical switching circuitry which needs some expertise to design it that will switch those devices ON or OFF depending upon the Parallel Port’s PIN status either Set (1) or Cleared (0).
Fig: 2
Suppose we have interfaced 5 different AC devices with our system’s parallel port and want those to be controlled using five different keyboard keys.
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
F Data Pin 0 FAN Controlled
L Data Pin 1 Light Controlled
T Data Pin 2 Television Controlled
D Data Pin 3 DVD player Controlled
S Data Pin 4 Sound System Controlled
Q NIL Program Exit/Quit/Terminate
Table: 1
In your 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 (depends upon the current state).
Note: 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 “F” to switch ON the FAN then by pressing the key “F” again will switch OFF the FAN as shown in Table: 2.
You have to write a code in assembly language using ASCII standard that take an input character from keyboard (Capital letters:F, L, T, D, S and Q) and on the basis of these characters, you have to control attached AC devices via the parallel port.
Key Pressed D0 D1 D2 D3 D4
F 1 0 0 0 0
L 0 1 0 0 0
T 0 0 1 0 0
D 0 0 0 1 0
S 0 0 0 0 1
Q 0 0 0 0 0
Table: 2
0300-9520262
Get solution in 24 hour |cpmputer & internet
mileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
