Jump to content

DevHelp Beep: Difference between revisions

From EDM2
Created page with "This service generates a beep. ==Syntax== ===C=== <PRE> USHORT APIENTRY DevHelp_Beep(USHORT Frequency, USHORT DurationMS); </PRE> ===Assembler=..."
 
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:DevHelp_Beep}}
This service generates a beep.  
This service generates a beep.  


Line 4: Line 5:
===C===
===C===
<PRE>
<PRE>
USHORT APIENTRY DevHelp_Beep(USHORT Frequency,
USHORT APIENTRY DevHelp_Beep(USHORT Frequency, USHORT DurationMS);
                            USHORT DurationMS);
</PRE>
</PRE>


Line 18: Line 18:
==Parameters==
==Parameters==
===C===
===C===
; Frequency (USHORT) : Frequency of beep in Hz
; ''Frequency'' ([[USHORT]]) - input: Frequency of beep in Hz
; DurationMS (USHORT) : Duration of beep in milliseconds
; ''DurationMS'' (USHORT) - input: Duration of beep in milliseconds
===Assembler===
===Assembler===
<PRE>
<PRE>
Line 33: Line 33:
Success Indicator: 0
Success Indicator: 0


Possible errors:
;Possible errors: ERROR_INVALID_FREQUENCY (395)
ERROR_INVALID_FREQUENCY (395)


===Assembler===
===Assembler===

Latest revision as of 18:12, 23 May 2025

This service generates a beep.

Syntax

C

USHORT APIENTRY DevHelp_Beep(USHORT Frequency, USHORT DurationMS);

Assembler

MOV   BX,_Freq        ; Frequency of beep in Hz
MOV   CX,_Duration    ; Duration of beep in milliseconds
MOV   DL,DevHlp_Beep

CALL  [Device_Help]

Parameters

C

Frequency (USHORT) - input
Frequency of beep in Hz
DurationMS (USHORT) - input
Duration of beep in milliseconds

Assembler

MOV   BX,_Freq        ; Frequency of beep in Hz
MOV   CX,_Duration    ; Duration of beep in milliseconds
MOV   DL,DevHlp_Beep

CALL  [Device_Help]

Return Code

C

Success Indicator: 0

Possible errors
ERROR_INVALID_FREQUENCY (395)

Assembler

   'C' Clear if successful.
       AX = 0.

   'C' Set if error.
       AX = Error code.
            Possible errors:
               ERROR_INVALID_FREQUENCY (395)

Remarks

This function uses the DX register.

Example Code

C

#include  "dhcalls.h"

USHORT APIENTRY DevHelp_Beep(USHORT Frequency,
                             USHORT DurationMS);

Related Functions