Solved

Beep in assembly

Posted on 2000-03-15
6
1,249 Views
Last Modified: 2008-03-06
How to make a beep in assembly language?

mov ax, 0e07h
xor bx,bx
int 10h

doesn't work when I boot computer from diskette (it works when I boot from C: Windows98)
0
Comment
Question by:serg111
  • 3
  • 2
6 Comments
 
LVL 5

Expert Comment

by:Wyn
ID: 2621943
Your diskette also win98-boot diskette?
0
 
LVL 10

Accepted Solution

by:
rbr earned 41 total points
ID: 2622518
The problem is that this will only work if the ansi-table is load where Ascii-7 is translated into the bell signal. It looks like you don`t have a correct ansi table on your boot disk.

Try this

mov al,182
out 43h,al
mov ax, 2711 /* 1193180 / 440Hz */
out 42h,al
mov al,ah
out 42h,al
in  al,61h
or  al,11b
out 61h,al /* Now the tune is played */

mov cx,15
mov dx,0
mov ah,86h
int 15h    /* Waits for about 1 sec */
in  al,61h
and al,11111100b
out 61h,al /* Finish the tune */

0
 
LVL 5

Expert Comment

by:Wyn
ID: 2622593
->if the ansi-table is load
==============================
rbr ,sorry for breaking in ,would you please... tell me what is ansi-table ? load to where?
Thank you very much!!!
0
Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

 
LVL 10

Expert Comment

by:rbr
ID: 2622858
device=\windows\command\ansy.sys
0
 
LVL 5

Expert Comment

by:Wyn
ID: 2623573

Loading a .sys means what?
run a program or what?

I'm sorry for asking here,rbr.
Just very curious:)
0
 
LVL 4

Expert Comment

by:nils pipenbrinck
ID: 2624264
ansi.sys installs the ansi display driver.. you can do some neat things with it.. like deleting lines, setting the cursor position, changing colors and so on.

that's a old standard for screen output...  for god's sake it's obsolete on windows machines now. it's a slow pice of (Edited by Computer101) driver imho..

anyways.. it also made it possible to beep the speaker if you print the standard bell character (07 I think).

0

Featured Post

Save on storage to protect fatherhood memories

You're the dad who has everything. This Father's Day, make sure your family memories are protected. My Passport Ultra has automatic backup and password protection to keep your cherished photos and videos safe. With up to 3TB, you have plenty of room to hold the adventures ahead.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now