flat assembler
Message board for the users of flat assembler.

Index > DOS > interupt 21 dl=10

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



Joined: 09 Nov 2005
Posts: 12
xddxogm3 12 Nov 2005, 03:22
display character of 10h = "data link escape"
what does data link escape do?
i found it in a snippin of code that creates a carriage return.
Post 12 Nov 2005, 03:22
View user's profile Send private message Reply with quote
vbVeryBeginner



Joined: 15 Aug 2004
Posts: 884
Location: \\world\asia\malaysia
vbVeryBeginner 12 Nov 2005, 07:43
what ah function are you using?
Post 12 Nov 2005, 07:43
View user's profile Send private message Visit poster's website Reply with quote
xddxogm3



Joined: 09 Nov 2005
Posts: 12
xddxogm3 12 Nov 2005, 20:20
Code:
mov ah, 2
    


this is a excerpt from a carriage return module.
you print out two ascii characters first the carriage return, then the data link escape

full code of module
Code:
CRLF:
        push    ax 
        push    dx

        mov     ah,2    ;assign 2 to ah register (output character)
        mov     dl,13   ;print carriage return
        int     21h     ;doit
        mov     dl,10   ;print data link escape
        int     21h     ;doit

        pop     dx 
        pop     ax 

ret 
    

[/code]
Post 12 Nov 2005, 20:20
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 21 Nov 2005, 15:56
this is a print char function,
dl means the code of the byte to be put to screen at cursor position,

13 = $0d this means carrige return - CR, moves to beginning of line

10= $0a this is line feed - LF, moves 1 line down
Post 21 Nov 2005, 15:56
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-2024, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.