Write a C program 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
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)
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).
BC1 23456789
For producing delay, use Timer Count, a double word variable in the BIOS data area which is placed at the location 0040:006C
After loading each divisor value, turn on the PC speaker
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.
Your assignment file should be a single Word file (.doc or .docx) containing complete code
Write a C program 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
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)
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).
BC1 23456789
For producing delay, use Timer Count, a double word variable in the BIOS data area which is placed at the location 0040:006C
After loading each divisor value, turn on the PC speaker
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.
Your assignment file should be a single Word file (.doc or .docx) containing complete code
Write a C program 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
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)
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).
BC1 23456789
For producing delay, use Timer Count, a double word variable in the BIOS data area which is placed at the location 0040:006C
After loading each divisor value, turn on the PC speaker
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.
Your assignment file should be a single Word file (.doc or .docx) containing complete code