+ Link For Assignments, GDBs & Online Quizzes Solution
+ Link For Past Papers, Solved MCQs, Short Notes & More
How to Add New Discussion in Study Group ? Step By Step Guide Click Here.
Assignment No. 02
CS609: System Programming
Total Marks: 20
May 29, 2018
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.
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
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.
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).
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!
+ 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)
Last time b Sary Ideas wrong thy so it kindly requested k is dafa video bna k upload kar dayin ta k kuch smj b ay aur log apny hath sa b kam karin, jusst copy paste na karin
u r rit bro 1st assignment ideas b wrong thy es dafa sab mil k correct solution find kry
yar koi demo deskta hy k ye program kahan likhny hn or file kesi hogi?or compile kahan krna hy program?plz reply kren
u r alright jasy cs506 wgra ki itni helping video upload ho jati hai solution es tarha cs609 ki hona chahy
mujhe to is subject ka kuch b nai aata. Assembly language ne bhi mera gpa khrb kia tha. ye bhi usi ki behn hai. :-)
Assembly is se kafi easy thi mera usme gpa 3.4 tha but iski abi smjh nhi arhi muje start ka pta nhi chal rha na hi teacher ye btaty k konsa compiler kahan se download hoga or kese hm c file bnakr compile krengy ye sirf coding krwa rhy hn programs ki
lecture number 9-10 ma examples dakh layin sub, solution usi ma sa mil jay ga baki ma b abi dakh raha ho agar kisi ko solution mil jay do share with video. thanks in advance.
Some helping material I found:
See sample program:
Powerpoint ma mentioned program turbo C ma work karta ha using DosBox aur PC speaker (not cpu speaker) bhi beep kar rha tha but Timer interval function ma syntax error show kar rha ha not sure why.
Maybe Borland C++ compiler use karna ha but VU downloads ma mentioned kuch compile nai karta aur internet pr compiler nai mil rha.. default library directory Y:\CS609\Borland... something ha jo change bhi nai hota aur library not found error ata ha..
Hope someone make it work from here...
Borland C++ compiler se to hmry laptop hang he ho gya tha mene us ko uninstall kia to dubra kam karny laga.
laptop hi thakkar hoga apka
kisi ko pta chla k kya krna hy?9th or 10th lecure me itna khas nhi btaya hua k assignment hojaye wo dekh kr
himat kro kal last date hai....