flat assembler
Message board for the users of flat assembler.

Index > DOS > Moving hardware text cursor in Flat Assembler

Author
Thread Post new topic Reply to topic
Indrek Sünter



Joined: 14 Feb 2004
Posts: 1
Location: Estonia
Indrek Sünter
I want to move hardware text cursor without using BIOS, DOS interrupts and I'm using this code:

out 0x3D4,14h
out 0x3D5,00h
out 0x3D4,15h
out 0x3D5,00h

(has to move cursor to position (0,0))

How to make it compatible with FASM? Confused
Any suggestions are welcome...

_________________
>Flat Assembler Fan
Post 14 Feb 2004, 22:01
View user's profile Send private message Visit poster's website MSN Messenger Reply with quote
decard



Joined: 11 Sep 2003
Posts: 1092
Location: Poland
decard
you can use this code (I found it somewhere in my old projects). Call this proc with:
dl - cursor's x-position
dh - cursor's y-position

Code:
video_set_cursor_pos:
        mov     al,80
        mul     dh
        xor     dh,dh
        add     ax,dx
        mov     cx,ax
        mov     dx,0x03d4
        mov     al,0x0e
        out     dx,al
        inc     dx
        mov     al,ch
        out     dx,al
        mov     dx,0x3d4
        mov     al,0x0f
        out     dx,al
        inc     dx
        mov     al,cl
        out     dx,al
        ret    


regards
Post 15 Feb 2004, 07:39
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

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.

Powered by rwasa.