Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have to modify the below MASM611 program, tone25.asm, so that the 0.25-second 1 KHz tone plays five times, once each second. I am to

I have to modify the below MASM611 program, tone25.asm, so that the 0.25-second 1 KHz tone plays five times, once each second. I am to use DOS INT 21H Function 2CH (Get Time) to read the system clock, then look for the seconds value to change which when it does, a 0.25-second tone should play. Then the program should ask that the system clock be watched again, waiting for the seconds to change again. This should be done five times.

This is the program I have written so far however, I am stuck on getting the .25 second 1 KHz tone to play five times, once each second. Could you please help me to correct this incomplete MASM program so that it will play the .25 second tone five times?

Tone25.asm:

;Program TONE25.ASM: Generate a 1 KHz tone on the PC speaker for 5 seconds.

;

.MODEL SMALL

.DATA

;Note: The inner and outer loop count values are adjusted to get the .25 second tone.

;This program was run on a 2.5 GHz machine.

OUTER DW 40 ;outer loop count

INNER DW 500 ;inner loop count

.CODE

.STARTUP

CALL SPKRON ;turn speaker on

MOV CX,1190 ;divisor for 1 KHz tone

INT 21H ;DOS call get time

CALL LDTIMER ;set speaker frequency

CALL DELAY ;wait for chosen duration

CALL SPKROFF ;turn speaker off

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

What are Measures in OLAP Cubes?

Answered: 1 week ago

Question

How do OLAP Databases provide for Drilling Down into data?

Answered: 1 week ago

Question

How are OLAP Cubes different from Production Relational Databases?

Answered: 1 week ago