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

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 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: 6548

.

+ 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

2.O replied to 2.O's discussion Dying from Curiosity :P :P
2 hours ago
2.O replied to 2.O's discussion Dying from Curiosity :P :P
2 hours ago
2.O posted discussions
2 hours ago
Azam Khan Buzdar replied to + M.Tariq Malik's discussion VU Students Reserves The Right to Delete Any Profile On the Site
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Me, Mom and Drama serial
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked 彡JK彡 ❤️'s discussion پچھتاوے تو تمہارے لئے ہیں
3 hours ago
+ ! ✨ ░S░I░N░G░E░R replied to 彡JK彡 ❤️'s discussion چھٹی کی درخواست
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked 彡JK彡 ❤️'s discussion چھٹی کی درخواست
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked + "Jɨyą's discussion Aksar...!
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked + "Jɨyą's discussion Saaya...!
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked + "Jɨyą's discussion Cheekh.....!
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked zohaib iftikhar's discussion ...* KIA KOI ALLAH PE AHSAN KR SAKTA HAI??? ...*
3 hours ago
+ ! ! ! ! Ⲙehar Roman replied to october's discussion poetry
3 hours ago
+ ! ✨ ░S░I░N░G░E░R liked Zain Kazimi's discussion self poetry
3 hours ago
+ ! ! ! ! Ⲙehar Roman liked october's discussion poetry
3 hours ago
+ ! ✨ ░S░I░N░G░E░R replied to Zain Kazimi's discussion self poetry
3 hours ago
+ ! ! ! ! Ⲙehar Roman liked ++"S.M.TALHA"++'s blog post ابا جی ڈیڈی اور پاپا میں زمین اور آسمان کا فرق ہوتا ہے
3 hours ago
+ ! ! ! ! Ⲙehar Roman liked ++"S.M.TALHA"++'s blog post سر پلیز....
3 hours ago
+ ! ! ! ! Ⲙehar Roman liked +++STUDENT+++'s blog post Search Beauty
3 hours ago
+ ! ! ! ! Ⲙehar Roman liked +++STUDENT+++'s blog post change
3 hours ago

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

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