home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / windows / infop141.zip / PAGE_02.PAS < prev    next >
Pascal/Delphi Source File  |  1990-12-08  |  3KB  |  109 lines

  1. procedure page_02;
  2.  
  3. var
  4.   cpu_info: cpu_info_t;
  5.   save_cpu_type: byte;
  6.  
  7. procedure showNDP(a: string; b: word);
  8.   begin
  9.   writeln(a);
  10.   caption2('  Infinity');
  11.   case b and $1000 of
  12.     $0000 : writeln('projective');
  13.     $1000 : writeln('affine')
  14.   end;
  15.   caption2('  Rounding');
  16.   case b and $0C00 of
  17.     $0000 : writeln('to nearest or even');
  18.     $0400 : writeln('down');
  19.     $0800 : writeln('up');
  20.     $0C00 : writeln('chop')
  21.   end;
  22.   caption2('  Precision');
  23.   case b and $0300 of
  24.     $0000 : writeln('24 bits');
  25.     $0100 : writeln('(reserved)');
  26.     $0200 : writeln('53 bits');
  27.     $0300 : writeln('64 bits')
  28.   end
  29.   end; {showNDP}
  30.  
  31.   begin (* procedure page_02 *)
  32.   caption2('CPU');
  33.   cpu_info.test_type:='C';
  34.   CPUID(cpu_info);
  35.   with cpu_info do
  36.     begin
  37.     case cpu_type of
  38.       $00 : writeln('8088');
  39.       $01 : writeln('8086');
  40.       $02 : writeln('V20');
  41.       $03 : writeln('V30');
  42.       $04 : writeln('80188');
  43.       $05 : writeln('80186');
  44.       $06 : writeln('80286');
  45.       $07 : writeln('80386');
  46.       $08 : Writeln('80486')
  47.       else
  48.         unknown('CPU', cpu_type, 2)
  49.     end;
  50.     save_cpu_type:=cpu_type;
  51.     case cpu_type of
  52.       $06..$08 : begin
  53.                  caption3('Machine Status Word');
  54.                  writeln(hex(MSW, 4));
  55.                  caption3('  Bit 0 - Protected mode     ');
  56.                  yesorno(MSW and 1 = 1);
  57.                  caption3('  Bit 1 - Monitor Coprocessor');
  58.                  yesorno(MSW and 2 = 2);
  59.                  caption3('  Bit 2 - Emulate Coprocessor');
  60.                  yesorno(MSW and 4 = 4);
  61.                  caption3('Global Descriptor Table   ');
  62.                  for i:=1 to 6 do
  63.                    write(hex(GDT[i], 2), ' ');
  64.                  writeln;
  65.                  caption3('Interrupt Descriptor Table');
  66.                  for i:=1 to 6 do
  67.                    write(hex(IDT[i], 2), ' ');
  68.                  writeln
  69.                  end
  70.     end;
  71.     caption3('Interrupts acknowledged immediately after segment register change');
  72.     yesorno(intflag);
  73.     caption2('Coprocessor');
  74.     if save_cpu_type = $08 then
  75.       showNDP('(built-in)', ndp_cw) {'486 has coprocessor built in}
  76.     else
  77.       begin
  78.       test_type:='N';
  79.       CPUID(cpu_info);
  80.       case ndp_type of
  81.         $00 : writeln('none');
  82.         $01 : showNDP('8087', ndp_cw);
  83.         $02 : showNDP('80287', ndp_cw);
  84.         $03 : showNDP('80387', ndp_cw)
  85.       else
  86.         unknown('coprocessor', ndp_type, 4)
  87.       end {case}
  88.       end
  89.   end;
  90.   caption2('BIOS coprocessor flag set');
  91.   yesorno(equip and $0002 = $0002);
  92.   caption2('BIOS Weitek coprocessor flag set');
  93.   with cpu_info do
  94.     begin
  95.     if (save_cpu_type = 7) or (save_cpu_type = 8) then
  96.       begin
  97.       test_type:='W';
  98.       CPUID(cpu_info);
  99.       yesorno(weitek and 1 = 1);
  100.       if weitek and 1 = 1 then
  101.         begin
  102.         caption3('Weitek addressable in real mode');
  103.         yesorno(weitek and $80 = $80)
  104.         end
  105.       end
  106.     else
  107.       Writeln('Not Applicable');
  108.     end;
  109.   end;