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 No. 02

Graded
Semester: Spring 2018

CS609: System Programming

Total Marks: 20

 

Due Date:

May 29, 2018

 

Instructions:

 

Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:

 

§  The assignment is submitted after due date.

§  The submitted assignment does not open or file is corrupt.

§  You have not followed steps described in Detailed Instructions of the problem statement.

§  Assignment is copied(partial or full) from any source (websites, forums, students, etc.) Strict action will be taken in this regard.

 

Note:You have to upload only .doc or .docx file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks.

 

Objectives:

 

The objective of this assignment is to provide hands-on experience ofSystem Programming concepts including:

 

·         Interval Timer

·         Accessing PC Speaker

·         Loading divisor values in Interval Timer

 

 

   

For any assignment related query, contact at CS609@vu.edu.pk

 

 

Problem Statement:

 

Write a C program that will turn on PC speaker (for variable-pitched sound) by using port 61H of Interval Timer. The divisor value for Interval Timer will be last eight digits of your Student ID.

 

Detailed Instructions:

1)      In this program,you will access internal PC speaker by using port 61H. Least two significant bits of port 61H are used for connecting PC speaker to Interval Timer.

2)      In order to program Interval Timer, you have to first load the Command Byte into the Command Register. Calculate Command Byte according to following criteria:

a.       Channel: 2

b.      Interval Timer Mode: 2

c.       Counter: Binary

d.      Divisor bytes to be loaded: All (For calculating divisor value, read instruction 4)

3)      You will first load last four digits of your Student ID as a divisor value (see the purple color digits in below example ID), and then after a delay of 2 seconds, you will again load new divisor value which will be next four digits of your Student ID (see the orange color digits in below example ID).

BC123456789

4)      For producing delay, use Timer Count, a double word variable in the BIOS data area which is placed at the location 0040:006C

5)      After loading each divisor value, turn on the PC speaker

6)      You can check the output of the program by booting your system in DOS mode and then running the exe file. But does not worry if PC speaker does not produce sound; the host operating system may restrict you to directly access PC speaker. Just focus on the concepts.

7)      Your assignment file should be a single Word file (.doc or .docx) containing complete code.

8)      You can use Consolas font for enhancing readability of the code in Word file.

 

 

Best of Luck!

 

 

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

.

+ 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

aik to isme " kbhit " ki smjh nhi arhi or dursa ye btao k apna id kese dalna hy divisor me?mera id bc140400028 hy to ye yhan kese ayega?ASCCI form me dalna hy kya ye? me virtual box me window 98 use kr rha hu apni window 10 me

mene compile kiya hy to mujhe ye error arha hy kbhit me error arha hy 'declaration syntax error'...what's wrong?

Attachments:

yup hap win 98

is mein name and id khan daina hai?


#include<dos.h>
#include<stdio.h>

unsigned long int far *time = (unsigned long int far*) 0x0040006C

void main()

{
unsigned long inttx;
tx=(*time);
printf(“I am the Timer Counter and my Value before Delay is = %d” , tx);
tx=tx+36;
while((*time)< = tx);
{
printf(“I am the Timer Counter and my Value after 2 Seconds Delay is = %d” , tx);
}
printf(“My Name is Engr Emh”);
printf(“I am the Timer Counter and my Value before Delay is = %d” , tx);
tx = tx+36;
while((*time) <= tx);
{
printf(“I am the Timer Counter and my Value after 2 Seconds delay is = %d” , tx);
}
printf(“ My Vu Id is Ms000000000 ”);
}

o bhai tumhara  dimagh set hy?ye 1st assignment ka solution hy jo yhan bar bar post kr rhy ho,soye hue ho kya?

This code is on Page 78 of Handouts.

dosri ma b 3 errors a ry hn bhai

naqash have u done it??

nai kaki wala code e likha ha

tmz ,,first assignment ka solution ye hai Foqi rao

#include<BIOS.H>

#include<DOS.H>

 

unsigned int far *scr = (unsigned int far *) 0xb8000000;

void interrupt (*oldint65)();

void interrupt newint65();

 

