home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / ifp1s158 / page_18.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-08-27  |  51.7 KB  |  1,997 lines

  1. unit page_18;
  2.  
  3. interface
  4.  
  5. uses crt, dos, ifpextrn, ifpglobl, ifpcomon;
  6.  
  7. procedure page18;
  8.  
  9. implementation
  10.  
  11. procedure page18;
  12.  
  13. var
  14.   i : 1..63;
  15.   s: string;
  16.   xlong: longint;
  17.   SaveX, Savey: byte;
  18.  
  19.  
  20.  
  21.   procedure Shells;
  22.     var
  23.       xword1: word;
  24.       regs: registers;
  25.  
  26.     begin
  27.     Caption1('----Shells and Shell enhancers----');
  28.     Writeln;
  29.     Caption2('JP Software 4DOS');
  30.     with regs do
  31.       begin
  32.       AX:=$D44D;
  33.       BX:=0;
  34.       CX:=0;
  35.       DX:=0;
  36.       Intr($2F, regs);
  37.       if AX <> $44DD then
  38.         Writeln('no')
  39.       else
  40.         begin
  41.         Writeln('yes');
  42.         Caption3('version');
  43.         xword1:=BH;
  44.         Write(BL, decimal);
  45.         ZeroPad(xword1);
  46.         Caption3('shell no.');
  47.         Write(DL);
  48.         Caption3('PSP segment');
  49.         Writeln(Hex(CX, 4))
  50.         end;
  51.       end;
  52.     Pause3(-1);
  53.     if endit then
  54.       Exit;
  55.     Caption2('JP Software KSTACK.COM');
  56.     with regs do
  57.       begin
  58.       AX:=$D44F;
  59.       BX:=0;
  60.       CX:=0;
  61.       DX:=0;
  62.       Intr($2F, regs);
  63.       yesorno(AX = $44DD);
  64.       end;
  65.     Pause3(-2);
  66.     if endit then
  67.       Exit;
  68.     Caption2('Norton NDOS');
  69.     with regs do
  70.       begin
  71.       AX:=$E44D;
  72.       BX:=0;
  73.       CX:=0;
  74.       DX:=0;
  75.       Intr($2F, regs);
  76.       if AX <> $44EE then
  77.         Writeln('no')
  78.       else
  79.         begin
  80.         Writeln('yes');
  81.         Caption3('version');
  82.         xword1:=BH;
  83.         Write(BL, decimal);
  84.         ZeroPad(xword1);
  85.         Caption3('shell no.');
  86.         Write(DL);
  87.         Caption3('PSP segment');
  88.         Writeln(Hex(CX, 4))
  89.         end;
  90.       end;
  91.     Pause3(-1);
  92.     if endit then
  93.       Exit;
  94.     Caption2('WildUnix');
  95.     with regs do
  96.       begin
  97.       AH:=$4E;
  98.       DS:=0;
  99.       DX:=0;
  100.       MsDos(regs);
  101.       yesorno(AH = $99);
  102.       end;
  103.     Pause3(-1);
  104.     if endit then
  105.       Exit;
  106.     Caption2('Anarkey');
  107.     with regs do
  108.       begin
  109.       AX:=$E300;
  110.       Intr($2F, regs);
  111.       case AL of
  112.         $00: Writeln('no');
  113.         $FE: Writeln('yes; but suspended');
  114.         $FF: Writeln('yes; and active');
  115.       else
  116.         Writeln('???')
  117.       end
  118.       end;
  119.     end; {Shells}
  120.  
  121.   procedure DosExtenders;
  122.     var
  123.       xbool1: boolean;
  124.       xbyte: byte;
  125.  
  126.     begin
  127.     Pause3(-1);
  128.     if endit then
  129.       Exit;
  130.     Caption1('----DOS Extenders----');
  131.     Writeln;
  132.     Caption2('DOS/16M');
  133.     with regs do
  134.       begin
  135.       AX:=$BF02;
  136.       DX:=0;
  137.       Intr($15, regs);
  138.       yesorno(DX <> 0);
  139.       end;
  140.     Pause3(-4);
  141.     if endit then
  142.       Exit;
  143.     Caption2('Phar Lap DOS Extender');
  144.     xbool1:=false;
  145.     xbyte:=1;
  146.     with regs do
  147.       repeat
  148.         AX:=$ED00;
  149.         BL:=xbyte;
  150.         Intr($2F, regs);
  151.         if (AL = $FF) and (SI = $5048 {PH}) and (DI = $4152 {AR}) then
  152.           begin
  153.           xbool1:=true;
  154.           Write('yes');
  155.           Caption3('type');
  156.           case xbyte of
  157.             1: Write('286dosx v1.3+ SDK');
  158.             2: Write('286dosx v1.3+ RTK');
  159.             3: Write('386dosx v4.0+ SDK');
  160.             4: Write('386dosx v4.0+ RTK')
  161.           end;
  162.           Caption3('version');
  163.           Write(CH, decimal);
  164.           ZeroPad(CL);
  165.           end;
  166.         Inc(xbyte);
  167.       until xbyte > 4;
  168.     if not xbool1 then
  169.       Writeln('no');
  170.     end; {DosExtenders}
  171.  
  172.   procedure MemUtils;
  173.     type
  174.       T386maxbuf = record
  175.                      version: byte;
  176.                      signature: array[1..6] of char;
  177.                      verstr: array[1..4] of char;
  178.                      lowseg: word;
  179.                      unkw1: word;
  180.                      unkw2: word;
  181.                      flags1: word;
  182.                      unk1: array [1..16] of byte;
  183.                      int15port: word;
  184.                      int67port: word;
  185.                      unkw3: word;
  186.                      unkw4: word;
  187.                      unkd1: longint;
  188.                      unkd2: longint;
  189.                      sysconfig: word;
  190.                      unk2: array [1..8] of byte;
  191.                      flags2: word;
  192.                      flags3: word;
  193.                      flags4: word;
  194.                      unkw5: word;
  195.                      extfree: word;
  196.                      unkd3: longint;
  197.                      unkw6: word;
  198.                      unkd4: longint;
  199.                      flags5: word;
  200.                      oldint21ofs: word;
  201.                      oldint21seg: word;
  202.                      emsofs: word;
  203.                      emsseg: word;
  204.                      extra: byte;
  205.                    end;
  206.  
  207.     var
  208.       V386maxbuf: T386maxbuf;
  209.       QEMMid: byte;
  210.       xword: word;
  211.       xbyte: byte;
  212.       xlong: longint;
  213.       foundit: boolean;
  214.  
  215.     begin
  216.     Pause3(-3);
  217.     if endit then
  218.       Exit;
  219.     Caption1('----Memory Managers and Memory utilities----');
  220.     Writeln;
  221.     Caption2('QEMM');
  222.     with regs do
  223.       begin
  224.       QEMMid:=$D2;
  225.       foundit:=false;
  226.       repeat
  227.         AH:=QEMMId;
  228.         AL:=0;
  229.         BX:=$5144; {'QD'}
  230.         CX:=$4D45; {'ME'}
  231.         DX:=$4D30; {'M0'}
  232.         Intr($2F, regs);
  233.         if (AL = $FF) and (BX = $4D45) and (CX = $4D44) and (DX = $5652) then
  234.           foundit:=true
  235.         else
  236.           begin
  237.           if QEMMid < $FF then
  238.             Inc(QEMMid)
  239.           else
  240.             QEMMid:=$C0;
  241.           end;
  242.       until foundit or (QEMMid = $D2);
  243.       if not foundit then
  244.         Writeln('no')
  245.       else
  246.         begin
  247.         AH:=QEMMid;
  248.         AL:=1;
  249.         BX:=$5145; {'QE'}
  250.         CX:=$4D4D; {'MM'}
  251.         DX:=$3432; {'42'}
  252.         Intr($2F, regs);
  253.         if BX = $4F4B {'OK'} then
  254.           begin
  255.           Write('yes');
  256.           Caption3('API entry');
  257.           SegOfs(ES, DI);
  258.           xlong:=longint(ES) shl 16 + DI;
  259.           Caption3('version');
  260.           AH:=3;
  261.           longcall(xlong, regs);
  262.           if not nocarry(regs) then
  263.             Write('error')
  264.           else
  265.             Write(unBCD(BH), decimal, AddZero(unBCD(BL)));
  266.           xword:=BX;
  267.           Caption3('status');
  268.           AH:=0;
  269.           longcall(xlong, regs);
  270.           if not nocarry(regs) then
  271.             Write('error')
  272.           else
  273.             if AL and 1 = 1 then
  274.               Write('OFF')
  275.             else
  276.               if AL and 2 = 2 then
  277.                  Write('Auto')
  278.               else
  279.                 Write('ON');
  280.           Writeln;
  281.           Caption3('High RAM');
  282.           AH:=$12;
  283.           longcall(xlong, regs);
  284.           if not nocarry(regs) then
  285.             Write('error')
  286.           else
  287.             begin
  288.             yesorno2(BX <> 0);
  289.             if BX <> 0 then
  290.               begin
  291.               Caption3('first MCB at');
  292.               Write(Hex(BX, 4));
  293.               end;
  294.             end;
  295.           if Hi(xword) >= 6 then
  296.             begin
  297.             Caption3('Stealth');
  298.             AX:=$1E00;
  299.             longcall(xlong, regs);
  300.             if not nocarry(regs) then
  301.               Write('error')
  302.             else
  303.               begin
  304.               case CL of
  305.                   0: Write('OFF');
  306.                 $46: Write('Frame');
  307.                 $4D: Write('Map')
  308.               else
  309.                 Write('????');
  310.               end;
  311.               if (CL = $46) or (CL = $4D) then
  312.                 begin
  313.                 Caption3('Stealthed ROMs');
  314.                 AX:=$1E01;
  315.                 longcall(xlong, regs);
  316.                 if not nocarry(regs) then
  317.                   Write('error')
  318.                 else
  319.                   Write(BX);
  320.                 end;
  321.               end;
  322.             end;
  323.           Writeln;
  324.           end
  325.         else
  326.           Writeln('no')
  327.         end;
  328.       Pause3(-1);
  329.       if endit then
  330.         Exit;
  331.       Caption2('Quarterdeck Manifest (memory resident)');
  332.       if not foundit then
  333.         Writeln('no')
  334.       else
  335.         begin
  336.         AH:=QEMMid;
  337.         AL:=1;
  338.         BX:=$4D41; {'MA'}
  339.         CX:=$4E49; {'NI'}
  340.         DX:=$4645; {'FE'}
  341.         Intr($2F, regs);
  342.         yesorno(BX = $5354 {'ST'});
  343.         end;
  344.       Pause3(-3);
  345.       if endit then
  346.         Exit;
  347.       Caption2('Quarterdeck VIDRAM');
  348.       if not foundit then
  349.         Writeln('no')
  350.       else
  351.         begin
  352.         AH:=QEMMid;
  353.         AL:=1;
  354.         BX:=$5649; {'VI'}
  355.         CX:=$4452; {'DR'}
  356.         DX:=$414D; {'AM'}
  357.         Intr($2F, regs);
  358.         if BX = $4F4B {'OK'} then
  359.           begin
  360.           Write('yes');
  361.           Caption3('at code segment');
  362.           Write(Hex(ES, 4));
  363.           xlong:=longint(ES) shl 16 + DI;
  364.           AH:=0;
  365.           LongCall(xlong, regs);
  366.           Caption3('state');
  367.           case AL of
  368.             0: Write('off');
  369.             1: Write('no EGA');
  370.             2: Write('no graphics')
  371.           else
  372.             Write(AL, '???');
  373.           end;
  374.           Writeln;
  375.           Caption3('extra RAM');
  376.           case BL of
  377.             0: Write('not used');
  378.             1: Write('from EGA');
  379.             2: Write('from EMS')
  380.           else
  381.             Write(BL, '???')
  382.           end;
  383.           Caption3('override');
  384.           if BH and 1 = 1 then
  385.             Write('enabled')
  386.           else
  387.             Write('disabled');
  388.           Caption3('MDA detected');
  389.           YesOrNo(BH and 8 = 8);
  390.           Caption3('monitor type');
  391.           case CL of
  392.               0: Write('default');
  393.               1: Write('mono');
  394.             $80: Write('color')
  395.           else
  396.             Write(CL, '???');
  397.           end;
  398.           Caption3('memory top at');
  399.           Writeln(Hex(SI, 4), ' (', SI div 64, 'K)');
  400.           end
  401.         else
  402.           Writeln('no');
  403.         end
  404.       end;
  405.     Pause3(-2);
  406.     if endit then
  407.       Exit;
  408.     Caption2('386^Max');
  409.     with regs do
  410.       begin
  411.       s:='386MAX$$'#0;
  412.       AX:=$3D00;
  413.       DS:=Seg(s);
  414.       DX:=Ofs(s) + 1;
  415.       MsDos(regs);
  416.       if not nocarry(regs) then
  417.         Writeln('no')
  418.       else
  419.         begin
  420.         xbyte:=AX;
  421.         AX:=$4402;
  422.         BX:=xbyte;
  423.         CX:=$5A;
  424.         DS:=Seg(V386Maxbuf);
  425.         DX:=Ofs(V386Maxbuf);
  426.         V386Maxbuf.version:=3;
  427.         MsDos(regs);
  428.         if not nocarry(regs) then
  429.           Writeln('Maybe; IOCTL call failed')
  430.         else
  431.           with V386maxbuf do
  432.             if signature <> '386MAX' then
  433.               Writeln('No; wrong signature found - "', signature, '"')
  434.             else
  435.               begin
  436.               Write('yes');
  437.               Caption3('version');
  438.               Write(verstr[1], decimal, verstr[3], verstr[4]);
  439.               Caption3('at segment');
  440.               Writeln(Hex(lowseg, 4));
  441.               Caption3('EMS active');
  442.               yesorno2(flags1 and $0080 = $0080);
  443.               Caption3('Windows 3 support');
  444.               yesorno(flags4 and 1 <> 1);
  445.               end;
  446.         AH:=$3E;
  447.         BX:=xbyte;
  448.         MsDos(regs);
  449.         end
  450.       end;
  451.     Pause3(-1);
  452.     if endit then
  453.       Exit;
  454.     Caption2('MICEMM');
  455.     if not EMSOK then
  456.       Writeln('no')
  457.     else
  458.       with Regs do
  459.         begin
  460.         AX:=$58F0;
  461.         Intr($67, Regs);
  462.         if AH <> 0 then
  463.           Writeln('no')
  464.         else
  465.           begin
  466.           Write('yes');
  467.           Caption3('Code Segment');
  468.           Writeln(Hex(BX, 4));
  469.           end;
  470.         end;
  471.     Pause3(-1);
  472.     if EndIt then
  473.       Exit;
  474.     Caption2('EMM386');
  475.     if not EMSOK then
  476.       Writeln('no')
  477.     else
  478.       with Regs do
  479.         begin
  480.         AX:=$FFA5;
  481.         Intr($67, Regs);
  482.         if AX <> $845A then
  483.           Writeln('no')
  484.         else
  485.           begin
  486.           Write('yes');
  487.           Caption3('API entry');
  488.           SegOfs(BX, CX);
  489.           Caption3('Status');
  490.           xlong:=longint(BX) shl 16 + CX;
  491.           AH:=0;
  492.           LongCall(xlong, Regs);
  493.           if AL and 1 = 1 then
  494.             Write('ON')
  495.           else
  496.             Write('OFF');
  497.           Caption3('Weitek');
  498.           AH:=2;
  499.           AL:=0;
  500.           LongCall(xlong, Regs);
  501.           if AL and 1 = 1 then
  502.             begin
  503.             Write('present ');
  504.             if AL and 2 = 2 then
  505.               Writeln('and enabled')
  506.             else
  507.               Writeln('but disabled')
  508.             end
  509.           else
  510.             Writeln('not present');
  511.           end;
  512.         end;
  513.     Pause3(-4);
  514.     if endit then
  515.       Exit;
  516.     Caption2('Virtual DMA Spec. (VDS)');
  517.     with regs do
  518.       begin
  519.       AX:=$354B;
  520.       MsDos(regs);
  521.       if (ES = 0) and (BX = 0) then
  522.         Writeln('no')
  523.       else
  524.         begin
  525.         AX:=$8102;
  526.         DX:=0;
  527.         Flags:=FCarry;
  528.         Intr($4B, regs);
  529.         yesorno2(nocarry(regs));
  530.         if nocarry(regs) then
  531.           begin
  532.           Caption3('version');
  533.           Write(AH, decimal, Hex(AL, 2));
  534.           Caption3('product');
  535.           case BX of
  536.             $0000: Write('QMAPS/HPMM');
  537.             $0001: Write('MSDOS EMM386');
  538.             $0003: Write('Windows 3');
  539.             $0300: Write('OS/2');
  540.             $0EDC: Write('DRDOS EMM386');
  541.             $4560: Write('386^Max');
  542.             $4D53: Write('Memory Cmdr');
  543.             $5145: Write('QEMM');
  544.             $524D: Write('Netroom')
  545.           else
  546.             Write(Hex(BX, 4));
  547.           end;
  548.           Caption3('rev.');
  549.           Writeln(CH, decimal, Hex(CL, 2));
  550.           Caption3('max. DMA buffer size');
  551.           Write((longint(SI) * 65536 + DI)/1024:0:1, 'K');
  552.           Caption3('transfers OK in');
  553.           if DX and 1 = 1 then
  554.             Writeln('First Meg only')
  555.           else
  556.             Writeln('any address');
  557.           Caption3('buffer in first meg');
  558.           yesorno2(DX and 2 = 2);
  559.           Caption3('auto-remap enabled');
  560.           yesorno2(DX and 4 = 4);
  561.           Caption3('contiguous memory');
  562.           yesorno(DX and 8 = 8);
  563.           Caption3('BIOS Data bit set');
  564.           yesorno(Mem[$40:$7B] and $20 = $20);
  565.           end
  566.         else
  567.           Writeln;
  568.         end;
  569.       end;
  570.     end; {MemUtils}
  571.  
  572.   procedure MultiTaskers;
  573.  
  574.     function windev(device: byte): word;
  575.       var
  576.         regs: registers;
  577.         saveit: word;
  578.  
  579.       begin
  580.       with regs do
  581.         begin
  582.         AX:=$1682;
  583.         Intr($2F, regs);
  584.         AX:=$170A;
  585.         DX:=device;
  586.         Intr($2F, regs);
  587.         windev:=AX
  588.         end
  589.       end; {windev}
  590.  
  591.     const
  592.       winclass: array[0..6] of string[21] = ('vector plotter', 'raster display',
  593.                   'raster printer', 'raster camera', 'character-stream, PLP',
  594.                   'Metafile, VDM', 'display-file');
  595.  
  596.     var
  597.       xword1: word;
  598.  
  599.     begin
  600.     Pause3(-6);
  601.     if endit then
  602.       Exit;
  603.     Caption1('----Multi-Taskers and Task Switchers + Utilities---');
  604.     Writeln;
  605.     Caption2('Quarterdeck Desqview');
  606.     if OSMajor >= 10 then
  607.       Writeln('no')
  608.     else
  609.       begin
  610.       with regs do
  611.         begin
  612.         AX:=$2B01;
  613.         CX:=$4445; {DE}
  614.         DX:=$5351; {SQ}
  615.         MsDos(regs);
  616.         if AL = $FF then
  617.           Writeln('no')
  618.         else
  619.           begin
  620.           Write('yes');
  621.           Caption3('version');
  622.           if BX = $0002 then
  623.             Writeln('2', decimal, '00')
  624.           else
  625.             begin
  626.             Write(BH, decimal);
  627.             ZeroPad(BL);
  628.             Writeln;
  629.             end;
  630.           Caption3('window number');
  631.           AX:=$DE07;
  632.           Intr($15, regs);
  633.           Write(AX);
  634.           Caption3('true video mode');
  635.           AX:=$DE1E;
  636.           Intr($15, regs);
  637.           Write(BL);
  638.           Caption3('width');
  639.           Write(CH);
  640.           Caption3('height');
  641.           Writeln(CL);
  642.           Caption3('      common memory -> avail');
  643.           AX:=$DE04;
  644.           Intr($15, regs);
  645.           Write(BX:6);
  646.           Caption3('largest');
  647.           Write(CX:6);
  648.           Caption3('total');
  649.           Writeln(DX:6);
  650.           Caption3('conventional memory -> avail');
  651.           AX:=$DE05;
  652.           Intr($15, regs);
  653.           Write(BX:5, 'K');
  654.           Caption3('largest');
  655.           Write(CX:5, 'K');
  656.           Caption3('total');
  657.           Writeln(DX:5, 'K');
  658.           Caption3('    expanded memory -> avail');
  659.           AX:=$DE06;
  660.           Intr($15, regs);
  661.           Write(BX:5, 'K');
  662.           Caption3('largest');
  663.           Write(CX:5, 'K');
  664.           Caption3('total');
  665.           Writeln(DX:5, 'K');
  666.           end;
  667.         end;
  668.       end;
  669.     Pause3(-1);
  670.     if endit then
  671.       Exit;
  672.     Caption2('DOS 5 task switcher');
  673.     with regs do
  674.       begin
  675.       AX:=$4B02;
  676.       BX:=0;
  677.       ES:=0;
  678.       DI:=0;
  679.       Intr($2F, regs);
  680.       if nocarry(regs) and (AX = 0) and (BX = 0) then
  681.         begin
  682.         Write('yes');
  683.         Caption3('switcher entry point');
  684.         SegOfs(ES, DI);
  685.         Writeln;
  686.         end
  687.       else
  688.         Writeln('no');
  689.       end;
  690.     Pause3(-1);
  691.     if endit then
  692.       Exit;
  693.     Caption2('DRDOS TaskMAX');
  694.     with regs do
  695.       begin
  696.       AX:=$2700;
  697.       BX:=0;
  698.       CX:=0;
  699.       Intr($2F, regs);
  700.       if AL <> $FF then
  701.         Writeln('no')
  702.       else
  703.         begin
  704.         Write('yes');
  705.         Caption3('version');
  706.         AX:=$2701;
  707.         Intr($2F, regs);
  708.         Write(DX);
  709.         Caption3('maximum tasks');
  710.         Write(AX);
  711.         Caption3('active tasks');
  712.         Writeln(CX)
  713.         end;
  714.       end;
  715.     Pause3(-1);
  716.     if endit then
  717.       Exit;
  718.     Caption2('TAME');
  719.     with regs do
  720.       begin
  721.       AX:=$2B01;
  722.       CX:=$5441;
  723.       DX:=$4D45;
  724.       MsDos(regs);
  725.       if AL <> 2 then
  726.         Writeln('no')
  727.       else
  728.         begin
  729.         Write('yes');
  730.         Caption3('data area');
  731.         Writeln(Hex(ES, 4), ':', Hex(DX, 4))
  732.         end
  733.       end;
  734.     Pause3(-6);
  735.     if endit then
  736.       Exit;
  737.     Caption2('Microsoft Windows');
  738.     with regs do
  739.       begin
  740.       AX:=$1600;
  741.       Intr($2F, regs);
  742.       case AL of
  743.       $01,$FF: begin
  744.                Writeln('yes');
  745.                Caption3('version');
  746.                Writeln('Windows/386 2.x')
  747.                end;
  748.       $00,$80: begin
  749.                AX:=$4680;
  750.                Intr($2F, regs);
  751.                if AX = 0 then
  752.                  begin
  753.                  Writeln('yes');
  754.                  Caption3('mode');
  755.                  Writeln('Real or Standard')
  756.                  end
  757.                else
  758.                  Writeln('no');
  759.                end;
  760.       $02..$7F,$81..$FE: begin
  761.                          Writeln('yes');
  762.                          Caption3('version');
  763.                          Write(AL, decimal, AH, ' enhanced mode');
  764.                          Caption3('Virtual Machine ID');
  765.                          AX:=$1683;
  766.                          Intr($2F, regs);
  767.                          Writeln(BX);
  768.                          Caption3('WINOLDAP support');
  769.                          AX:=$1700;
  770.                          Intr($2F, regs);
  771.                          if AX = $1700 then
  772.                            Writeln('no')
  773.                          else
  774.                            begin
  775.                            Write('yes');
  776.                            Caption3('version');
  777.                            Writeln(AL, decimal, AH);
  778.                            end;
  779.                          Caption3('Driver version');
  780.                          xword1:=windev(0);
  781.                          Write(Hi(xword1), decimal, Lo(xword1));
  782.                          Caption3('Device type');
  783.                          Writeln(winclass[Lo(windev(2))]);
  784.                          Caption3('Pixel width');
  785.                          Write(windev(8));
  786.                          Caption3('height');
  787.                          Write(windev($A));
  788.                          Caption3('colors');
  789.                          Write(windev($18));
  790.                          Caption3('bits/pixel');
  791.                          Write(windev($C));
  792.                          Caption3('bit planes');
  793.                          Writeln(windev($E));
  794.                          Caption3('X aspect');
  795.                          Write(windev($28));
  796.                          Caption3('Y aspect');
  797.                          Writeln(windev($2A));
  798.                          Caption3('brushes');
  799.                          Write(windev($10));
  800.                          Caption3('pens');
  801.                          Write(windev($12));
  802.                          Caption3('markers');
  803.                          Write(windev($14));
  804.                          Caption3('fonts');
  805.                          Writeln(windev($16));
  806.                          end;
  807.       end; {case}
  808.       end;
  809.     end; {MultiTaskers}
  810.  
  811.   procedure NortonUtils;
  812.     procedure nortonstatus(b: byte);
  813.       begin
  814.       case b of
  815.         0: Write('disabled');
  816.         1: Write('enabled')
  817.       else
  818.         Write('unknown')
  819.       end
  820.       end; {nortonstatus}
  821.  
  822.     var
  823.       regs: registers;
  824.  
  825.     begin
  826.     Pause3(-1);
  827.     if endit then
  828.       Exit;
  829.     Caption1('----Norton Utilities----');
  830.     Writeln;
  831.     Caption2('Norton NCACHE');
  832.     with regs do
  833.       begin
  834.       AX:=$FE00;
  835.       BX:=0;
  836.       CX:=0;
  837.       DX:=0;
  838.       DI:=$4E55; {NU}
  839.       SI:=$4346; {CF}
  840.       Intr($2F, regs);
  841.       if SI = $6366 {cf} then
  842.         begin
  843.         Write('yes (NCACHE-F or NCACHE v6+)');
  844.         Caption3('status');
  845.         nortonstatus(AH);
  846.         Writeln;
  847.         end
  848.       else
  849.         begin
  850.         AX:=$FE00;
  851.         BX:=0;
  852.         CX:=0;
  853.         DX:=0;
  854.         DI:=$4E55; {NU}
  855.         SI:=$4353; {CS}
  856.         Intr($2F, regs);
  857.         if SI = $6373 {cs} then
  858.           begin
  859.           Write('yes (NCACHE-S)');
  860.           Caption3('status');
  861.           nortonstatus(AH);
  862.           Writeln
  863.           end
  864.         else
  865.           Writeln('no');
  866.         end
  867.       end;
  868.     Pause3(-1);
  869.     if endit then
  870.       Exit;
  871.     Caption2('Norton Diskreet');
  872.     with regs do
  873.       begin
  874.       AX:=$FE00;
  875.       BX:=0;
  876.       CX:=0;
  877.       DX:=0;
  878.       DI:=$4E55; {NU}
  879.       SI:=$4443; {DC}
  880.       Intr($2F, regs);
  881.       if SI = $6463 {dc} then
  882.         begin
  883.         Write('yes');
  884.         Caption3('status');
  885.         nortonstatus(AH);
  886.         Caption3('resident at');
  887.         Writeln(Hex(CX, 4))
  888.         end
  889.       else
  890.         Writeln('no');
  891.       end;
  892.     Pause3(-1);
  893.     if endit then
  894.       Exit;
  895.     Caption2('Norton DiskMon');
  896.     with regs do
  897.       begin
  898.       AX:=$FE00;
  899.       BX:=0;
  900.       CX:=0;
  901.       DX:=0;
  902.       DI:=$4E55; {NU}
  903.       SI:=$444D; {DM}
  904.       Intr($2F, regs);
  905.       if SI = $646D {dm} then
  906.         begin
  907.         Write('yes');
  908.         Caption3('status');
  909.         nortonstatus(AH);
  910.         Caption3('resident at');
  911.         Writeln(Hex(CX, 4));
  912.         end
  913.       else
  914.         Writeln('no');
  915.       end;
  916.     Pause3(-1);
  917.     if endit then
  918.       Exit;
  919.     Caption2('Norton FileSave/EraseProtect');
  920.     with regs do
  921.       begin
  922.       AX:=$FE00;
  923.       BX:=0;
  924.       CX:=0;
  925.       DX:=0;
  926.       DI:=$4E55; {NU}
  927.       SI:=$4653; {FS}
  928.       Intr($2F, regs);
  929.       if SI = $6673 {fs} then
  930.         begin
  931.         Write('yes');
  932.         Caption3('resident at');
  933.         Writeln(Hex(CX, 4));
  934.         end
  935.       else
  936.         Writeln('no');
  937.       end;
  938.    end; {NortonUtils}
  939.  
  940.    procedure VirusUtils;
  941.      var
  942.        regs: registers;
  943.  
  944.      begin
  945.      Pause3(-2);
  946.      if endit then
  947.        Exit;
  948.      Caption1('----Virus protectors---');
  949.      Writeln;
  950.      Caption2('F-PROT package -> F-LOCK');
  951.      with regs do
  952.        begin
  953.        AX:=$4653;
  954.        BX:=0;
  955.        CX:=2;
  956.        Intr($2F, regs);
  957.        yesorno2(AX = $FFFF);
  958.        Caption3('F-XCHK');
  959.        AX:=$4653;
  960.        BX:=0;
  961.        CX:=3;
  962.        Intr($2F, regs);
  963.        yesorno2(AX = $FFFF);
  964.        Caption3('F-POPUP');
  965.        AX:=$4653;
  966.        BX:=0;
  967.        CX:=4;
  968.        Intr($2F, regs);
  969.        yesorno2(AX = $FFFF);
  970.        Caption3('F-DLOCK');
  971.        AX:=$4653;
  972.        BX:=0;
  973.        CX:=5;
  974.        Intr($2F, regs);
  975.        yesorno(AX = $FFFF)
  976.        end;
  977.      Pause3(-1);
  978.      if endit then
  979.        Exit;
  980.      Caption2('TBScanX');
  981.      with regs do
  982.        begin
  983.        AX:=$CA00;
  984.        BX:=$5442; {TB}
  985.        Intr($2F, regs);
  986.        if (AL <> $FF) or (BX <> $7462 {tb}) then
  987.          Writeln('no')
  988.        else
  989.          begin
  990.          Write('yes');
  991.          Caption3('version');
  992.          AX:=$CA01;
  993.          Intr($2F, regs);
  994.          if AH <> $CA then
  995.            Write(AH shr 4, decimal, AddZero(AH and $F))
  996.          else
  997.            Write('2.2-');
  998.          Caption3('status');
  999.          if AL = 0 then
  1000.            Writeln('disabled')
  1001.          else
  1002.            Writeln('enabled');
  1003.          end
  1004.        end;
  1005.      Pause3(-1);
  1006.      if endit then
  1007.        Exit;
  1008.      Caption2('Flu_Shot+');
  1009.      with regs do
  1010.        begin
  1011.        AX:=$FF0F;
  1012.        MsDos(regs);
  1013.        yesorno(AX = $0101);
  1014.        end;
  1015.      end; {VirusUtils}
  1016.  
  1017.   procedure SCSI;
  1018.     var
  1019.       xword1: word;
  1020.       regs: registers;
  1021.  
  1022.     begin
  1023.     Pause3(-2);
  1024.     if endit then
  1025.       Exit;
  1026.     Caption1('----SCSI drivers----');
  1027.     Writeln;
  1028.     Caption2('Common Access Method SCSI (CAM-SCSI)');
  1029.     with regs do
  1030.       begin
  1031.       AX:=$354F;
  1032.       MsDos(regs);
  1033.       if (ES <> 0) and (BX <> 0) then
  1034.         begin
  1035.         AX:=$8200;
  1036.         CX:=$8765;
  1037.         DX:=$CBA9;
  1038.         Intr($4F, regs);
  1039.         if (CX = $9ABC) and (DX=$5678) then
  1040.           begin
  1041.           s:='';
  1042.           for xword1:=DI to DI + 7 do
  1043.             s:=s + Chr(Mem[ES:xword1]);
  1044.           yesorno(s = 'SCSI_CAM');
  1045.           end
  1046.         else
  1047.           Writeln('no');
  1048.         end;
  1049.       end;
  1050.     Pause3(-1);
  1051.     if endit then
  1052.       Exit;
  1053.     Caption2('CMC International SCSI driver');
  1054.     with regs do
  1055.       begin
  1056.       AX:=$3578;
  1057.       MsDos(regs);
  1058.       s:='';
  1059.       for xword1:=BX + 3 to BX + 6 do
  1060.         s:=s + Chr(Mem[ES:xword1]);
  1061.       yesorno(s = 'SCSI');
  1062.       end;
  1063.     end; {SCSI}
  1064.  
  1065.   procedure DiskCaches;
  1066.     type
  1067.       smartdrvt = record
  1068.                write_through: byte;
  1069.                write_buffered: byte;
  1070.                cache_enabled: byte;
  1071.                drivertype: byte;
  1072.                cticks: word;
  1073.                locked: byte;
  1074.                reboot_flush: byte;
  1075.                full_track_write: byte;
  1076.                buffering_type: byte;
  1077.                origInt13ofs: word;
  1078.                origInt13seg: word;
  1079.                minorversion: byte;
  1080.                majorversion: byte;
  1081.                reserved: word;
  1082.                secs_read: word;
  1083.                secs_in_cache: word;
  1084.                secs_in_trk_buf: word;
  1085.                cache_hitrate: byte;
  1086.                track_buf_hitrate: byte;
  1087.                total_tracks: word;
  1088.                tracks_used: word;
  1089.                locked_tracks: word;
  1090.                dirty_tracks: word;
  1091.                current_size: word;
  1092.                original_size: word;
  1093.                minimum_size: word;
  1094.                lock_pointer_ofs: word;
  1095.                lock_pointer_seg: word;
  1096.              end;
  1097.  
  1098.     var
  1099.       xbyte: byte;
  1100.       smartdrvbuf: smartdrvt;
  1101.       xbool1: boolean;
  1102.       regs: registers;
  1103.       foundit: boolean;
  1104.  
  1105.     begin
  1106.     Pause3(-4);
  1107.     if endit then
  1108.       Exit;
  1109.     Caption1('----Disk Caches----');
  1110.     Writeln;
  1111.     Caption2('SMARTDRV');
  1112.     with regs do
  1113.       begin
  1114.       s:='SMARTAAR'#0;
  1115.       AX:=$3D00;
  1116.       DS:=Seg(s);
  1117.       DX:=Ofs(s) + 1;
  1118.       MsDos(regs);
  1119.       if not nocarry(regs) then
  1120.         begin
  1121.         AX:=$4A10;
  1122.         BX:=0;
  1123.         CX:=0;
  1124.         DX:=0;
  1125.         Intr($2F, regs);
  1126.         if AX = $BABE then
  1127.           begin
  1128.           Write('yes');
  1129.           Caption3('ver');
  1130.           Write(unBCD(Hi(BP)), decimal, AddZero(unBCD(Lo(BP))));
  1131.           Caption3('size now');
  1132.           AX:=$4A10;
  1133.           BX:=4;
  1134.           Intr($2F, regs);
  1135.           Write((longint(CX) * BX) div 1024, 'K');
  1136.           Caption3('min size');
  1137.           Write((longint(DX) * CX) div 1024, 'K');
  1138.           Caption3('element size');
  1139.           Writeln(CX div 1024, 'K');
  1140.           Caption3('cache hits');
  1141.           AX:=$4A10;
  1142.           BX:=0;
  1143.           Intr($2F, regs);
  1144.           Write(longint(DX) shl 16 + BX);
  1145.           Caption3('cache misses');
  1146.           Writeln(longint(DI) shl 16 + SI);
  1147.           for xbyte:=0 to $19 do
  1148.             begin
  1149.             Pause3(-1);
  1150.             if endit then
  1151.               Exit;
  1152.             AX:=$4A10;
  1153.             BX:=3;
  1154.             BP:=xbyte;
  1155.             DX:=0;
  1156.             Intr($2F, regs);
  1157.             if (DL <> $FF) then
  1158.               begin
  1159.               Caption3('Drive');
  1160.               Write(Chr(xbyte + Ord('A')));
  1161.               Caption3('read');
  1162.               yesorno3(DL and $80 <> $80);
  1163.               Caption3('write');
  1164.               yesorno3(DL and $40 <> $40);
  1165.               Caption3('buffered');
  1166.               AX:=$4A10;
  1167.               BX:=5;
  1168.               BP:=xbyte;
  1169.               Intr($2F, regs);
  1170.               yesorno3(AX = $BABE);
  1171.               Caption3('DBLSPACE');
  1172.               AX:=$4A11;
  1173.               BX:=0;
  1174.               Intr($2F, regs);
  1175.               if (AX = 0) and (BX = $444D) then
  1176.                 begin
  1177.                 AX:=$4A11;
  1178.                 BX:=1;
  1179.                 DL:=xbyte;
  1180.                 Intr($2F, regs);
  1181.                 if AX = 0 then
  1182.                   begin
  1183.                   yesorno3(BL and $80 = $80);
  1184.                   if BL and $80 = $80 then
  1185.                     begin
  1186.                     Write(' ', Chr((BL and $7F) + Ord('A')), ':\DBLSPACE.');
  1187.                     ZeroPad3(BH);
  1188.                     end;
  1189.                   end
  1190.                 else
  1191.                   Write('(error ', Hex(AX, 4), ')');
  1192.                 Writeln;
  1193.                 end
  1194.               else
  1195.                 Writeln('no');
  1196.               end;
  1197.             end;
  1198.           end
  1199.         else
  1200.           Writeln('no')
  1201.         end
  1202.       else
  1203.         begin
  1204.         xbyte:=AX;
  1205.         AX:=$4400;
  1206.         BX:=xbyte;
  1207.         MsDos(regs);
  1208.         if (not nocarry(regs)) or (DX and $4080 <> $4080) then
  1209.           Writeln('Maybe. IOCTL interface not supported.')
  1210.         else
  1211.           begin
  1212.           AX:=$4402;
  1213.           BX:=xbyte;
  1214.           CX:=SizeOf(smartdrvbuf);
  1215.           DS:=Seg(smartdrvbuf);
  1216.           DX:=Ofs(smartdrvbuf);
  1217.           MsDos(regs);
  1218.           if not nocarry(regs) then
  1219.             Writeln('Maybe. IOCTL read failed.')
  1220.           else
  1221.             begin
  1222.             Write('yes');
  1223.             with smartdrvbuf do
  1224.               begin
  1225.               Caption3('ver.');
  1226.               Write(majorversion, decimal, minorversion);
  1227.               Caption3('Size');
  1228.               Write(current_size * 16, 'K');
  1229.               Caption3('Max');
  1230.               Write(original_size * 16, 'K');
  1231.               Caption3('Min');
  1232.               Write(minimum_size * 16, 'K');
  1233.               Caption3('enabled');
  1234.               yesorno(cache_enabled = 1);
  1235.               Caption3('locked tracks');
  1236.               yesorno2(locked > 0);
  1237.               Caption3('write-through');
  1238.               yesorno2(write_through = 1);
  1239.               Caption3('write-buffered');
  1240.               yesorno2(write_buffered = 1);
  1241.               Caption3('hit rate');
  1242.               Writeln(cache_hitrate, '%');
  1243.               Caption3('DMA buffering');
  1244.               case buffering_type of
  1245.                 0: Write('off');
  1246.                 1: Write('on');
  1247.                 2: Write('dynamic')
  1248.               else
  1249.                 Write('(unknown)');
  1250.               end; {case}
  1251.               Caption3('memory type');
  1252.               case drivertype of
  1253.                 1: Write('XMS');
  1254.                 2: Write('EMS')
  1255.               else
  1256.                 Write('unknown:', drivertype);
  1257.               end;
  1258.               Caption3('flush on reboot');
  1259.               yesorno(reboot_flush <> 0);
  1260.               Caption3('Tracks total');
  1261.               Write(total_tracks);
  1262.               Caption3('used');
  1263.               Write(tracks_used);
  1264.               Caption3('locked');
  1265.               Write(locked_tracks);
  1266.               Caption3('dirty');
  1267.               Writeln(dirty_tracks);
  1268.               end
  1269.             end
  1270.           end;
  1271.         AH:=$3E;
  1272.         BX:=xbyte;
  1273.         MsDos(regs);
  1274.         end
  1275.       end;
  1276.     Pause3(-4);
  1277.     if endit then
  1278.       Exit;
  1279.     Caption2('HyperDisk');
  1280.     with regs do
  1281.       begin
  1282.       xbyte:=$DF;
  1283.       foundit:=false;
  1284.       xbool1:=false;
  1285.       repeat
  1286.         AH:=xbyte;
  1287.         AL:=0;
  1288.         BX:=$4448; {DH}
  1289.         Intr($2F, regs);
  1290.         if (AL = $FF) and (CX = $5948 {YH}) then
  1291.           foundit:=true
  1292.         else
  1293.           if (xbyte = $DF) and (not xbool1) then
  1294.             begin
  1295.             xbyte:=$C0;
  1296.             xbool1:=true;
  1297.             end
  1298.           else
  1299.             Inc(xbyte);
  1300.       until (xbyte = 0) or (foundit);
  1301.       if xbyte = 0 then
  1302.         Writeln('no')
  1303.       else
  1304.         begin
  1305.         Write('yes');
  1306.         Caption3('at code segment');
  1307.         Write(Hex(BX, 4));
  1308.         Caption3('local data version');
  1309.         Write(DH, decimal, AddZero(unBCD(DL)));
  1310.         Writeln;
  1311.         AH:=xbyte;
  1312.         AL:=1;
  1313.         BX:=$4448; {DH}
  1314.         Intr($2F, regs);
  1315.         if AX = 0 then
  1316.           begin
  1317.           Caption3('buffers used');
  1318.           Write(BX);
  1319.           Caption3('buffers modified but not yet written');
  1320.           Writeln(CX);
  1321.           Caption3('   Floppies - cached');
  1322.           YesOrNo3(DL and $40 = $40);
  1323.           Caption3('verified');
  1324.           YesOrNo3(DL and 4 = 4);
  1325.           Caption3('staged writes');
  1326.           YesOrNo(DL and 1 = 1);
  1327.           Caption3('Hard Drives - cached');
  1328.           YesOrNo3(DL and $80 = $80);
  1329.           Caption3('verified');
  1330.           YesOrNo3(DL and 8 = 8);
  1331.           Caption3('staged writes');
  1332.           YesOrNo(DL and 2 = 2);
  1333.           end;
  1334.         end;
  1335.       end;
  1336.     end; {DiskCaches}
  1337.  
  1338.   procedure DiskCompress;
  1339.     type
  1340.       stackerbuft = record
  1341.                   signature: word;
  1342.                   unknown: word;
  1343.                   ddofs: word;
  1344.                   ddseg: word
  1345.                 end;
  1346.  
  1347.     var
  1348.       xbyte, xbyte2: byte;
  1349.       stackerbuf: stackerbuft;
  1350.       xword, xword1, xword2: word;
  1351.       DSSect, DSFreeSect, DriveSect, FreeSect: longint;
  1352.       regs: registers;
  1353.       foundit: boolean;
  1354.  
  1355.     begin
  1356.     Pause3(-4);
  1357.     if endit then
  1358.       Exit;
  1359.     Caption1('----Disk Compressors----');
  1360.     Writeln;
  1361.     xword1:=Seg(stackerbuf);
  1362.     xword2:=Ofs(stackerbuf);
  1363.     Caption2('Stacker');
  1364.       asm
  1365.       mov  ax,$CDCD       {signature entry}
  1366.       mov  cx,1
  1367.       mov  dx,0
  1368.       push ds             {need to preserve these}
  1369.       push bp
  1370.       mov  ds,xword1      {pointer to address buffer}
  1371.       mov  bx,xword2
  1372.       int  $25            {DOS absolute read sectors}
  1373.       pop  cx             {remove old flags}
  1374.       pop  bp             {restore important regs}
  1375.       pop  ds
  1376.       mov  xword1,ax      {save return code}
  1377.       end;
  1378.     with stackerbuf do
  1379.       begin
  1380.       if (signature = $CDCD) and (MemW[ddseg:ddofs] = $A55A) then
  1381.         begin
  1382.         Write('yes');
  1383.         Caption3('version');
  1384.         Write((MemW[ddseg:ddofs + 2] / 100.0):5:2);
  1385.         Caption3('at address');
  1386.         SegOfs(ddseg, ddofs);
  1387.         Writeln;
  1388.         Caption3('Stacker drive(s)');
  1389.         foundit:=false;
  1390.         if (OSMajor = 3) and (OSMinor = 31) then
  1391.           xword:=$440E
  1392.         else
  1393.           xword:=$4408;
  1394.         for xbyte:=1 to 26 do
  1395.           with Regs do
  1396.             begin
  1397.             BX:=xbyte;
  1398.             AX:=xword;
  1399.             Mem[ddseg:ddofs + $3E]:=$FF;
  1400.             MsDos(Regs);
  1401.             xbyte2:=Mem[ddseg:ddofs + $3E];
  1402.             if Mem[ddseg:ddofs + $3E] <> $FF then
  1403.               begin
  1404.               Write(Chr(xbyte + $40), ' ');
  1405.               foundit:=true
  1406.               end
  1407.             end;
  1408.         if not foundit then
  1409.           Write('(none)');
  1410.         Writeln;
  1411.         Caption3('Swapped');
  1412.         foundit:=false;
  1413.         s:='';
  1414.         for xword:=ddofs + $52 to ddofs + $55 do
  1415.           s:=s + Chr(Mem[ddseg:xword]);
  1416.         if s = 'SWAP' then
  1417.           for xbyte:=0 to 25 do
  1418.             if Mem[ddseg:ddofs + $56 + xbyte] <> xbyte then
  1419.               begin
  1420.               if foundit then
  1421.                 Write(', ');
  1422.               Write(Chr(xbyte + $41), ' was ',
  1423.                     Chr(Mem[ddseg:ddofs + $56 + xbyte] + $41));
  1424.               foundit:=true;
  1425.               end;
  1426.         if not foundit then
  1427.           Write('(none)');
  1428.         Writeln;
  1429.         end
  1430.       else
  1431.         Writeln('no');
  1432.       end;
  1433.     Pause3(-1);
  1434.     if endit then
  1435.       Exit;
  1436.     Caption2('DBLSPACE');
  1437.     with regs do
  1438.       begin
  1439.       AX:=$4A11;
  1440.       BX:=0;
  1441.       Intr($2F, regs);
  1442.       if (AX = 0) and (BX = $444D) then
  1443.         begin
  1444.         Write('yes');
  1445.         Caption3('First drive');
  1446.         Write(Chr(CL));
  1447.         Caption3('Last drive');
  1448.         Writeln(Chr(CL + CH - 1));
  1449.         xbool1:=false;
  1450.         for xbyte:=0 to $19 do
  1451.           begin
  1452.           Pause3(-4);
  1453.           if endit then
  1454.             Exit;
  1455.           AX:=$4A11;
  1456.           BX:=1;
  1457.           DL:=xbyte;
  1458.           Intr($2F, regs);
  1459.           if (AX = 0) and (BL and $80 = $80) then
  1460.             begin
  1461.             xbool1:=true;
  1462.             Caption3('Drive');
  1463.             Write(Chr(xbyte + Ord('A')));
  1464.             Caption3('Host');
  1465.             Write(Chr((BL and $7F) + Ord('A')), ':\DBLSPACE.');
  1466.             ZeroPad3(BH);
  1467.             AX:=$4A11;
  1468.             BX:=7;
  1469.             DL:=xbyte;
  1470.             Intr($2F, regs);
  1471.             if AX = 0 then
  1472.               begin
  1473.               Caption3('sectors');
  1474.               DSSect:=longint(MemW[DS:SI] + MemW[DS:SI + 2] * 65536);
  1475.               Write(DSSect);
  1476.               Caption3('free sectors');
  1477.               DSFreeSect:=longint(MemW[DS:SI + 4] + MemW[DS:SI + 6] * 65536);
  1478.               Write(DSFreeSect);
  1479.               end;
  1480.             Writeln;
  1481.             SaveX:=WhereX;
  1482.             SaveY:=WhereY;
  1483.             TextColor(LightRed+Blink);
  1484.             Write('  *retrieving information*');
  1485.             AH:=$1C;
  1486.             DL:=xbyte + 1;
  1487.             MsDos(regs);
  1488.             GotoXY(SaveX, SaveY);
  1489.             Write('                          ');
  1490.             GotoXY(SaveX, SaveY);
  1491.             if AL <> $FF then
  1492.               begin
  1493.               DriveSect:=longint(DX) * longint(AL);
  1494.               Caption3('  estimated ratio');
  1495.               Write((DriveSect / DSSect):5:2, ':1');
  1496.               AH:=$36;
  1497.               DL:=xbyte + 1;
  1498.               MsDos(regs);
  1499.               DriveSect:=longint(DX) * longint(AX);
  1500.               FreeSect:=longint(BX) * longint(AX);
  1501.               Caption3('actual ratio');
  1502.               Write(((DriveSect - FreeSect) / (DSSect - DSFreeSect)):5:2, ':1');
  1503.               end;
  1504.             Writeln;
  1505.             AX:=$4A11;
  1506.             BX:=8;
  1507.             DL:=xbyte;
  1508.             Intr($2F, regs);
  1509.             if AX = 0 then
  1510.               begin
  1511.               Caption3('  maximum File Fragment heap entries');
  1512.               Write(BX);
  1513.               Caption3('available');
  1514.               Write(CX);
  1515.               end;
  1516.             Writeln;
  1517.             AX:=$4A11;
  1518.             BX:=3;
  1519.             CL:=xbyte;
  1520.             Intr($2F, regs);
  1521.             if CL <> $FF then
  1522.               begin
  1523.               Caption3('  Driver strategy');
  1524.               SegOfs(ES, SI);
  1525.               Caption3('Driver interrupt');
  1526.               SegOfs(ES, DI);
  1527.               end;
  1528.             Writeln;
  1529.             end;
  1530.           end;
  1531.         if not xbool1 then
  1532.           Writeln('No DBLSPACE drives found!');
  1533.         end
  1534.       else
  1535.         Writeln('no');
  1536.       end;
  1537.     end; {DiskCompress}
  1538.  
  1539.   procedure MiscUtils;
  1540.     const
  1541.       pcAstatus: array[$FFFC..$FFFF] of string[23] = ('resident and active',
  1542.                    'resident and not active', 'memory resident mode',
  1543.                    'automatic mode');
  1544.       pcAspd: array[0..$F] of word = (50, 75, 110, 134, 150, 300, 600, 1200, 1800,
  1545.                 2000, 2400, 4800, 7200, 9600, 19200, 38400);
  1546.       KeyScan: array[0..255] of string[5] =
  1547.        {00}( '??', 'ESC',   '1',   '2',   '3',   '4',   '5',   '6',   '7',   '8',
  1548.        {10}   '9',   '0',   '-',   '=',  'BS', 'TAB',   'Q',   'W',   'E',   'R',
  1549.        {20}   'T',   'Y',   'U',   'I',   'O',   'P',   '[',   ']', 'ENT',  '??',
  1550.        {30}   'A',   'S',   'D',   'F',   'G',   'H',   'J',   'K',   'L',   ';',
  1551.        {40}  '''',   '`',  '??',   '\',   'Z',   'X',   'C',   'V',   'B',   'N',
  1552.        {50}   'M',   ',',   '.',   '/', 'kp*',  '??',  '??',  'SP',  '??',  'F1',
  1553.        {60}  'F2',  'F3',  'F4',  'F5',  'F6',  'F7',  'F8',  'F9', 'F10',  '??',
  1554.        {70}  '??', 'HOME', 'UP','PGUP', 'kp-','LEFT', 'kp5','RIGHT','kp+', 'END',
  1555.        {80}'DOWN', 'PGDN','INS', 'DEL',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1556.        {90}  'F7',  'F8',  'F9', 'F10',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1557.       {100}  'F7',  'F8',  'F9', 'F10',  'F1',  'F2',  'F3',  'F4',  'F5',  'F6',
  1558.       {110}  'F7',  'F8',  'F9', 'F10',  '??','LEFT','RIGHT','END','PGDN','HOME',
  1559.       {120}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1560.       {130}  '??',  '??','PGUP', 'F11', 'F12', 'F11', 'F12', 'F11', 'F12', 'F11',
  1561.       {140} 'F12',  'UP', 'kp-', 'kp5', 'kp+','DOWN', 'INS', 'DEL',  '??', 'kp/',
  1562.       {150}  '??','HOME',  'UP','PGUP',  '??','LEFT',  '??','RIGHT', '??', 'END',
  1563.       {160}'DOWN','PGDN', 'INS', 'DEL', 'kp/',  '??','kpENT', '??',  '??',  '??',
  1564.       {170}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1565.       {180}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1566.       {190}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1567.       {200}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1568.       {210}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1569.       {220}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1570.       {230}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1571.       {240}  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',  '??',
  1572.       {250}  '??',  '??',  '??',  '??',  '??',  '??');
  1573.  
  1574.     type
  1575.       fossilbuft = record
  1576.                      fbufsize: word;
  1577.                      spec: byte;
  1578.                      rev: byte;
  1579.                      idstrofs: word;
  1580.                      idstrseg: word;
  1581.                      inbufsize: word;
  1582.                      infree: word;
  1583.                      outbufsize: word;
  1584.                      outfree: word;
  1585.                      scrwidth: byte;
  1586.                      scrlen: byte;
  1587.                      baudrate: byte;
  1588.                      extra: array[1..13] of byte;
  1589.                    end;
  1590.       vfossilbuft = record
  1591.                       fbufsize: word;
  1592.                       ver: word;
  1593.                       rev: word;
  1594.                       hifunc: word
  1595.                     end;
  1596.     var
  1597.       xbyte: byte;
  1598.       xword1: word;
  1599.       xbool1: boolean;
  1600.       xchar: char;
  1601.       fossilbuf: fossilbuft;
  1602.       vfossilbuf: vfossilbuft;
  1603.       regs: registers;
  1604.       foundit: boolean;
  1605.  
  1606.     begin
  1607.     Pause3(-2);
  1608.     if endit then
  1609.       Exit;
  1610.     Caption1('----Miscellaneous----');
  1611.     Writeln;
  1612.     Caption2('pcAnywhere');
  1613.     with regs do
  1614.       begin
  1615.       AH:=$79;
  1616.       Intr($16, regs);
  1617.       if AX < $FFFC then
  1618.         Writeln('no')
  1619.       else
  1620.         begin
  1621.         Write(pcAstatus[AX]);
  1622.         Caption3('port');
  1623.         AH:=$7C;
  1624.         Intr($16, regs);
  1625.         Write(AH);
  1626.         Caption3('baud rate');
  1627.         Writeln(pcAspd[AL]);
  1628.         end;
  1629.       end;
  1630.     Pause3(-5);
  1631.     if endit then
  1632.       Exit;
  1633.     Caption2('Disk Spool II');
  1634.     with regs do
  1635.       begin
  1636.       AH:=$A0;
  1637.       Intr($1A, regs);
  1638.       if AH = $B0 then
  1639.         begin
  1640.         Write('yes');
  1641.         Caption3('at segment');
  1642.         Writeln(Hex(ES, 4));
  1643.         Caption3('spooler is');
  1644.         case CH of
  1645.           $00: Writeln('disabled');
  1646.           $41: begin
  1647.                Writeln('enabled');
  1648.                Caption3('spooling file');
  1649.                xbyte:=0;
  1650.                repeat
  1651.                  xchar:=Chr(Mem[ES:BX]);
  1652.                  if xchar <> #0 then
  1653.                    Write(xchar);
  1654.                  Inc(xbyte);
  1655.                  Inc(BX);
  1656.                until (xchar = #0) or (xbyte >= 64);
  1657.                if xbyte = 0 then
  1658.                  Write('(none)');
  1659.                Writeln;
  1660.                end;
  1661.         else
  1662.           Writeln('??')
  1663.         end;
  1664.         Caption3('despooler is');
  1665.         case CL of
  1666.           $00: Writeln('disabled');
  1667.           $41: begin
  1668.                Write('enabled and ');
  1669.                case DL of
  1670.                  $00: Writeln('actively printing');
  1671.                  $41: Writeln('standing by');
  1672.                else
  1673.                  Writeln('?????');
  1674.                end;
  1675.                Caption3('despooler file');
  1676.                xbyte:=0;
  1677.                repeat
  1678.                  xchar:=Chr(Mem[ES:SI]);
  1679.                  if xchar <> #0 then
  1680.                    Write(xchar);
  1681.                  Inc(xbyte);
  1682.                  Inc(SI);
  1683.                until (xchar = #0) or (xbyte >= 64);
  1684.                if xbyte = 0 then
  1685.                  Write('(none)');
  1686.                Writeln;
  1687.                end;
  1688.         else
  1689.           Writeln('????');
  1690.         end;
  1691.         end
  1692.       else
  1693.         Writeln('no');
  1694.       end;
  1695.     Pause3(-1);
  1696.     if endit then
  1697.       Exit;
  1698.     Caption2('Microsoft/LANtastic Network');
  1699.     regs.AH:=0;
  1700.     Intr($2A, regs);
  1701.     yesorno(regs.AH <> 0);
  1702.     Pause3(-1);
  1703.     if endit then
  1704.       Exit;
  1705.     Caption2('PC/TCP Packet driver');
  1706.     with regs do
  1707.       begin
  1708.       xbyte:=$60;
  1709.       foundit:=false;
  1710.       repeat
  1711.         AH:=$35;
  1712.         AL:=xbyte;
  1713.         MsDos(regs);
  1714.         s:='';
  1715.         for xword1:=BX + 3 to BX + $A do
  1716.           s:=s + Chr(Mem[ES:xword1]);
  1717.         if s = 'PKT DRVR' then
  1718.           foundit:=true;
  1719.         Inc(xbyte);
  1720.       until foundit or (xbyte = $81);
  1721.       if foundit then
  1722.         Writeln('yes, at interrupt $', Hex(xbyte - 1, 2))
  1723.       else
  1724.         Writeln('no')
  1725.       end;
  1726.     Pause3(-1);
  1727.     if endit then
  1728.       Exit;
  1729.     Caption2('Inset');
  1730.     with regs do
  1731.       begin
  1732.       AH:=2;
  1733.       DX:=0;
  1734.       CX:=$07C3; {1987}
  1735.       Intr($17, regs);
  1736.       yesorno(CX = $07C2 {1986})
  1737.       end;
  1738.     Pause3(-1);
  1739.     if endit then
  1740.       Exit;
  1741.     Caption2('Microsoft CD-ROM extensions');
  1742.     asm
  1743.     mov ax,$DADA
  1744.     push ax
  1745.     mov ax,$1100
  1746.     int $2F
  1747.     mov xbyte,al
  1748.     pop bx
  1749.     mov xword1,bx
  1750.     end;
  1751.     if (xbyte <> $FF) or (xword1 <> $ADAD) then
  1752.       Writeln('no')
  1753.     else
  1754.       with regs do
  1755.         begin
  1756.         Write('yes');
  1757.         Caption3('version');
  1758.         AX:=$150C;
  1759.         Intr($2F, regs);
  1760.         if BX = 0 then
  1761.           Writeln('1.xx')
  1762.         else
  1763.           Writeln(BH, decimal, addzero(BL));
  1764.         end;
  1765.     Pause3(-2);
  1766.     if endit then
  1767.       Exit;
  1768.     Caption2('Fossil');
  1769.     xbool1:=false;
  1770.     with regs do
  1771.       begin
  1772.       AH:=$BC;
  1773.       DX:=$1954;
  1774.       Intr($11, regs);
  1775.       if AX = $1954 then
  1776.         xbool1:=true;
  1777.       AX:=$1B00;
  1778.       DX:=$FF;
  1779.       CX:=SizeOf(fossilbuf);
  1780.       ES:=Seg(fossilbuf);
  1781.       DI:=Ofs(fossilbuf);
  1782.       Intr($14, regs);
  1783.       if AX <> $1B00 then
  1784.         begin
  1785.         Write('yes');
  1786.         Caption3('type');
  1787.         if xbool1 then
  1788.           Write('BNU')
  1789.         else
  1790.           if (CX = $3058 {0X}) and (DX = $2030 { 0}) then
  1791.             Write('X00')
  1792.           else
  1793.             Write('unknown');
  1794.         with fossilbuf do
  1795.           begin
  1796.           Caption3('specification level');
  1797.           Write(spec);
  1798.           Caption3('revision level');
  1799.           Writeln(rev);
  1800.           Caption3('ID string');
  1801.           while Mem[idstrseg:idstrofs] <> 0 do
  1802.             begin
  1803.             Write(Chr(Mem[idstrseg:idstrofs]));
  1804.             Inc(idstrofs)
  1805.             end;
  1806.           Writeln;
  1807.           end
  1808.         end
  1809.       else
  1810.         Writeln('no');
  1811.       end;
  1812.     Pause3(-1);
  1813.     if endit then
  1814.       Exit;
  1815.     Caption2('Video Fossil');
  1816.     with regs do
  1817.       begin
  1818.       AX:=$8100;
  1819.       ES:=Seg(vfossilbuf);
  1820.       DI:=Ofs(vfossilbuf);
  1821.       Intr($14, regs);
  1822.       if AX <> $1954 then
  1823.         Writeln('no')
  1824.       else
  1825.         with vfossilbuf do
  1826.           begin
  1827.           Write('yes');
  1828.           Caption3('version');
  1829.           Write(ver);
  1830.           Caption3('revision');
  1831.           Write(rev);
  1832.           Caption3('highest function');
  1833.           Write('$', Hex(hifunc, 4));
  1834.           end
  1835.       end;
  1836.     Pause3(-3);
  1837.     if endit then
  1838.       Exit;
  1839.     Caption2('Advanced Power Management Spec.');
  1840.     with regs do
  1841.       begin
  1842.       AX:=$5300;
  1843.       BX:=0;
  1844.       Intr($15, regs);
  1845.       if (not NoCarry(regs)) or (BX <> $504D) then
  1846.         Writeln('no')
  1847.       else
  1848.         begin
  1849.         Write('yes');
  1850.         Caption3('version');
  1851.         Write(unBCD(AH), decimal, AddZero(unBCD(AL)));
  1852.         Caption3('enabled');
  1853.         YesOrNo((CX and 8) = 0);
  1854.         Caption3('supports 16-bit protected mode');
  1855.         YesOrNo2((CX and 1) = 1);
  1856.         Caption3('32-bit protected mode');
  1857.         YesOrNo((CX and 2) = 2);
  1858.         Caption3('AC line status');
  1859.         AX:=$530A;
  1860.         BX:=1;
  1861.         Intr($15, regs);
  1862.         if not NoCarry(regs) then
  1863.           Writeln('ERROR')
  1864.         else
  1865.           begin
  1866.           case BH of
  1867.               0: Write('off-line');
  1868.               1: Write('on-line');
  1869.             $FF: Write('unknown')
  1870.           else
  1871.             Write('???');
  1872.           end;
  1873.           Caption3('battery status');
  1874.           case BL of
  1875.               0: Write('high');
  1876.               1: Write('low');
  1877.               2: Write('critical');
  1878.               3: Write('charging');
  1879.             $FF: Write('unknown')
  1880.           else
  1881.             Write('???');
  1882.           end;
  1883.           Caption3('remaining life');
  1884.           if CL = $FF then
  1885.             Writeln('unknown')
  1886.           else
  1887.             Writeln(CL, '%');
  1888.           end;
  1889.         end;
  1890.       end;
  1891.     Pause3(-1);
  1892.     if endit then
  1893.       Exit;
  1894.     Caption2('Norton Guides');
  1895.     with regs do
  1896.       begin
  1897.       AX:=$F398;
  1898.       Intr($16, regs);
  1899.       YesOrNo(AX = $6A73);
  1900.       end;
  1901.     Pause3(-1);
  1902.     if endit then
  1903.       Exit;
  1904.     Caption2('After Dark for DOS');
  1905.     with regs do
  1906.       begin
  1907.       AX:=$C000;
  1908.       BX:=0;
  1909.       CX:=0;
  1910.       DX:=0;
  1911.       Intr($2F, regs);
  1912.       if (AL = $FF) and (BX=$4144 {AD}) and (CX=$2D44 {-D}) and
  1913.          (DX=$4F53 {OS}) then
  1914.         begin
  1915.         Write('yes');
  1916.         Caption3('at segment');
  1917.         AX:=$C001;
  1918.         ES:=0;
  1919.         Flags:=Flags and (not FCarry);
  1920.         Intr($2F, regs);
  1921.         if NoCarry(regs) then
  1922.           Write(Hex(ES, 4))
  1923.         else
  1924.           Write('ERROR');
  1925.         Caption3('minutes to wait');
  1926.         AX:=$C004;
  1927.         Flags:=Flags or FCarry;
  1928.         Intr($2F, regs);
  1929.         Writeln(BX);
  1930.         Caption3('blanker');
  1931.         AX:=$C006;
  1932.         Flags:=Flags or FCarry;
  1933.         Intr($2F, regs);
  1934.         if BX = 0 then
  1935.           Write('disabled')
  1936.         else
  1937.           Write('enabled');
  1938.         Caption3('password');
  1939.         AX:=$C00F;
  1940.         Flags:=Flags or FCarry;
  1941.         Intr($2F, regs);
  1942.         if BX = 0 then
  1943.           Write('disabled')
  1944.         else
  1945.           Write('enabled');
  1946.         Caption3('hot key');
  1947.         AX:=$C008;
  1948.         Flags:=Flags or FCarry;
  1949.         Intr($2F, regs);
  1950.         if AX = 0 then
  1951.           begin
  1952.           if CL and 3 <> 0 then
  1953.             Write('<SHIFT>');
  1954.           if CL and 4 = 4 then
  1955.             Write('<CTRL>');
  1956.           if CL and 8 = 8 then
  1957.             Write('<ALT>');
  1958.           Writeln('<', KeyScan[BH], '>')
  1959.           end;
  1960.         end
  1961.       else
  1962.         Writeln('no');
  1963.       end
  1964.     end; {MiscUtils}
  1965.  
  1966.   begin {procedure page_18}
  1967.   Shells;
  1968.   if endit then
  1969.     Exit;
  1970.   DosExtenders;
  1971.   if endit then
  1972.     Exit;
  1973.   MemUtils;
  1974.   if endit then
  1975.     Exit;
  1976.   MultiTaskers;
  1977.   if endit then
  1978.     Exit;
  1979.   NortonUtils;
  1980.   if endit then
  1981.     Exit;
  1982.   VirusUtils;
  1983.   if endit then
  1984.     Exit;
  1985.   SCSI;
  1986.   if endit then
  1987.     Exit;
  1988.   DiskCaches;
  1989.   if endit then
  1990.     Exit;
  1991.   DiskCompress;
  1992.   if endit then
  1993.     Exit;
  1994.   MiscUtils;
  1995.   end;
  1996. end.
  1997.