Created
December 4, 2013 05:48
-
-
Save michaellindahl/7782978 to your computer and use it in GitHub Desktop.
MASM Assembly code that uses the Windows PlaySound function to play .wav files
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TITLE MASM PlaySound (PlaySoundExample.asm) | |
; Description: MASM Assembly code that uses the Windows PlaySound function to play .wav files | |
; Revision date: Created Dec 3, 2013 by Michael Lindahl | |
includelib Winmm.lib | |
PlaySound PROTO, | |
pszSound:PTR BYTE, | |
hmod:DWORD, | |
fdwSound:DWORD | |
.data | |
deviceConnect BYTE "DeviceConnect",0 | |
SND_ALIAS DWORD 00010000h | |
SND_RESOURCE DWORD 00040005h | |
SND_FILENAME DWORD 00020000h | |
file BYTE "c:\\clap.wav",0 | |
.code | |
main PROC | |
INVOKE PlaySound, OFFSET deviceConnect, NULL, SND_ALIAS | |
INVOKE PlaySound, OFFSET file, NULL, SND_FILENAME | |
exit | |
main ENDP | |
END main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment