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

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

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

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


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Share your solutions here!

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 3605

.

+ 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)

Attachments:

Replies to This Discussion

CS401-assignment-sol

CS401-assignment-sol

it is not the solution

I'm not getting it sir. how can we use this n where ?

Respected sir

This is can not be the solution in any case.Kindly share the solution which is pertinent to the question.

Thanks

A.o.A Vu ID kahan dy gay code ma 

*********

This is as close to the working solution as i can get, can someone make some amendments here according to the instructions

https://stackoverflow.com/questions/57134021/how-to-print-a-string-...

CS401 Assignment No 03 Spring 2019 Idea Solution

#Check ur self 

#Code

[org 0x0100]

jmp start

oldisr: dd 0 ; space for saving old isr

; keyboard interrupt service routine

kbisr:

push ax

push es

mov ax, 0xb800

mov es, ax ; point es to video memory

in al, 0x60 ; read a character from keyboard port

cmp al, 0x11 ; has the 'w' key pressed

jne nomatch ; no, go to nomatch

mov byte [es:0], '1' ; yes, print 1

mov byte [es:2], '5' ; yes print 0

jmp exit ; leave interrupt routine

nomatch:

pop es

pop ax

jmp far [cs:oldisr] ; call the original ISR

exit

mov al, 0x20

out 0x20, al ; sent EOI to PIC

pop es

pop ax

iret ; return from interrupt

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 interrupt

mov dx, start ; end of resident portion

add dx, 15 ; round up to next para

mov cl, 4

shr dx, cl ; number of paras

mov ax, 0x3100 ; terminate and stay residant

int 0x21

[org 0x0100]

jmp start


oldisr: dd 0 ; space for saving old isr

; keyboard interrupt service routine

kbisr:

push ax

push es

mov ax, 0xb800

mov es, ax ; point es to video memory

in al, 0x60 ; read a character from keyboard port

cmp al, 0x11 ; has the 'w' key pressed

jne nomatch ; no, go to nomatch

mov byte [es:0], '1' ; yes, print 1

mov byte [es:2], '5' ; yes print 0

jmp exit ; leave interrupt routine

nomatch:

pop es

pop ax

jmp far [cs:oldisr] ; call the original ISR

exit

mov al, 0x20

out 0x20, al ; sent EOI to PIC

pop es

pop ax

iret ; return from interrupt

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 interrupt

mov dx, start ; end of resident portion

add dx, 15 ; round up to next para

mov cl, 4

shr dx, cl ; number of paras

mov ax, 0x3100 ; terminate and stay residant

int 0x21

it is not correct. Please read question once.

correct solution?

cs401 assignment solution.

[org 0x0100]

jmp start

oldisr: dd 0 ; space for saving old isr

; keyboard interrupt service routine

kbisr:

push ax

push es

mov ax, 0xb800

mov es, ax ; point es to video memory

in al, 0x60 ; read a character from keyboard port

cmp al, 0x11 ; has the 'w' key pressed

jne nomatch ; no, go to nomatch

mov byte [es:0], '1' ; yes, print 1

mov byte [es:2], '5' ; yes print 0

jmp exit ; leave interrupt routine

nomatch:

pop es

pop ax

jmp far [cs:oldisr] ; call the original ISR

exit

mov al, 0x20

out 0x20, al ; sent EOI to PIC

pop es

pop ax

iret ; return from interrupt

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 interrupt

mov dx, start ; end of resident portion

add dx, 15 ; round up to next para

mov cl, 4

shr dx, cl ; number of paras

mov ax, 0x3100 ; terminate and stay residant

int 0x21

RSS

Latest Activity

+ M.Tariq Malik liked иαвєєℓ αнмє∂'s discussion !!!!!!!! AE BINTE HAW'A SMNBHAL KE REHNA !!!!!!!!
2 minutes ago
+ M.Tariq Malik liked Azhar Sagar's discussion colony record management system complete srs
2 minutes ago
+ M.Tariq Malik liked Azhar Sagar's discussion colony record management system complete SRS
3 minutes ago
+ M.Tariq Malik liked ٹمبکٹو's discussion حاضری
4 minutes ago
+ M.Tariq Malik liked + ! ! dAd's anGeL ❤️'s discussion -_-
6 minutes ago
+ M.Tariq Malik liked + ! ! S σ η g l's discussion Message Of The Year ....!!
6 minutes ago
+ !! ATHER replied to + M.Tariq Malik's discussion CS605 Software Engineering-II Assignment No 02 Fall 2019 Solution & Discussion Due Date: 06-12-2019 in the group CS605 Software Engineering-II
8 minutes ago
+ M.Tariq Malik liked Muhammad Ishtiaq's discussion Past Papers
9 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MTH401 Differential Equations Assignment No 01 Fall 2019 Solution & Discussion in the group MTH401 Differential Equations
13 minutes ago
+ !! ATHER replied to + M.Tariq Malik's discussion CS605 Software Engineering-II Assignment No 02 Fall 2019 Solution & Discussion Due Date: 06-12-2019 in the group CS605 Software Engineering-II
15 minutes ago
+ M.Tariq Malik replied to + M.Tariq Malik's discussion MTH401 Differential Equations Assignment No 01 Fall 2019 Solution & Discussion in the group MTH401 Differential Equations
15 minutes ago
+ M.Tariq Malik liked + IUUOƆƎUT +'s discussion یہ تو حسن و عشق کے ہیں مرحلے
16 minutes ago

Today Top Members 

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

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

.