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.

Assignment

 

Question 1                                                                                                                                                                              (05 Marks)

Write Code of following in c.

1-      Connect interval timer to speaker and turned it on

2-      Turn off speaker by clearing least significant bits.

 

Question 2:                                                                                                                                            (10 Marks)

 

Write down a TSR program that disables the input of characters ‘b’ and ‘c’ from keyboard.

Scan codes of  'b' and 'c' are given below:

 ‘b’ = 0x30

‘c’ = 0x2E.

 

 

NOTE: Do not worry about the output and just concentrate on logic. There should be no error in your program. Do not put any query on MDB about this assignment, if you have any query then email at cs609@vu.edu.pk.

 

 

 

 

+ 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: 6584

.

+ 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

Aj to Had Ho Gai

cs609 assignment 2

Attachments:

HAFIZ SHAFAQAT BSCS 7  thanks for sharing 

Note for All Members: You don’t need to go any other site for this assignment/GDB/Online Quiz solution, Because All discussed data of our members in this discussion are going from here to other sites. You can judge this at other sites yourself. So don’t waste your precious time with different links.

CS609 ASSIGNMENT 2 SOLUTION FALL 206

Assignment CS 609

Q.no 1

Write Code of following in c.
1-      Connect interval timer to speaker and turned it on
2-      Turn off speaker by clearing least significant bits.

Solution

//Program loads advisor value of 0x21FF
//Turns ON the speaker and connects it to Interval Timer
#include<BIOS.H>
#include<DOS.H>
void main()
{
outportb (0x43,0xB4);
outportb (0x42,0xFF);
outportb (0x42,0x21);
outportb (0x61,inportb(0x61); |3);
getch();
outportb (0x61,inportb(0x61) & 0xFC);
}


Q.no.2
Write down a TSR program that disables the input of characters ‘b’ and ‘c’ from keyboard.
Scan codes of  'b' and 'c' are given below:
 ‘b’ = 0x30
‘c’ = 0x2E.

Solution
#include<dos.h> 
#include<bios.h>
unsigned char far * scr= (unsigned char far *)0x00400017; //Keyboard status byte
void interrupt (*oldint15) ( );
void interrupt newint15 (unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned intIP,unsignedint flags);
void main ( )
{
oldint15 = getvect (0x15);
setvect (0x15, newint15);
keep (0, 1000);
}
void interrupt newint15( unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned int IP, unsigned int flags)
{
if (_AH == 0x4F) 

if ((_AL == 0x1F) && ((*scr) & 0x0c)) //Check for Alt+Ctrl+S

outport (0x43, 0xB4); 
outport (0x42, 0xFF); 
outport (0x42, 0x21);
outport (0x61, inport(0x61) | 3); //Connect to interval timer and and turn the speaker on
}
if (_AL == 0x18) //Check for character 'O' 

outport (0x61, inport(0x61) & 0xFC); //Turn the speaker off
}
}
else
(*oldint15) ( ); 
}

sir second wala question nhi sahi first wala to ho gya ha please help in 2nd question

Q2 ka solution ?????

CS609 ASSIGNMENT 2 SOLUTION FALL 206

Attachments:

plz c format ma files  upload kr dein ...nhi chl raha borland.

cs609 idea solution assignment 2

Question # Complete Idea Solution:

#include
#include
unsigned char far * scr= (unsigned char far *)0x00400017; //Keyboard status byte
void interrupt (*oldint15) ( );
void interrupt newint15 (unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned int IP,unsigned int flags);
void main ( )
{
oldint15 = getvect (0x15);
setvect (0x15, newint15);
keep (0, 1000);
}
void interrupt newint15( unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned int IP, unsigned int flags)
{
if (_AH == 0x4F)
{
if ((_AL == 0x1F) && ((*scr) & 0x0c))
{
outport (0x43, 0xB4);
outport (0x42, 0xFF);
outport (0x42, 0x21);
outport (0x61, inport(0x61) | 3); //Connect to interval timer and and turn the speaker on
}


if (_AL == 0x18) //Check for character 'O'
{
outport (0x61, inport(0x61) & 0xFC); //Turn the speaker off
}
}
else
(*oldint15) ( );
}


Q1 's Answer is on Page#6

cs609 assignment 2 By HAFIZ SHAFAQAT BSCS 7 

Attachments:

thnx sir

Cs609 idea solution

Question # Complete Idea Solution:

#include
#include
unsigned char far * scr= (unsigned char far *)0x00400017; //Keyboard status byte
void interrupt (*oldint15) ( );
void interrupt newint15 (unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned int IP,unsigned int flags);
void main ( )
{
oldint15 = getvect (0x15);
setvect (0x15, newint15);
keep (0, 1000);
}
void interrupt newint15( unsigned int BP, unsigned int DI, unsigned int SI, unsigned int DS, unsigned int ES, unsigned int DX, unsigned int CX, unsigned int BX, unsigned int AX, unsigned int CS, unsigned int IP, unsigned int flags)
{
if (_AH == 0x4F)
{
if ((_AL == 0x1F) && ((*scr) & 0x0c))
{
outport (0x43, 0xB4);
outport (0x42, 0xFF);
outport (0x42, 0x21);
outport (0x61, inport(0x61) | 3); //Connect to interval timer and and turn the speaker on
}


if (_AL == 0x18) //Check for character 'O'
{
outport (0x61, inport(0x61) & 0xFC); //Turn the speaker off
}
}
else
(*oldint15) ( );
}

RSS

Latest Activity

Maryam replied to + M.Tariq Malik's discussion EDU201 Current Final Term Papers Fall 2019 (15 to 26 February 2020) & All Solved Past Papers, Solved MCQs & Helping Material in the group EDU201 Learning Theories
17 minutes ago
+ + + + Haniya + + + + + replied to + + + + Haniya + + + + +'s discussion KUCH LOG
18 minutes ago
+ + + + Haniya + + + + + replied to + + + + Haniya + + + + +'s discussion KUCH LOG
18 minutes ago
+ + + + Haniya + + + + + replied to + + + + Haniya + + + + +'s discussion KUCH LOG
19 minutes ago
Rana Ali replied to + + + + Haniya + + + + +'s discussion KUCH LOG
50 minutes ago
Rana Ali liked + + + + Haniya + + + + +'s discussion KUCH LOG
51 minutes ago
Rana Ali replied to Mani Siddiqui BS VIII's discussion تجھے بھول کر بھی نہ بھلا سکوں ، تجھے چاہ کر بھی نا پا سکوں
52 minutes ago
Rana Ali liked Mani Siddiqui BS VIII's discussion تجھے بھول کر بھی نہ بھلا سکوں ، تجھے چاہ کر بھی نا پا سکوں
54 minutes ago
+ıllıllı $µǥąя ǥ€ɲɨµ$ ıllıllı+ liked + + + + Haniya + + + + +'s discussion KUCH LOG
56 minutes ago
+ıllıllı $µǥąя ǥ€ɲɨµ$ ıllıllı+ replied to + + + + Haniya + + + + +'s discussion KUCH LOG
57 minutes ago
+ıllıllı $µǥąя ǥ€ɲɨµ$ ıllıllı+ liked Mani Siddiqui BS VIII's discussion تجھے بھول کر بھی نہ بھلا سکوں ، تجھے چاہ کر بھی نا پا سکوں
1 hour ago
+ıllıllı $µǥąя ǥ€ɲɨµ$ ıllıllı+ replied to Mani Siddiqui BS VIII's discussion تجھے بھول کر بھی نہ بھلا سکوں ، تجھے چاہ کر بھی نا پا سکوں
1 hour ago

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

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

.