flat assembler
Message board for the users of flat assembler.

Index > DOS > Video Text Modes

Author
Thread Post new topic Reply to topic
Homeground



Joined: 29 Apr 2012
Posts: 12
Homeground
I've been using text mode 3, 80x25, via int 10, ax=0003. I'd like to get more characters on a page than that, if i can. I've been looking through Ralf Brown's interrupt list, and I can find 80x43 and 80x50. But I'm having a problem understanding how to access them. It says, in a note at the bottom of the page: "For 43-line text on EGA or 43/50-line text on VGA, you must load an 8x8 font using AX=1102h after switching to mode 3; VGA may also require using INT 10/AH=12h/BL=30h"

Looking at the AX=1102 page, it says:

AX = 1102h
BL = block to load

Return:
Nothing

How do I know what value bl should be?
Post 24 May 2012, 18:23
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Here's some related links:



EDIT: Forgot about FreeDOS' MODE command (w/ srcs): mode-2005may12.zip


Last edited by rugxulo on 26 May 2012, 06:23; edited 1 time in total
Post 24 May 2012, 21:24
View user's profile Send private message Visit poster's website Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 701
Location: Adelaide
sinsi
Here's how I do it
Code:
;set VGA 400 lines
        mov ax,1202h
        mov bl,30h
        int 10h
;set VGA 80x25 colour
        mov ax,3
        int 10h
;set 8x8 font
        mov ax,1112h
        sub bl,bl
        int 10h
    
Post 25 May 2012, 02:26
View user's profile Send private message Reply with quote
Homeground



Joined: 29 Apr 2012
Posts: 12
Homeground
sinsi wrote:
Here's how I do it
Code:
;set VGA 400 lines
        mov ax,1202h
        mov bl,30h
        int 10h
;set VGA 80x25 colour
        mov ax,3
        int 10h
;set 8x8 font
        mov ax,1112h
        sub bl,bl
        int 10h
    


The trouble is, I can't see any relation between those register values and the actual number of characters you get, per line or per column. And Ralf Brown's interrupt list isn't very informative on that point. I tried your routine and got a screen of 80x50. How would I amend that routine to get more characters horizontally - for example, 128x50? or 43? or whatever is available at that width?
Post 25 May 2012, 05:55
View user's profile Send private message Reply with quote
sinsi



Joined: 10 Aug 2007
Posts: 701
Location: Adelaide
sinsi
To get more than 80 columns you either use a VESA mode or need to reprogram the VGA registers.
The first link in rugxulo's post (SETMXX.ZIP) has the source, that should help,
Post 25 May 2012, 06:14
View user's profile Send private message Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac
Homeground wrote:
The trouble is, I can't see any relation between those register values and the actual number of characters you get, per line or per column. And Ralf Brown's interrupt list isn't very informative on that point. I tried your routine and got a screen of 80x50. How would I amend that routine to get more characters horizontally - for example, 128x50? or 43? or whatever is available at that width?


RBIL->inter61a.zip->Interrup.a
Quote:

