text lines 
Author Message
 text lines

coud some tell me how to get 28 or 30 line mode in Pascal code?

I know how to do 25 and 43/50 but I need 28 or 30 also

--
Regards Simon...



Wed, 18 Jun 1902 08:00:00 GMT  
 text lines

Quote:

>coud some tell me how to get 28 or 30 line mode in pascal code?

>I know how to do 25 and 43/50 but I need 28 or 30 also

Well here is code for 28, 30, 34 and 60 rows. You would normally
use 3 as the parameter. Need 12, 14 an 21 also?

Procedure VGA28(md:byte); Assembler;
   asm
   mov ax,1202h
   mov bl,30h
   int 10h
   mov al,md
   xor ah,ah
   int 10h
   mov ax,1111h
   mov bl,0
   int 10h
  end;

(*
From: MIGUEL MARTINEZ              Refer#: NONE
Subj: 80x30 Text-Mode Procedure      Conf: (1617) L-Pascal
---------------------------------------------------------------------------
Hello to everyone!. A friend of mine who enjoys Assembler, has developed a
routine, to provide "another" video mode to all those who develop text-based
programs.

It's a routine to set a 80x30 text mode, using the 16x8 font of the VGA.
I think is a better mode to work, than the standard 80x25 mode: More
information on screen, without loosing the pretty 16x8 chars.

I have translated this routine to Pascal, and here is the result. It will
work on any standard VGA card.
*)

{Procedure to set 80 columns per 30 rows video mode}
{Orignial Author: Ignacio Garca Prez}
Procedure Set80x30Mode;
Var CrtcReg:Array[1..8] of Word;
    Offset:Word;
    i,Data:Byte;
Begin
  CrtcReg[1]:=$0c11;           {Vertical Display End (unprotect regs. 0-7)}
  CrtcReg[2]:=$0d06;           {Vertical Total}
  CrtcReg[3]:=$3e07;           {Overflow}
  CrtcReg[4]:=$ea10;           {Vertical Retrace Start}
  CrtcReg[5]:=$8c11;           {Vertical Retrace End (& protect regs. 0-7)}
  CrtcReg[6]:=$df12;           {Vertical Display Enable End}
  CrtcReg[7]:=$e715;           {Start Vertical Blanking}
  CrtcReg[8]:=$0616;           {End Vertical Blanking}

  MemW[Seg0040:$004c]:=8192;   {Change page size in bytes}
  Mem[Seg0040:$0084]:=29;      {Change page length}
  Offset:=MemW[Seg0040:$0063]; {Base of CRTRC}
  Asm
    cli                        {Clear Interrupts}
  End;

  For i:=1 to 8 do
    PortW[Offset]:=CrtcReg[i]; {Load Registers}

  Data:=Port[$03cc];
  Data:=Data And $33;
  Data:=Data Or $C4;
  Port[$03c2]:=Data;
  Asm
   sti                         {Set Interrupts}
   mov ah,12h                  {Select alternate printing routine}
   mov bl,20h
   int 10h
  End;
End; {Of Procedure}

Procedure VGA25(md:byte); Assembler;
   asm
   mov ax,1202h
   mov bl,30h
   int 10h
   mov al,md
   xor ah,ah
   int 10h
  end;

Procedure VGA50(md:byte); Assembler;
   asm
   mov ax,1202h
   mov bl,30h
   int 10h
   mov al,md
   xor ah,ah
   int 10h
   mov ax,1112h
   mov bl,0
   int 10h
  end;

Procedure VGA60(md:byte);
Begin
  Vga50(md);
  Set80x30Mode;
  MemW[Seg0040:$004c]:=16384;     {Change page size in bytes}
  Mem[Seg0040:$0084]:=59;         {Change page length}
End;

Procedure VGA34(md:byte);
Begin
  Vga28(md);
  Set80x30Mode;
  Mem[Seg0040:$0084]:=33;        {Change page length}
End;

Procedure VGA30(md:byte);
Begin
  Vga25(md);
  Set80x30Mode;
End;

Osmo



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. HELP: Retrieve a TMemoField and copy lines of text to TStrings object

2. ERAISING LINES FROM A TEXT FILE?

3. Text files with very long lines.

4. Text file calculation of several lines.

5. EDIT1.TEXT := MEMO1.Lines.Values['BFT1'];

6. Going to a certain line in a text file

7. Problem with GotoXY in EGA/VGA text mode (43/50 line mode)

8. Delete a the first line in an ASCII Text file

9. I like to print color Line graphics, text color in a hp deskject

10. empty lines in text file

11. Switching to 43/50-lines in text mode

12. Jumping to specific lines in a text file

 

 
Powered by phpBB® Forum Software