Mail Archives: djgpp/1999/04/22/22:32:37
Eli Zaretskii wrote:
> On Wed, 21 Apr 1999, Endlisnis wrote:
> > I've made a small program that just changes the number of scan-lines used
> > per character in a text mode. Using this you can get up to 100 rows in a
> > window (and you can change it while windowed, at least on most machines).
> Sounds interesting. Care to post the source?
It was originally written in Borland C++ v3.1, and I lost the code, but I was
able to look at it in Borland Turbo Debugger and I was able to reconstruct it in
DJGPP. The code is posted at the end. It takes one paramter, the number of lines
to show (it is always 80 columns wide). The only allowed values are
13-23,25,26,28,30,33,36,40,44,50,57,66,80,100. It will always round UP to the next
value if you specify some other number. Values less than 13 screw up my video
card. Win95 DosBox refuses to display these number of rows {133, 200, 400} (but
they work full-screen on my machine.)
This is only designed to be used in a windowed DOS screen. Full screen, it
will just cut off the bottom of each character. It becomes unreadable above 50
(only in full-screen mode). I tested it in SetEdit
{the screen with "[X] Use external program"}, and it seems to work (even at 100
rows).
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT BrunNet DOT Net
Endlisnis AT HotMail DOT com
ICQ: 32959047
-----------------------------char.cc--------------
#include <dpmi.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
void SetHieght(int ScanLines)
{
__dpmi_regs regs;
memset(®s, 0, sizeof(regs));
regs.x.ax = 0x1110;
regs.x.cx = 0;
regs.x.dx = 0;
regs.x.bx = ScanLines << 8;
__dpmi_int(0x10, ®s);
}
int main(int argc, char *argv[])
{
if(argc==1)
printf("Valid values = {13-23,25,26,28,30,33,36,40,44,50,57,66,80,100}\n");
else
SetHieght(400/atoi(argv[1]));
return 0;
}
- Raw text -