--------V-101130-----------------------------
INT 10 - VIDEO - GET FONT INFORMATION (EGA, MCGA, VGA)
AX = 1130h
BH = pointer specifier
00h INT 1Fh pointer
01h INT 43h pointer
02h ROM 8x14 character font pointer
03h ROM 8x8 double dot font pointer
04h ROM 8x8 double dot font (high 128 characters)
05h ROM alpha alternate (9 by 14) pointer (EGA,VGA)
06h ROM 8x16 font (MCGA, VGA)
07h ROM alternate 9x16 font (VGA only) (see #00021)
11h (UltraVision v2+) 8x20 font (VGA) or 8x19 font (autosync EGA)
12h (UltraVision v2+) 8x10 font (VGA) or 8x11 font (autosync EGA)
Return: ES:BP = specified pointer
CX = bytes/character of on-screen font (not the requested font!)
DL = highest character row on screen
Note: for UltraVision v2+, the 9xN alternate fonts follow the corresponding
8xN font at ES:BP+256N
BUG: the IBM EGA and some other EGA cards return in DL the number of rows on
screen rather than the highest row number (which is one less).
SeeAlso: AX=1100h,AX=1103h,AX=1120h,INT 1F"SYSTEM DATA",INT 43"VIDEO DATA"

Format of alternate font table [array]:
Offset Size Description (Table 00021)
00h BYTE character to be replaced (00h = end of table)
01h N BYTEs graphics data for character, one byte per scan line

Quote:
--------V-101114-----------------------------
INT 10 - VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x16 CHARACTER SET (VGA)
AX = 1114h
BL = block to load
Return: nothing
Notes: (see AX=1110h)
SeeAlso: AX=1104h,AX=1110h,AX=1111h,AX=1112h,AH=1Bh,AX=CD10h

Quote:

--------V-101111-----------------------------
INT 10 - VIDEO - TEXT-MODE CHARGEN - LOAD ROM MONOCHROME PATTERNS (PS,EGA,VGA)
AX = 1111h
BL = block to load
Return: nothing
Notes: (see AX=1110h)
the "monochrome" patters are 8x14 pixels in size
SeeAlso: AX=1101h,AX=1110h,AX=1112h,AX=1114h,AH=1Bh,AX=CD10h

Quote:

--------V-101112-----------------------------
INT 10 - VIDEO - TEXT-MODE CHARGEN - LOAD ROM 8x8 DBL-DOT PATTERNS (PS,EGA,VGA)
AX = 1112h
BL = block to load
Return: nothing
Notes: (see AX=1110h)
SeeAlso: AX=1103h,AX=1110h,AX=1111h,AX=1114h,AH=1Bh,AX=CD10h


http://www.balug.org.ar/ConfTips/Fonts/etc/TextConfig

Dirk
Post 26 May 2012, 05:23
View user's profile Send private message Send e-mail Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
Sorry, forgot about FreeDOS' own MODE.COM utility. It has sources, so you can look at that also. It may help.
Post 26 May 2012, 06:24
View user's profile Send private message Visit poster's website Reply with quote
Homeground



Joined: 29 Apr 2012
Posts: 12
Homeground
I tried the four modes from SETMXX.ZIP, but it turns out only 80x43 is supported on my system. I think I need a card. The machine I'm using is my second machine, an old Dell GX280 that I got off ebay, which I intend to reserve for programming in DOS. It doesn't have a card, but I didn't think I needed one. I won't be doing any graphics programming, just text-based. It has integrated Intel Extreme graphics. I assumed it would support multiple text modes at least, but it looks like it doesn't. I'll have to put everything on hold until I get a card capable of supporting these different modes. The motherboard has a PCI Express slot, and I've had a quick look on ebay for something usable. But I don't want to get the wrong one. There are several VTX3D ATI Radeon 5450 HD 1GB cards going for a reasonable price. Would that be a good choice?
Post 26 May 2012, 08:54
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
No idea what a good choice is, I just figured most modern cards supported everything.

BTW, why do you need more than 80x43? That's what I've been using lately, it's plenty nice enough. Anything higher would be too small to comfortably read, IMHO, and not all DOS apps support higher resolutions.

Don't want to discourage you, just saying ....
Post 30 May 2012, 17:16
View user's profile Send private message Visit poster's website Reply with quote
Homeground



Joined: 29 Apr 2012
Posts: 12
Homeground
rugxulo wrote:
BTW, why do you need more than 80x43? That's what I've been using lately, it's plenty nice enough. Anything higher would be too small to comfortably read, IMHO, and not all DOS apps support higher resolutions.

I don't want it for other Dos apps, just my own program.

I need more than 80 chrs width, because a lot of the data would need a divided screen. As I said earlier, the data is Elizabethan texts. There was no copyright in those days, and a lot of plays from the period come in more than one version, most of them pirated. It would be desirable to have two versions side by side, to compare one with the other.

Whether smaller text is comfortable to read depends on the resolution, I guess. The text editor that I have on my task bar at the moment is showing a 96 chr width, but is perfectly readable on my 17-inch laptop. On the 22-inch monitor I use for programming it's no problem to read it from 4 ft away. No doubt that is achieved in graphics mode, with a software-generated font. And if necessary, I'll go graphics mode myself, drawing the screen line by line. But it would be easier if there was a text-mode that fitted my requirements.
Post 30 May 2012, 19:14
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo
It might be your video card or maybe only the monitor, dunno. 80x43 is EGA, limited by 640x350 resolution, apparently. But I don't really know anything more than that. So I guess you need a better VESA-compliant card (or maybe beyond) for anything beyond 80 columns. VESA may be limited to 132x60, but you can maybe? use higher with certain proprietary cards with SVGAtextmode (untested by me). Actually, who knows, maybe not all VESA cards support text modes properly.

Sorry, there is no easy answer, or at least I dunno. I guess just research various cards online and see what they support. But if you want DOS support too, it may be harder to find (beyond what VESA supports), so SVGAtextmode (or something else) may be your only choice. Sad

EDIT: Since this is FASM's forum, you're probably writing it in assembly, but you could always check out something like the libraries Allegro or DEPUI or GRX or whatever to see what they support (graphics modes, GUIs, fonts).
Post 07 Jun 2012, 07:39
View user's profile Send private message Visit poster's website Reply with quote
madmatt



Joined: 07 Oct 2003
Posts: 1045
Location: Michigan, USA
madmatt
HomeGround, this link might answer some of your questions:
http://en.wikipedia.org/wiki/VGA-compatible_text_mode
Post 07 Jun 2012, 11:50
View user's profile Send private message Reply with quote
Homeground



Joined: 29 Apr 2012
Posts: 12
Homeground
Thanks. I'll look into all that. The Radeon card I ordered has arrived, but I haven't installed it yet. We'll see what that does for me.
Post 07 Jun 2012, 12:37
View user's profile Send private message Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 314
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan
See video text mode switcher.

_________________
smaller is better


Last edited by CandyMan on 22 Jul 2014, 17:14; edited 1 time in total
Post 30 Aug 2012, 17:45
View user's profile Send private message Reply with quote
freecrac



Joined: 19 Oct 2011
Posts: 117
Location: Germany Hamburg
freecrac
rugxulo wrote:
No idea what a good choice is, I just figured most modern cards supported everything.

BTW, why do you need more than 80x43? That's what I've been using lately, it's plenty nice enough.

I read that 80x43 only rare exist on modern cards. So i think it is not a good choice for to use 80x43.
In the past i always use 80x50, also in the first time with using a 9" monochrom CRT monitor.

Quote:
Anything higher would be too small to comfortably read, IMHO, and not all DOS apps support higher resolutions.

I hope most of them provide 80x50 and i think it is not so comfortable to use a lesser row size,
because i want to see for example all 50 filenames on the screen and not only the first 25 with needing to scolldown to see the rest of them,
or i want to see a routine of a sourcecode without to scolling up and down frequently with a lesser row size.
For me it is easier for to overview a sourcode and for to understand a longer part of a routine how it is exactly work.
(Thats only my personal view, for all other i hope you will find 80x43 on your cards, if you like it more.)

@Candyman: I only can see an executable. It is possible to post the source code of it too, because i think it would be more helpfull for beginners?

Dirk
Post 31 Aug 2012, 07:09
View user's profile Send private message Send e-mail 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. Also on YouTube, Twitter.

Website powered by rwasa.