| <<< add_16_bytes.ASM | Index | Beep Error Codes >>> |
Command
dumpbin /exports C:\Windows\System32\kernel32.dll
prints a list of windows API functions available to a console application.
One of the APIs is a Beep function, which generates simple tone on the system speaker (not using the sound card.)
The following C++ program demonstrates a loop of 50-millisecond Beeps with rising the tone frequency:
#include <iostream>
#include <windows.h>
int main()
{
int ms = 50; // sound duration in milliseconds
for ( int frequency = 100; frequency < 1000; frequency += 10 ) {
std::cout << frequency << " "; // display sound frequency in hertz before each tone.
Beep( frequency, ms );
}
return 0;
}
| <<< add_16_bytes.ASM | Index | Beep Error Codes >>> |