.... How to Find Your Subject Study Group & Join ....   .... Find Your Subject Study Group & Join ....  

We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Study Groups By Subject code Wise (Click Below on your university link & Join Your Subject Group)

[ + VU Study Groups Subject Code Wise ]  [ + COMSATS Virtual Campus Study Groups Subject Code Wise ]

Looking For Something at vustudents.ning.com?Search Here

Assignment No. 3

Graded

Semester Fall 2015
Computer Architecture and Assembly Language Programming– CS401

 

Total Marks: 20

 

         Due Date: 20/01/2016

Objective:

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

 

                  Instructions:

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.

 

GOOD LUCK

 

 

 

 

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.

                                                                                                                                                                                

 

 

 

 

                                         

Share This With Friends......


How to Find Your Subject Study Group & Join.

Find Your Subject Study Group & Join.

+ Click Here To Join also Our facebook study Group.


This Content Originally Published by a member of VU Students.

+ Prohibited Content On Site + Report a violation + Report an Issue


Views: 12811

See Your Saved Posts Timeline

Attachments:

Replies to This Discussion

Please Discuss here about this assignment.Thanks

Our main purpose here discussion not just Solution

We are here with you hands in hands to facilitate your learning and do not appreciate the idea of copying or replicating solutions.

CS401 Assignment ka solution hay ap k pass?

koi ye to bta ko assign kis lectures ko cover kar rahi ?

1 to 27

Sir Tariq comment change kar len plz bht purana ho gia he plz

right 

aqsa cs401 assignment complete hui

27. Programmable Interval Timer and Parallel Port

Dear Students Don’t wait for solution post your problems here and discuss ... after discussion a perfect solution will come in a result. So, Start it now, replies here give your comments according to your knowledge and understandings....

ye assignment kuch is assignment sy milti julti hai check karo is ko b ho sakta hai kuch tu help mul jay

Attachments:

SOLUTION:

 

ORG 0100H

      

                        XOR AX, AX                                    ; clearing AX

                        XOR DX, DX                                    ; clearing DX

 

MAIN:                       

                        MOV AH, 1H                         ; keyboard input

INT 21H                                 ; read character into AL

 

CMP AL, 53H                                    ; compare AL with “S”

JE S                                         ; jump to “Stop routine”

 

CMP AL, 46H                                    ; compare AL with “F”

                        JE F                                         ; jump to “Forward routine”

 

CMP AL, 52H                                    ; compare AL with “R”

JE R                                        ; jump to “Reverse routine”

 

CMP AL, 45H                                    ; compare AL with “E”

JE END                                   ; jump to “Exit routine”

 

JMP MAIN                             ; jump to main program

 

S:                     MOV AL, 00H                       ; setting AL to STOP mode

MOV DX, 0x378                                           

OUT DX, AL                         ; writing data to Parallel port

JMP MAIN

 

F:                     MOV AL, 01H                       ; moving motor in forward direction

MOV DX, 0x378                                           

OUT DX, AL                         ; writing data to Parallel port

JMP MAIN

 

R:                    MOV AL, 02H                       ; moving motor in reverse direction

MOV DX, 0x378                                           

OUT DX, AL                         ; writing data to Parallel port

JMP MAIN

 

END:               MOV AX, 4C00H

INT 21H

 

ye code  ap nay kis software par run kiya Ayeeza

RSS

Forum Categorizes

Job's & Careers (Latest Jobs)

Admissions (Latest Admissons)

Scholarship (Latest Scholarships)

Internship (Latest Internships)

VU Study

Other Universities/Colleges/Schools Help

    ::::::::::: More Categorizes :::::::::::

Member of The Month

1. +ɹǝʞɔɐɥ

Punjab, Pakistan

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

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