Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the board
Thread view  Mix view  Order
Deniska(R)

Homepage E-mail

10.10.2008, 04:09
 

Number of rows and columns (Developers)

Does anybody know how one may determine the number of lines and columns for the text mode, which is currently set? I've taken a look at some of the functions of INT 10h, but unsuccessfully. I remember there was one function that returned either the number of lines or columns, but not both.

I'm writing a text-mode mixer for Sound Blaster compatible cards, since I'm not satisfied with the interfaces and capabilities of the existing mixers. I'd like to be able to identify the current screen dimensions and make the interface "stretch" appropriately instead of resetting the text mode.

Rugxulo(R)

Homepage

Usono,
10.10.2008, 05:40

@ Deniska

Number of rows and columns

> Does anybody know how one may determine the number of lines and columns for
> the text mode, which is currently set? I've taken a look at some of the
> functions of INT 10h, but unsuccessfully. I remember there was one
> function that returned either the number of lines or columns, but not
> both.

Hopefully this is what you want, but I can't guarantee it 100% of course. But it works well enough.

int 10h,0Fh

int 10h,1130h

rr(R)

Homepage E-mail

Berlin, Germany,
10.10.2008, 16:13

@ Deniska

Number of rows and columns

> Does anybody know how one may determine the number of lines and columns for
> the text mode, which is currently set?

MEM 0040h:004Ah - VIDEO - COLUMNS ON SCREEN
Size: WORD

MEM 0040h:0084h - VIDEO (EGA/MCGA/VGA) - ROWS ON SCREEN MINUS ONE
Size: BYTE

Back to the board
Thread view  Mix view  Order
15192 Postings in 1365 Threads, 250 registered users, 11 users online (0 registered, 11 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum