VOGONS


Help Beep Sound

Topic actions

First post, by mau80

User metadata
Rank Newbie
Rank
Newbie

Hi to all,

I'd like to write a simple ASM Program that should works under DOSBOX environment under Windows XP/7

This program should perform any type of beep using simplest mode in assembly language eg:

mov dl, 07h
mov ah, 2
int 21h ; DOS beep

this beep could be redirect to soundcard or any other devices, It's not mandatory perform the beep using pc speaker.

I've try various task but I'm not able to perform that action.

Before post I've try to search for similar thread, but I've not found nothing that could resolve my problem.

Cold you give to me some help

Thank you very much
Maurizio

Reply 1 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

we don't emulate that specfic beep.
Games generally use more advanced ways of generating beeps.

Water flows down the stream
How to ask questions the smart way!

Reply 2 of 4, by mau80

User metadata
Rank Newbie
Rank
Newbie

Thank you for your reply!

I'd like to ask if you could send to me some piece of ASM code for emulate any kind of sound like beep, the simplested sound that is possible to perform.

Anyway I've seen in configuration wiki that DOSBOX supports PC Speaker

http://www.dosbox.com/wiki/Sound#PC_Speaker

I've supposed that cold be possibile to redirect PC Speaker sound to other kind of devices.

Thank you again
Maurizio

Reply 4 of 4, by Gatran

User metadata
Rank Newbie
Rank
Newbie

I did a little test to confirm what the authors said, and it is correct that '7' will not play through speakers etc.

[org 0x0100]

[section .text]
xor al,al ;Make sure AL is nil
mov al,0x07 ;Place beep into AL
int 0x29 ;Use 0x29 to display char in AL.. faster than 0x21!
mov ah,0x4C ;0x07 is already in AL, so return will be '7'
int 0x21 ;Exit