We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Looking For Something at Site? Search Below

Question:
Write a Terminate and Stay Resident (TSR) program in assembly language that will hook
Keyboard Interrupt Service routine. When you press N key from keyboard, your name should
be printed on top right corner of the screen and when you release N key, the screen should
be cleared.
NOTE:
• Use scan codes for capturing key presses instead of ASCII codes
• Use DOSBOX and run NASM on it. Complete tutorial is already provided to you on
Announcement page of this course.
• Zero marks will be awarded if you do not provide screenshots
WHAT TO SUBMIT:
Your assignment must be a single Word file (DOC or DOCX) with the following 4 items in it:
1) Complete code in assembly language
2) Screenshot of compilation step. When you save the ASM file keep in mind that file name
MUST be the last 6 digits of your Student ID. For example, if your Student ID is
BC123456789 then file name should be 456789.asm
3) Output screenshot when N key is pressed
4) Output screenshot when N key is released
Sample Output Screenshot when N key is pressed:--- BEST OF LUCK


+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 1078

Replies to This Discussion

401 Dosbox mein error a raha 3rd line mein 
kindly koi resolve krwa day

koi b nhi ha jis k subject cs401 ho 
admin team kahn ha koi to bta dooo kuchh

isko closekr k rerun krein

[org 0x0100]
jmp Start
oldisr:dd 0 ; space for saving old sir keyboardinterrupt service routine
kbisr;
push ax
push es
moy ax, 0xb800
moy es, ax
in al, 0x60
cmp al, 0x31
jne nextcmp
moy byte [es:2],'M'
moy byte [es:4],'A'
moy byte [es:6],'H'
moy byte [es:8],'A'
moy byte [es:10],'M'
jmp nomatch ;leave interrupt routine

nextcmp:
cmp al, 0xB1 ; is the key n is release
jne nomatch ; no, leave interrupt routine
moy byte [es:2],'' ; yes, print space at top left
moy byte [es:4],''
moy byte [es:6],''
moy byte [es:8],''
moy byte [es:10],''

nomatch:
pop es
pop ax
jmp far [cs:oldisr] ; call the original ISR

Start:
xor ax, ax
moy es, ax
moy ax, [es:9*4]
moy [oldisr], ax
moy ax, [es:9*4+2]
moy [oldisr+2], ax ;save segment of old routine
cli ; disable interrupts
moy word [es:9*4], kbisr ;store offset at n*4
moy [es:9*4+2],cs ;store segment at n*4+2
sti

exit:
moy ah, 0
int 0x16

moy ax, 0x4c00
int 0x21

RSS

Latest Activity

+ ! + Ops updated their profile
3 hours ago
Black Wolf updated their profile
3 hours ago
Muhammad Bilal replied to +M.Tariq Malik's discussion FIN624 GDB No 01 Fall 2020 Solution / Discussion in the group FIN624 Islamic Mode of Financing
3 hours ago
Muhammad Bilal replied to Fragrance of Islam's discussion ENG301 Business Communication GDB No 01 Fall 2020 Solution / Discussion in the group ENG301 Business Communication
3 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion SOC101 Introduction to Sociology Online Quiz No 01 Fall 2020 Solution / Discussion Last Date: 01-12-2020 in the group SOC101 Introduction to Sociology
3 hours ago
Muhammad Usman liked +M.Tariq Malik's group EDU430 ICT in Education
3 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion CS402 Assignment 01 Fall 2020 Solution / Discussion in the group CS402 Theory of Automata
3 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion GSC201 Teaching of General Science Assignment 01 Fall 2020 Solution / Discussion Due Date: in the group GSC201 Teaching of General Science
3 hours ago
+M.Tariq Malik liked +M.Tariq Malik's discussion GSC201 Teaching of General Science Assignment 01 Fall 2020 Solution / Discussion Due Date:
3 hours ago
+M.Tariq Malik added a discussion to the group GSC201 Teaching of General Science
3 hours ago
Saqib replied to +M.Tariq Malik's discussion MTH501 Linear Algebra Assignment 01 Fall 2020 Solution / Discussion Due Date: 03-12-2020 in the group MTH501 Linear Algebra
3 hours ago
+M.Tariq Malik replied to +M.Tariq Malik's discussion MTH641 Functional Analysis Online Quiz No 01 Fall 2020 Solution / Discussion in the group MTH641 Functional Analysis
3 hours ago

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

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

.