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