Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.



Please read the following instructions carefully before submitting assignment:

It should be clear that your assignment will not get any credit if:


  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Solution is copied from any other source.


Note: You have to upload only .doc file. Assignment in any other format (extension) will not be accepted.



The objective of this assignment is to enhance your knowledge about;


  • Software Interrupts
  • Real Time Interrupts and Hardware Interfacing







DC motor (fig 1) is operated through two terminals, whenever the potential difference is created (through batteries, cells etc) across these terminals the motor starts its motion.




Suppose we have connected a DC motor to our system’s parallel port through a secure circuitry (fig 3).


We wish to operate the DC motor through our parallel port (fig 2) using some input through our keyboard. Like “F” key for running motor in “Forward Direction”, “R” for “Reverse Direction”, “S” for “Stop” and “E” for “Exit from code”.


We have suggested that we will use parallel port’s Pin 2 and Pin 3 (the last 2 pins of parallel port’s data check fig 2 and table 1).



Pin 2

Pin 3













No Operation

Table 1


You have to write a code in assembly language that take an input character from keyboard (S, F, R and E) and on the basis of these characters transmit the code (with respect to the truth table) to the parallel port to operate that connected DC motor.


NOTE: your code only use ASCII code for Capital letters F, R, S and E as an input from the keyboard and will transmit the specific data to the parallel port. Through this program, we are interested in communicating with a DC motor through parallel port.


Views: 7720


Replies to This Discussion

please yar koi tu solution send kardu. kahan chalay gay saray laik bachay.

ya es subject ki kisi ko samaj hi nahin meri tara ????????????????


me samag raha tha ye subject sirf  muje hi nhi atta lakin aub pata  chala is hamam me hum sub nagay han

Bilkul sahi yaha kisi ko Assembly nahi atti !!!!  :(

wasim aise b koi bat nahi , hamry sir Bilal saib ko assembly language ati hein

 tou kia muhammad ishtiaq , Ap kay sir bilal sirf ap ki hi madad kartay hain . Hamari nhn Kar saktay ? ..

kya is ka snap shot ly k submit krwna ha ya just word p likhna ha ???? plz guide sm1 

kya is ka snap shot ly k submit krwna ha ya just word p likhna ha ???? plz guide sm1 

[org 0x100]
             jmp start

oldisr:        dd 0                       ; space for saving old isr
kbisr:        push ax                       ; keyboard interrupt service routine
              push es
              mov  ax, 0xb800
              mov  es, ax             ; point es to video memory
              in   al, 0x60                        ; read a char from keyboard port
              cmp  al, 0x2a                      ; is the key left shift
              jne nextcmp                                      ; no, try next comparison
              mov byte [es:0], 'F'              ; yes, print L at top left
              jmp nomatch                      ; leave interrupt routine

nextcmp:      cmp al, 0x36           ; is the key right shift
              jne nomatch                   ; no, leave interrupt routine
              mov byte [es:0], 'R'                         ; yes, print R at top left
                                       ; mov al, 0x20
              mov byte [es:0], 'S'                         ; yes, print L at top left
              jmp nomatch                         ; leave interrupt routine

              cmp al, 0x36               ; is the key right shift
              jne nomatch                         ; no, leave interrupt routine
              mov byte [es:0], 'E'               ; yes, print R at top left

nomatch:      mov al, 0x20
              out 0x20, al
              pop es
              pop ax
              jmp far [cs:oldisr]              ; call the original ISR
start:        xor ax, ax
              mov es, ax                                ; point es to IVT base
              mov ax, [es:9*4]
              mov [oldisr], ax                     ;  save offset of old routine
              mov ax, [es:9*4+2]
              mov [oldisr+2], ax                   ; save segment of old routine
              cli                                            ; disable interrupts
              mov word [es:9*4], kbisr          ; store offset at n*4
              mov [es:9*4+2], cs                  ; store segment at n*4+2
              sti ; enable interrupts

l1:           mov ah, 0                                      ; service 0 – get keystroke
              int 0x16                                 ; c all BIOS keyboard service
              cmp al, 27                       ; is the Esc key pressed
              jne l1                      ; if no, check for next key
              mov ax, 0x4c00 ; terminate program
              int 0x21

plz check it and tell me is it right or wrong...........give comment about this code

This is 9.5 example of handouts DEar... kabi handouts b dkh lea karin and totaly wrong soultion... 

Just word file mdm meshi khan


sirrr billllal sahib kahan ho kuch tu socho, hmari duain hi lay lo hmari madad kar kay......


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

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