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.

Computer Architecture and Assembly Language Programming (CS401)

Assignment No. 3

 

Total marks = 20                                                                              

 

Deadline Date:

July 15, 2021

Please carefully read the following instructions before attempting assignment.

RULES FOR MARKING

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

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if the submitted solution is copied from any other student or from the internet.

You should concern the recommended books to clarify your concepts as handouts are not sufficient.

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scan images, PDF, zip, rar, ppt and bmp etc. will not be accepted.

Topics covered:

·         Terminate & Stay Resident

·         Hooking keyboard interrupt service routine

 

                                                                                     

NOTE

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning). Hence refrain from uploading your assignment in the last hours of the deadline. It is recommended to upload the solution file at least two days before its closing date.

If you find any mistake or confusion in the assignment (Question statement), please contact your instructor before the deadline. After the deadline, no queries will be entertained in this regard.

For any query, feel free to email at cs401@vu.edu.pk

 

  1. Write an assembly language program to color the entire screen in two halves. Upon running the program, the left half of the screen should become green when the spacebar key is pressed. After that, when the spacebar key is released, the right half of the screen should become blue. The program should terminate when the Enter key is pressed.

 

What to submit:

Your assignment must be a single Word file with the following three items in it:

  • Complete assembly language program.
  • Screenshot of the compilation step. The .asm file name must be the last 5 digits of your VUID. For example, if the VUID is BC020456789, then the file name should be 56789.asm
  • Screenshot of the final output.

 

 Best of luck!

Views: 533

Replies to This Discussion

[org 0x0100]
jmp start
oldish: dd 0
kbisr:
push ax
push es
mov ax, 0xb800
mov es, ax
in al, 0x60
cmp al, 0x39
jne nextcmp
mov ax, 0600h
mov bh, 20h
mov cx, 0000h
mov dx, 1827h
int 10h
nextcmp:
cmp al, 0xB9
jne nextcmp1
ov ax, 0600h
mov bh, 17h
mov cx, 0040h
mov dx, 184Fh
int 10h
nextcmp1:
pop es
pop ax
jmp far [cs:oldisr]

start:
xor ax, ax
mov es, ax
mov ax, [es:9*4]
mov [oldis], ax
mov ax, [es 9*4+2]
mov [oldisr+2], ax
cli
mov word [es:9*4], kbisr
mov [es:9*4+2], cs
sti
rs:
mov ah,0
int 0x16
cmp al,13
jne rs
mov ax,4C00h
int 21h

; end here

remember download both pics and upload them in word file then submit it and also write code first then upload pics



Download Solution File: Click Here

RSS

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

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