home *** CD-ROM | disk | FTP | other *** search
/ World of Shareware - Software Farm 2 / wosw_2.zip / wosw_2 / PASCAL / INFOP125.ZIP / PAGE_06.INC < prev    next >
Text File  |  1990-08-10  |  9KB  |  304 lines

  1. procedure page_06;
  2. type
  3.   cardtype = (standard, paradise, video7, ati);
  4.  
  5. var
  6.   i : byte;
  7.   VGAbuf : array[$00..$10] of byte;
  8.   xbyte : byte;
  9.   xword1 : word;
  10.   xword2 : word;
  11.   xword3 : word;
  12.   xword4 : word;
  13.   vgacard: cardtype;
  14.   vidmem : word;
  15.   s: string;
  16.  
  17. procedure captfont;
  18.   begin
  19.   caption1('Font           Address');
  20.   writeln;
  21.   write('INT 1FH        ');
  22.   segofs(longint(intvec[$1F]) shr 16, longint(intvec[$1F]) and $0000FFFF);
  23.   writeln
  24.   end; {captfont}
  25.  
  26. procedure showfont(a : byte);
  27.   begin
  28.   with regs do
  29.     begin
  30.     case a of
  31.       $00 : write('INT 1FH     ');
  32.       $01 : write('INT 43H     ');
  33.       $02 : write('ROM 8x14    ');
  34.       $03 : write('ROM 8x8 (lo)');
  35.       $04 : write('ROM 8x8 (hi)');
  36.       $05 : write('ROM 9x14    ');
  37.       $06 : write('ROM 8x16    ');
  38.       $07 : write('ROM 9x16    ')
  39.     end;
  40.     write('   ');
  41.     AX:=$1130;
  42.     BH:=a;
  43.     intr($10, regs);
  44.     segofs(ES, BP);
  45.     writeln
  46.     end
  47.   end; {showfont}
  48.  
  49. procedure int101210;
  50.   begin
  51.   with regs do
  52.     begin
  53.     AH:=$12;
  54.     BL:=$10;
  55.     intr($10, regs);
  56.     caption2('Display type');
  57.     case BH of
  58.       $00 : writeln('color');
  59.       $01 : writeln('monochrome')
  60.       else
  61.         unknown('display', BH, 2)
  62.     end;
  63.     caption2('Memory');
  64.     if vgacard <> standard then
  65.       Writeln(vidmem, 'K')
  66.     else
  67.       case BL of
  68.         $00 : writeln('64K');
  69.         $01 : writeln('128K');
  70.         $02 : writeln('192K');
  71.         $03 : writeln('256K')
  72.         else
  73.           unknown('size', BL, 2)
  74.       end;
  75.     caption2('Feature bits');
  76.     writeln(bin4(CH and $0F));
  77.     caption2('DIP switches');
  78.     writeln(bin4(CL and $0F))
  79.     end
  80.   end;
  81.  
  82.   begin (* procedure page_06 *)
  83.   vgacard:=standard;
  84.   caption2('Display adapter');
  85.   case graphdriver of
  86.     CGA : begin
  87.           writeln('CGA');
  88.           captfont
  89.           end;
  90.     MCGA : begin
  91.            writeln('MCGA');
  92.            captfont;
  93.            showfont($01);
  94.            showfont($03);
  95.            showfont($04);
  96.            showfont($06)
  97.            end;
  98.     EGA..EGAmono : begin
  99.                  writeln('EGA');
  100.                  captfont;
  101.                  showfont($01);
  102.                  showfont($02);
  103.                  showfont($03);
  104.                  showfont($04);
  105.                  showfont($05);
  106.                  int101210;
  107.                  xbyte:=mem[BIOSdseg : $0087];
  108.                  caption2('Mode change preserves screen buffer');
  109.                  yesorno(xbyte and $80 = $80);
  110.                  caption2('EGA active');
  111.                  yesorno(xbyte and $08 = $00);
  112.                  caption2('Wait for display enable');
  113.                  yesorno(xbyte and $04 = $04);
  114.                  caption2('CGA cursor emulation');
  115.                  yesorno(xbyte and $01 = $00);
  116.            (*  PC Magazine 6:12 p.326  *)
  117.                  caption2('Save area                    ');
  118.                  xword1:=memw[BIOSdseg : $00AA];
  119.                  xword2:=memw[BIOSdseg : $00A8];
  120.                  segofs(xword1, xword2);
  121.                  writeln;
  122.            (*  PC Tech Journal 3:4 p.65  *)
  123.                  caption2('Video parameter table        ');
  124.                  segofs(memw[xword1 : xword2 +  2], memw[xword1 : xword2]);
  125.                  writeln;
  126.                  caption2('Dynamic save area            ');
  127.                  xword3:=memw[xword1 : xword2 +  6];
  128.                  xword4:=memw[xword1 : xword2 +  4];
  129.                  if (xword3 > $0000) or (xword4 > $0000) then
  130.                    begin
  131.                    segofs(xword3, xword4);
  132.                    writeln
  133.                    end
  134.                  else
  135.                    writeln('(none)');
  136.                  caption2('Auxiliary character generator');
  137.                  xword3:=memw[xword1 : xword2 + 10];
  138.                  xword4:=memw[xword1 : xword2 +  8];
  139.                  if (xword3 > $0000) or (xword4 > $0000) then
  140.                    begin
  141.                    segofs(xword3, xword4);
  142.                    writeln
  143.                    end
  144.                  else
  145.                    writeln('(none)');
  146.                  caption2('Graphics mode auxiliary table');
  147.                  xword3:=memw[xword1 : xword2 + 14];
  148.                  xword4:=memw[xword1 : xword2 + 12];
  149.                  if (xword3 > $0000) or (xword4 > $0000) then
  150.                    segofs(xword3, xword4)
  151.                  else
  152.                    write('(none)')
  153.            (*  PC Tech Journal 3:4 p.67  *)
  154.                end;
  155.     hercmono : begin
  156.                writeln('Hercules or MDA');
  157.                captfont
  158.                end;
  159.     IBM8514 : begin
  160.               writeln('IBM 8514');
  161.               captfont
  162.               end;
  163.     ATT400 : begin
  164.              writeln('AT&T 400');
  165.              captfont
  166.              end;
  167.     VGA : begin
  168.           writeln('VGA');
  169.           caption3('Chipset');
  170.           vgacard:=standard;
  171.           with regs do
  172.             begin
  173.             AX:=$7F;
  174.             BH:=2;
  175.             Intr($10, regs);
  176.             if BH = $7F then
  177.               begin
  178.               vgacard:=paradise;
  179.               Write('Paradise');
  180.               vidmem:=word(64) * CH;
  181.               caption3('Frequencies are');
  182.               AX:=$7F;
  183.               BH:=$1F;
  184.               Intr($10, regs);
  185.               if (BL and $80) = $80 then
  186.                 Writeln('multi-sync')
  187.               else
  188.                 Writeln('fixed-sync')
  189.               end;
  190.             AX:=$6F00;
  191.             BX:=0;
  192.             Intr($10, regs);
  193.             if BX = $5637 then
  194.               begin
  195.               vgacard:=video7;
  196.               Write('Video 7');
  197.               AX:=$6F07;
  198.               Intr($10, regs);
  199.               if AL = $6F then
  200.                 begin
  201.                 vidmem:=256 * (AH and $7F);
  202.                 caption3('memory type');
  203.                 if AH and $80 = $80 then
  204.                   Writeln('VRAM')
  205.                 else
  206.                   Writeln('DRAM')
  207.                 end
  208.               else
  209.                 vidmem:=256;
  210.               end;
  211.             s:='';
  212.             for xword1:=$31 to $39 do
  213.               s:=s + Chr(Mem[$C000:xword1]);
  214.             if s = '761295520' then
  215.               begin
  216.               vgacard:=ati;
  217.               Write('ATI');
  218.               s:=Chr(Mem[$C000:$40]) + Chr(Mem[$C000:$41]);
  219.               if s = '31' then
  220.                 begin
  221.                 xbyte:=Mem[$C000:$42];
  222.                 caption3('mouse port');
  223.                 yesorno2(xbyte and 2 = 2);
  224.                 caption3('microchannel');
  225.                 yesorno(xbyte and 8 = 8);
  226.                 caption3('  non-interlaced 1024x768 available');
  227.                 yesorno2(xbyte and 4 = 4);
  228.                 xword1:=MemW[$C000:$10];
  229.                 xbyte:=ATIinfo($BB, xword1) and $0F;
  230.                 caption3('monitor');
  231.                 case xbyte of
  232.                   $0: Writeln('EGA');
  233.                   $1: Writeln('analog monochrome');
  234.                   $2: Writeln('TTL monochrome');
  235.                   $3: Writeln('analog color');
  236.                   $4: Writeln('RGB color');
  237.                   $5: Writeln('Multisync or compatible');
  238.                   $7: Writeln('PS/2 8514 or compatible');
  239.                   $9: Writeln('NEC MultiSync 2A');
  240.                   $A: Writeln('Tatung OmniScan');
  241.                   $B: Writeln('NEC 3D or compatible');
  242.                   $C: Writeln('TVM 3M');
  243.                   $D: Writeln('NEC MultiSync XL/+/4D/5D');
  244.                   $E: Writeln('TVM 3A');
  245.                   $F: Writeln('TVM 2A');
  246.                 else
  247.                   Writeln('(unknown type - ', hex(xbyte, 2), ')');
  248.                 end; {case}
  249.                 xbyte:=ATIinfo($BB, xword1) and $20;;
  250.                 if xbyte = $20 then
  251.                   vidmem:=512
  252.                 else
  253.                   vidmem:=256;
  254.                 end;
  255.               end;
  256.             end;
  257.           if vgacard = standard then
  258.             Writeln('(unknown)');
  259.           captfont;
  260.           showfont($01);
  261.           showfont($02);
  262.           showfont($03);
  263.           showfont($04);
  264.           showfont($05);
  265.           showfont($06);
  266.           showfont($07);
  267.           int101210;
  268.           with regs do
  269.             begin
  270.             AX:=$1009;
  271.             ES:=seg(VGAbuf);
  272.             DX:=ofs(VGAbuf);
  273.             intr($10, regs)
  274.             end;
  275.           caption2('Palette registers');
  276.           for i:=$00 to $0F do
  277.             write(hex(VGAbuf[i], 2), ' ');
  278.           writeln;
  279.           caption2('Border color');
  280.           writeln(hex(VGAbuf[$10], 2));
  281.           caption2('Color page');
  282.           with regs do
  283.             begin
  284.             AX:=$101A;
  285.             intr($10, regs);
  286.             writeln('$', hex(BH, 2));
  287.             caption2('Paging mode');
  288.             case BL of
  289.               $00 : writeln('4 pages of 64 registers');
  290.               $01 : writeln('16 pages of 16 registers')
  291.               else
  292.                 unknown('mode', BL, 2)
  293.             end
  294.             end
  295.         end;
  296.     PC3270 : begin
  297.              writeln('3270 PC');
  298.              captfont
  299.              end
  300.   else
  301.     unknown('adapter', graphdriver, 4)
  302.   end {case}
  303.   end; {page_06}
  304.