flat assembler
Message board for the users of flat assembler.

Index > DOS > bell

Author
Thread Post new topic This topic is locked: you cannot edit posts or make replies.
xddxogm3



Joined: 09 Nov 2005
Posts: 12
xddxogm3
everytime i write something in fasm and it doesn't work, i get a bell that rings. i'm at work and this is starting to anoy others, how do you turn the bell off? if it helps, i was assembling my program.

Code:
;First FASM Program
;
                org     100h

Main:

        call input_String

        call print_String

        int     20h             ;exit program

endProgram:

input_String:

        mov     ah,10
        mov     dx,buffer
        int     21h

ret

print_String:

        mov     dx,buffer
        mov     ah,9
        int     21h

ret

;Data Area
number1:        db      81,"$"
number2:        db      81,"$"
@m0:            db      'Enter Number: ',"$"
                                                                                                
    


i'm not sure why the bell is sounding?? is it my code? can i disable it?
Post 11 Nov 2005, 23:33
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Code:
org 100h

mov ah,0ah
mov dx,buf
int 21h

mov ah,9
mov dx,buf
int 21h

mov ah,4ch
int 21h

buf db 0xF      ;store max length we want to accept
    db ?        ;how many written?
    rb 0xF      ;place to store the input
    


hope this could make you clear a bit.
the bell sounds because when you input the buffer, you miss the termination character -> "$"


Description:
Filesize: 18.22 KB
Viewed: 1736 Time(s)

Image1.png


Post 12 Nov 2005, 07:39
View user's profile Send private message Visit poster's website Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner
Code:
mov ah,9
mov dx,buf
mov [buf],10
mov [buf+1],13
int 21h
    

add the CR LF so you can really see the tex printed out Smile

Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Administrator>d:

D:\>b
fasm rocks!$
fasm rocks!
D:\>
    
Post 12 Nov 2005, 07:59
View user's profile Send private message Visit poster's website Reply with quote
estrang



Joined: 02 Nov 2005
Posts: 38
estrang
It wont print the output if the input doesnt get to the length limit. How can we solve that??

Code:
org 100h

mov ah,0ah
mov dx,buf
int 21h

mov ah,9
mov dx,buf
mov [buf],10
mov [buf+1],13
int 21h

mov ah,4ch
int 21h

buf db 0xF      ;store max length we want to accept
    db ?           ;how many written?
    db 0xF dup( 00h ), 24h     ;Create buffer i guess??
    


Is there a way of creating buffer without using dup() ?? I hate seeing function looking stuffs like this in assembly i dont know why Confused Is this really part of assembly or is it just a function that comes with fasmm??

*edited
[code] tag
*Looked at hex dump. So dup() is for shorcut for typing consecutive letters. Get it now.
Post 12 Nov 2005, 09:56
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1171
Location: Overflow
Matrix
hello, xddxogm3

i think i can help with that bell ringing for you,
in your pc, locate the pc speaker, it is enough to cut one of them, but cut both to make sure there used to be a red and a black wire.
then it wont ring.
Post 12 Nov 2005, 21:52
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic This topic is locked: you cannot edit posts or make replies.

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.