void main() {

     

      oldint65 = getvect(0x65);

      setvect(0x65, newint65);

      keep(0, 1000);

}

void interrupt newint65() {

 

      if((_AH) == 0) { // Printing Student ID. Attribute Byte is 01110000 or 70H

            (*scr) = 0x7042;         // B

      (*(scr + 1)) = 0x7043;   // C

      (*(scr + 2)) = 0x7031;   // 1

      (*(scr + 3)) = 0x7032;   // 2

      (*(scr + 4)) = 0x7033;   // 3

      (*(scr + 5)) = 0x7034;   // 4

      (*(scr + 6)) = 0x7035;   // 5

      (*(scr + 7)) = 0x7036;   // 6

      (*(scr + 8)) = 0x7037;   // 7

      (*(scr + 9)) = 0x7038;   // 8

      (*(scr + 10)) = 0x7039;  // 9

 

            outportb(0x20, 0x20); // sending EOI to PIC

            return;

      }

      else {

            if((_AH) == 1) { // Printing Student Name

                  (*scr) = 0x7041;         // A

            (*(scr + 1)) = 0x7042;   // B

            (*(scr + 2)) = 0x7043;   // C

            (*(scr + 3)) = 0x7044;   // D

            (*(scr + 4)) = 0x7045;   // E

            (*(scr + 5)) = 0x7046;   // F

            (*(scr + 6)) = 0x7047;   // G

           

                  outportb(0x20, 0x20); // sending EOI to PIC

                  return;

            }

      }

}

 

RSS

Latest Activity

+ ՏhehαrZααD + replied to + ՏhehαrZααD +'s discussion Assalamu Alaikum
19 minutes ago
+ ! ! ! ! ! Blu Moon replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
58 minutes ago
+ ! ! ! ! ! ! ! ! ! AG liked + Iuuoɔǝut +'s discussion After and Before Marriage situations
1 hour ago
+ ! ! ! ! ! ! ! ! ! AG liked + Iuuoɔǝut +'s discussion Rules for Happy Marriage Life
1 hour ago
+ ! ! ! ! ! ! ! ! ! AG liked +***piya o ry piya***+'s discussion eng201
1 hour ago
+ ! ! ! ! ! ! ! ! ! AG liked 彡JK彡 ❤️'s discussion جسکی سنو وہی فرشتہ
1 hour ago
+ ! ! ! ! ! ! ! ! ! AG liked + ! ❤INNOCENT❤'s discussion Faqeer
1 hour ago
+++"MinShah"+++ updated their profile
1 hour ago
abdul bari updated their profile
1 hour ago
Zain Arshad replied to + M.Tariq Malik's discussion ENG201 Business and Technical English Writing Assignment No 01 Fall 2019 Solution & Discussion in the group ENG201 Business and Technical English Writing
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" replied to + "αяsαℓ " Ќąƶµяɨ •"'s discussion Happy Marriage to "Zee" & " Nomi weds Noor"....!
1 hour ago
+ "αяsαℓ " Ќąƶµяɨ •" and Isha Chuhdary are now friends
1 hour ago
Waseem Aziz added a discussion to the group MGMT627 Project Management
1 hour ago
Waseem Aziz added a discussion to the group STA630 Research Methods
1 hour ago
Waseem Aziz joined + M.Tariq Malik's group
1 hour ago
Zain Arshad replied to + M.Tariq Malik's discussion ENG201 Business and Technical English Writing Assignment No 01 Fall 2019 Solution & Discussion in the group ENG201 Business and Technical English Writing
1 hour ago
Profile IconZain Arshad, Misha Rajpoot and Nimra zahid joined + M.Tariq Malik's group
1 hour ago
Naser Javed (BBIT-6) replied to MIT's discussion Visual Programing (CS411) Assignment#01 Deadline Date = 18-11-2019 in the group CS411 Visual Programming
1 hour ago
Zaheer Bashir replied to + M.Tariq Malik's discussion FIN630 Investment Analysis & Portfolio Management GDB Fall 2019 Solution & Discussion in the group FIN630 Investment Analysis & Portfolio Management
1 hour ago

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

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