flat assembler
Message board for the users of flat assembler.

Index > DOS > 3 questions...

Author
Thread Post new topic Reply to topic
windwakr



Joined: 30 Jun 2004
Posts: 827
Location: Michigan, USA
windwakr
1. How do you check for keypresses?

2. How do you set console cursor postion?

3. How do you empty the screen to blank?

_________________
----> * <---- My star, won HERE
Post 08 Aug 2004, 03:04
View user's profile Send private message Reply with quote
asmdemon



Joined: 18 Jan 2004
Posts: 97
Location: Virginia Beach, VA
asmdemon
well, there are may ways to do the following, so i'll give you some simple ways:

1. keypresses:

mov ah,1
int 16
jz nokeypress
handlekeypress:


2. setcursor:
INT 10 - VIDEO - SET CURSOR POSITION
AH = 02h
BH = page number
0-3 in modes 2&3
0-7 in modes 0&1
0 in graphics modes
DH = row (00h is top)
DL = column (00h is left)
Return: nothing

3. clearscreen:

INT 10 - VIDEO - SCROLL UP WINDOW
AH = 06h
AL = number of lines by which to scroll up (00h = clear entire window)
BH = attribute used to write blank lines at bottom of window
CH,CL = row,column of window's upper left corner
DH,DL = row,column of window's lower right corner
Return: nothing
Note: affects only the currently active page (see AH=05h)
BUGS: some implementations (including the original IBM PC) have a bug which
destroys BP

or, you can just write 00's to the video buffer.

_________________
It is better to be on the right side of the devil than in his path.
Post 08 Aug 2004, 06:50
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.