Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CS401 assignment no 3 Solution 20th January 2016
#1
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
LCD
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
M
Data Pin 0
Microwave Controlled
L
Data Pin 1
LCD Controlled
Q
NIL
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
D0
D1
D2
D3
D4
M
1
0
0
0
0
L
0
1
0
0
0
Q
0
0
0
0
0

Table: 2



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

0300-9520262
Get solution in 24 hour
|cpmputer & internetConfusedmileys81:[SIZE="4"][SIZE="3"]....[/SIZE][/SIZE]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  CS508- Modern Programming Languages Assignment No. 03 Solution January 2016 Vuhelper 0 4,559 01-20-2016, 05:43 PM
Last Post: Vuhelper
  Human Computer Interaction (CS408) Assignment no 3 20th January 2016 Vuhelper 0 1,059 01-20-2016, 05:13 PM
Last Post: Vuhelper
  CS101 Introduction to Computing Assignment No.2 Solution Spring Semester 2013 Vuhelper 4 12,093 12-13-2014, 01:23 AM
Last Post: Vuhelper
  ENG101 English Comprehension Assignment No.1 Solution Spring Semester 2013 Vuhelper 3 4,602 11-25-2014, 03:35 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No. 3 Solution Spring Semester June 2013 Vuhelper 1 4,066 06-24-2013, 10:39 PM
Last Post: Vuhelper
  MGT101 Financial Accounting Assignment 2 Solution Spring Semester June 2013 Vuhelper 0 3,068 06-15-2013, 11:57 PM
Last Post: Vuhelper
  ISL201 Islamic Studies Assignment No.1 Solution Spring Semester 2013 Vuhelper 0 4,560 05-17-2013, 09:33 PM
Last Post: Vuhelper
  CS201 Introduction to Programming Assignment No.2 Solution Spring Semester 2013 Vuhelper 5 6,525 05-17-2013, 02:55 AM
Last Post: Xpert
  ENG201 Assignment No.2 Solution Spring Semester 2013 Vuhelper 1 5,738 05-16-2013, 04:41 PM
Last Post: Vuhelper
  ENG001 Elementary English Assignment No. 2 Solution Spring Semester 2013 Vuhelper 0 3,995 05-14-2013, 10:20 PM
Last Post: Vuhelper

Forum Jump:


Users browsing this thread: 1 Guest(s)