Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:docs:fapi:dosbeep [2020/12/06 10:18] – 244 prokushev | en:docs:fapi:dosbeep [2021/09/17 03:37] (current) – prokushev | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{logos:os2.gif? | + | {{page>en:templates:fapiint}} | 
| ====== DosBeep ====== | ====== DosBeep ====== | ||
| This call generates sound from the speaker. | This call generates sound from the speaker. | ||
| - | ==Syntax== | + | ===== Syntax | 
| - |  | + | |
| + | <code c> | ||
| + |  | ||
| + | </ | ||
| + | |||
| + | ===== Parameters ===== | ||
| - | ==Parameters== | ||
| * Frequency ([[USHORT]]) - input : Tone in Hertz (cycles per second) in the range 37 through 32767. | * Frequency ([[USHORT]]) - input : Tone in Hertz (cycles per second) in the range 37 through 32767. | ||
| * Duration ([[USHORT]]) - input : Length of the sound in milliseconds. | * Duration ([[USHORT]]) - input : Length of the sound in milliseconds. | ||
| - | ==Return Code== | + | ===== Return Code ===== | 
| rc ([[USHORT]]) - return | rc ([[USHORT]]) - return | ||
| Return code descriptions are: | Return code descriptions are: | ||
| Line 17: | Line 23: | ||
| *395 ERROR_INVALID_FREQUENCY | *395 ERROR_INVALID_FREQUENCY | ||
| - | ==Remarks== | + | ===== Notes ===== | 
| + | |||
| DosBeep executes synchronously. An application program that invokes DosBeep waits until the specified number of milliseconds expire before it resumes execution. | DosBeep executes synchronously. An application program that invokes DosBeep waits until the specified number of milliseconds expire before it resumes execution. | ||
| - | ==Example Code== | + | ===== Example Code ===== | 
| - | ===C Binding=== | + | |
| + | ==== C Binding ==== | ||
| <code c> | <code c> | ||
| Line 33: | Line 42: | ||
| USHORT | USHORT | ||
| </ | </ | ||
| + | |||
| + | ==== MASM Binding ==== | ||
| + | |||
| + | <code asm> | ||
| + | EXTRN DosBeep:FAR | ||
| + | INCL_DOSPROCESS | ||
| + | |||
| + | PUSH | ||
| + | PUSH | ||
| + | CALL | ||
| + | </ | ||
| + | |||
| + | Returns WORD | ||
| + | |||
| + | ==== Example ==== | ||
| This example generates a beep for 1 second (1,000 milliseconds) at a frequency of 1, | This example generates a beep for 1 second (1,000 milliseconds) at a frequency of 1, | ||
| Line 46: | Line 70: | ||
|  |  | ||
| </ | </ | ||
| - | ===MASM Binding=== | ||
| - | <code asm> | ||
| - | EXTRN DosBeep:FAR | ||
| - | INCL_DOSPROCESS | ||
| - | PUSH | + | ===== Note ===== | 
| - | PUSH | + | |
| - | CALL | + | |
| - | </ | + | |
| - | + | ||
| - | Returns WORD | + | |
| - | === Note === | ||
| Text based on http:// | Text based on http:// | ||




