home *** CD-ROM | disk | FTP | other *** search
/ Stars of Shareware: Programmierung / SOURCE.mdf / programm / msdos / pascal / ifp1s158 / page_09.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1993-09-17  |  17.8 KB  |  699 lines

  1. unit page_09;
  2.  
  3. interface
  4.  
  5. uses crt, dos, ifpglobl, ifpcomon;
  6.  
  7. procedure page09;
  8.  
  9. implementation
  10.  
  11. procedure page09;
  12.   const
  13.     weekday: array[0..6] of string[9] = ('Sunday', 'Monday', 'Tuesday',
  14.         'Wednesday', 'Thursday', 'Friday', 'Saturday');
  15.  
  16.   var
  17.     foundit, xbool, wasone: boolean;
  18.     xbyte: byte;
  19.     xchar: char;
  20.     xstring1: string;
  21.     xstring2: string;
  22.     xword1: word;
  23.     xword2: word;
  24.     xword3: word;
  25.     xword4: word;
  26.     xword5: word;
  27.     xword6: word;
  28.     xword7: word;
  29.     xword8: word;
  30.     filecount, usedfiles, tablesize: word;
  31.     dt: DateTime;
  32.     s: string;
  33.  
  34.   procedure showecho(a: word);
  35.     var
  36.       xbyte : byte;
  37.  
  38.     begin
  39.     xbyte:=Mem[DOScseg : a];
  40.     case xbyte of
  41.       $00 : Writeln('off');
  42.       $FF : Writeln('on')
  43.     else
  44.       unknown('status', xbyte, 2)
  45.     end
  46.     end; {showecho}
  47.  
  48.   procedure showbufs(a : word);
  49.     const
  50.       bufsmax = 99;
  51.  
  52.     var
  53.       i : 0..bufsmax + 1;
  54.       xbool : boolean;
  55.       xword1 : word;
  56.       xword2 : word;
  57.       xword3 : word;
  58.  
  59.     begin
  60.     if (OSMajor < 4) or (OSMajor >= 10) then
  61.       begin
  62.       i:=0;
  63.       xword1:=MemW[DOScseg : a];
  64.       xword2:=MemW[DOScseg : a + 2];
  65.       xbool:=false;
  66.       repeat
  67.         if i <= bufsmax then
  68.           begin
  69.           if xword1 < $FFFF then
  70.             begin
  71.             inc(i);
  72.             xword3:=xword1;
  73.             xword1:=MemW[xword2 : xword3];
  74.             xword2:=MemW[xword2 : xword3 + 2]
  75.             end
  76.           else
  77.             begin
  78.             xbool:=true;
  79.             Writeln(i)
  80.             end
  81.           end
  82.         else
  83.           begin
  84.           xbool:=true;
  85.           dontknow
  86.           end
  87.       until xbool
  88.       end
  89.     else
  90.       with regs do
  91.         begin
  92.         AX:=$5200;
  93.         MsDos(regs);
  94.         Write(MemW[ES:BX + $3F]:5);
  95.         Caption3('Read-ahead');
  96.         Writeln(MemW[ES:BX + $41]);
  97.         if OSMajor = 4 then
  98.           begin
  99.           Caption3('in EMS');
  100.           xword2:=MemW[ES:BX + $12];
  101.           xword1:=MemW[ES:BX + $14];
  102.           case Mem[xword1: xword2 + $C] of
  103.             $00: Writeln('no');
  104.             $FF: begin
  105.                  Write('yes');
  106.                  Caption3('handle');
  107.                  Writeln(MemW[xword1: xword2 + $D])
  108.                  end;
  109.             $01: if Mem[xword1: xword2 + $18] = 0 then
  110.                    Writeln('no')
  111.                  else
  112.                    begin
  113.                    Write('yes');
  114.                    Caption3('handle');
  115.                    Writeln(MemW[xword1: xword2 + $18])
  116.                    end;
  117.           else
  118.             dontknow
  119.           end; {case}
  120.           end
  121.         end
  122.     end; {showbufs}
  123.     (*  BIX ms.dos/secrets #2  *)
  124.  
  125.   procedure ShowAttrib(s: string; value, mask: byte);
  126.     begin
  127.     if value and mask = mask then
  128.       begin
  129.       if wasone then
  130.         Write('/');
  131.       Write(s);
  132.       wasone:=true
  133.       end;
  134.     end; {ShowAttrib}
  135.  
  136.   begin (* procedure page_09 *)
  137.   Window(1, 3, twidth div 2, tlength - 2);
  138.   Caption2('DOS version');
  139.   with regs do
  140.     begin
  141.     AX:=$4452;
  142.     Flags:=Flags and FCarry;
  143.     MsDos(regs);
  144.     if NoCarry(regs) then
  145.       begin
  146.       Write('DR-DOS ');
  147.       case AX of
  148.         $1063: Writeln('3', decimal, '41');
  149.         $1065: Writeln('5', decimal, '00');
  150.         $1067: Writeln('6', decimal, '00')
  151.       else
  152.         Writeln('? code ', Hex(AX, 4));
  153.       end;
  154.       end
  155.     else
  156.       begin
  157.       if OSMajor >= 10 then
  158.         begin
  159.         Write('OS/2 ', OSMajor div 10, decimal, AddZero(OSMinor));
  160.         Writeln(' DOS session');
  161.         end
  162.       else
  163.         Write(OSMajor, decimal, addzero(OSMinor));
  164.       if (OSMajor < 5) or (OSMajor = 10) then
  165.         Writeln
  166.       else
  167.         begin
  168.         Caption3('revision');
  169.         AX:=$3306;
  170.         MsDos(regs);
  171.         Writeln(Chr((DL and 7) + Ord('A')));
  172.         Caption3('in HMA');
  173.         YesOrNo2(DH and $10 = $10);
  174.         Caption3('in ROM');
  175.         YesOrNo(DH and 8 = 8);
  176.         end;
  177.       end
  178.     end;
  179.   with regs do
  180.     begin
  181.     AX:=$3000;
  182.     MsDos(regs);
  183.     if (AL <> OSMajor) or (AH <> OSMinor) then
  184.       begin
  185.       Caption3('SETVER''d to');
  186.       Write(AL, decimal);
  187.       ZeroPad(AH);
  188.       Writeln
  189.       end
  190.     end;
  191.   Caption2('OEM serial number');
  192.   with regs do
  193.     begin
  194.     AX:=$3000;
  195.     BX:=0;
  196.     MsDos(regs);
  197.     Writeln(Hex(BH, 2))
  198.     end;
  199.   Caption2('System date');
  200.   getdate(xword1, xword2, xword3, xword4);
  201.   if xword4 < 7 then
  202.     Write(weekday[xword4])
  203.   else
  204.     Write('(', Hex(xword4, 4), ')');
  205.   Write(', ');
  206.   xword5:=CBW(Country[0], Country[1]);
  207.   xchar:=Chr(Country[11]);
  208.   case xword5 of
  209.     $0001: Writeln(xword3, xchar, xword2, xchar, xword1);
  210.     $0002: Writeln(xword1, xchar, xword2, xchar, xword3)
  211.   else
  212.     Writeln(xword2, xchar, xword3, xchar, xword1)
  213.   end;
  214.   Caption2('System time');
  215.   gettime(xword1, xword2, xword3, xword4);
  216.   if Country[17] and 1 = 0 then
  217.     case xword1 of
  218.       0: Write('12');
  219.       1..12: ZeroPad(xword1);
  220.       13..23: Write(xword1 - 12)
  221.     end
  222.   else
  223.     ZeroPad(xword1);
  224.   Write(Chr(Country[13]));
  225.   ZeroPad(xword2);
  226.   Write(Chr(Country[13]));
  227.   ZeroPad(xword3);
  228.   Write(decimal);
  229.   ZeroPad(xword4);
  230.   if Country[17] and 1 = 0 then
  231.     if xword1 > 11 then
  232.       Write(' pm')
  233.     else
  234.       Write(' am');
  235.   Writeln;
  236.   Caption2('Command load paragraph');
  237.   Writeln(Hex(PrefixSeg, 4));
  238.   getcbreak(xbool);
  239.   offoron('Ctrl-C check', xbool);
  240.   Writeln;
  241.   getverify(xbool);
  242.   offoron('Disk verify', xbool);
  243.   Writeln;
  244.   Caption2('Switch prefix character');
  245.   Writeln(switchar);
  246.   Caption2('\DEV\ prefix for devices');
  247.   with regs do begin
  248.     AX:=$3702;
  249.     MSDOS(regs);
  250.     if DL = $00 then
  251.       Writeln('required')
  252.     else
  253.       Writeln('optional')
  254.   end;
  255.   Caption2('Reset boot');
  256.   xword1:=MemW[BIOSdseg : $72];
  257.   case xword1 of
  258.     $0000: Writeln('cold');
  259.     $1234, $1200, $EDCB: Writeln('bypass memory test');
  260.     $4321: Writeln('preserve memory');
  261.     $5678: Writeln('system suspended');
  262.     $9ABC{-25924}: Writeln('manufacturing test mode'); (*!$9ABC*)
  263.     $ABCD{-21555}: Writeln('system POST loop mode') (*!$ABCD*)
  264.   else
  265.     unknown('flag', xword1, 4)
  266.   end;
  267.   Caption2('Boot disk was');
  268.   if OSMajor >= 4 then
  269.     with regs do
  270.       begin
  271.       AX:=$3305;
  272.       MsDos(regs);
  273.       Writeln(Chr(DL+$40), ':')
  274.       end
  275.   else
  276.     dontknow;
  277. (*  Byte 12:12 p.178  *)
  278.   with regs do begin
  279.     Caption2('DOS critical flag');
  280.     AX:=$5D06;
  281.     MSDOS(regs);
  282.     segofs(DS, SI);
  283.     Writeln
  284.   end;
  285.   Caption2('DOS busy flag    ');
  286.   segofs(DOScseg, DOScofs);
  287.   Writeln;
  288.   Caption2('Printer echo');
  289.   case OSMajor of
  290.     3 : case OSMinor div 10 of
  291.       0 : dontknow;
  292.       1..3 : showecho($02AC)
  293.       else
  294.         dontknow
  295.     end;
  296.       4,5,6 : showecho($02FE);
  297.   else
  298.       dontknow
  299.   end;
  300. (*  BIX ms.dos/secrets #501  *)
  301.   Caption2('PrtSc status');
  302.   xbyte:=Mem[BIOSdseg : $0100];
  303.   case xbyte of
  304.     $00 : Writeln('ready');
  305.     $01 : Writeln('busy');
  306.     $FF : Writeln('error on last PrtSc')
  307.     else
  308.       unknown('status', xbyte, 2)
  309.   end;
  310.   Caption2('Memory allocation');
  311.   with regs do begin
  312.     AX:=$5800;
  313.     MSDOS(regs);
  314.     case AL of
  315.       0: Writeln('first fit');
  316.       1: Writeln('best fit');
  317.       2..$3F,$43..$7F,$83..$FF: Writeln('last fit');
  318.       $40: Writeln('hi mem first fit');
  319.       $41: Writeln('hi mem best fit');
  320.       $42: Writeln('hi mem last fit');
  321.       $80: Writeln('frst fit,hi then low');
  322.       $81: Writeln('best fit,hi then low');
  323.       $82: Writeln('last fit,hi then low');
  324.     else
  325.       dontknow
  326.     end
  327.   end;
  328.   Caption2('DOS buffers');
  329.   case OSMajor of
  330.     3 : case OSMinor div 10 of
  331.           0 : showbufs($013F);
  332.           1..3 : showbufs($0038)
  333.         else
  334.           dontknow
  335.         end;
  336.     4,5,6 : showbufs(0)
  337.   else
  338.     dontknow
  339.   end;
  340.   Caption2('File handle table ');
  341.   xword1:=MemW[PrefixSeg : $0036];
  342.   xword2:=MemW[PrefixSeg : $0034];
  343.   SegOfs(xword1, xword2);
  344.   Writeln;
  345.   Caption3('length');
  346.   xword2:=MemW[DevSeg:DevOfs + 4];
  347.   xword1:=MemW[DevSeg:DevOfs + 6];
  348.   xbool:=false;
  349.   filecount:=0;
  350.   if (xword1 = $FFFF) and (xword2 = $FFFF) then
  351.     filecount:=MemW[PrefixSeg: $32]
  352.   else
  353.     repeat
  354.       xword4:=MemW[xword1:xword2];
  355.       xword3:=MemW[xword1:xword2 + 2];
  356.       filecount:=filecount + MemW[xword1:xword2 + 4];
  357.       if xword4 = $FFFF then
  358.         xbool:=true
  359.       else
  360.         begin
  361.         xword1:=xword3;
  362.         xword2:=xword4
  363.         end
  364.     until xbool;
  365.   Write(filecount:3);
  366.   Caption3('used');
  367.   usedfiles:=0;
  368.   xword1:=MemW[PrefixSeg: $36];
  369.   xword2:=MemW[PrefixSeg: $34];
  370.   while Mem[xword1 : xword2] < $FF do begin
  371.     inc(usedfiles);
  372.     inc(xword2)
  373.   end;
  374.   Write(usedfiles:3);
  375.   Window(1 + twidth div 2, 3, twidth, tlength - 2);
  376.   Caption2('File Control Blocks');
  377.   if OSMajor >= 10 then
  378.     dontknow
  379.   else
  380.     begin
  381.     Writeln;
  382.     Caption3('amount');
  383.     if (OSMajor >= 4) or ((OSMajor = 3) and (OSMinor > 0)) then
  384.       begin
  385.       xword3:=MemW[DevSeg:DevOfs + $1E];
  386.       xword2:=MemW[DevSeg:DevOfs + $1A];
  387.       xword1:=MemW[DevSeg:DevOfs + $1C]
  388.       end
  389.     else
  390.       begin
  391.       xword3:=MemW[DevSeg:DevOfs + $26];
  392.       xword2:=MemW[DevSeg:DevOfs + $22];
  393.       xword1:=MemW[DevSeg:DevOfs + $24]
  394.       end;
  395.     Write(MemW[xword1:xword2 + 4]:3);
  396.     if (OSMajor >= 5) and (OSMajor < 10) then
  397.       Writeln
  398.     else
  399.       begin
  400.       Caption3('protected');
  401.       Writeln(xword3:3);
  402.       end;
  403.     end;
  404.   Caption2('Stacks');
  405.   if (OSMajor = 3) or (OSMajor >= 10) then
  406.     dontknow
  407.   else
  408.     begin
  409.     xword1:=MemW[DevSeg:DevOfs - 2];
  410.     xword4:=0; {# of stacks}
  411.     xword5:=0; {size of stacks}
  412.     if (Mem[xword1:0] <> $4D) or (MemW[xword1:1] <> 8) then
  413.       dontknow
  414.     else
  415.       begin
  416.       xword3:=xword1 + MemW[xword1:3] + 1;
  417.       xword2:=xword1 + 1;
  418.       xbool:=false;
  419.       repeat
  420.         xchar:=Chr(Mem[xword2:0]);
  421.         if xchar = 'S' then
  422.           begin
  423.           xword4:=MemW[xword2 + 1:2];
  424.           xword5:=MemW[xword2 + 1:6];
  425.           xbool:=true;
  426.           end;
  427.         if (xchar = 'M') or (xchar = 'Z') then
  428.           xbool:=true;
  429.         xword2:=xword2 + MemW[xword2:3] + 1;
  430.         if xword2 >= xword3 then
  431.          xbool:=true;
  432.       until xbool;
  433.       Writeln;
  434.       Caption3('amount');
  435.       Write(xword4:3);
  436.       Caption3('size each (bytes)');
  437.       Writeln(xword5:3);
  438.       end
  439.     end;
  440.   if (OSMajor = 5) or (OSMajor >= 20) then
  441.     with regs do
  442.       begin
  443.       Caption2('UMBs');
  444.       AH:=$58;
  445.       AL:=2;
  446.       MsDos(regs);
  447.       if AL = 0 then
  448.         Write('NOT ');
  449.       Writeln('in DOS memory chain');
  450.       end;
  451.   Writeln;
  452.   TextColor(LightCyan);
  453.   Write('------ International Information -----');
  454.   Writeln;
  455.   Caption2('Global code page');
  456.   with regs do
  457.     begin
  458.     AX:=$6601;
  459.     MsDos(Regs);
  460.     if AL = $01 then
  461.       begin
  462.       Writeln;
  463.       Caption3('Active');
  464.       Write(BX);
  465.       Caption3('Default');
  466.       Writeln(DX)
  467.       end
  468.     else
  469.       Writeln('N/A')
  470.     end;
  471.   Caption2('Country code');
  472.   Writeln(ccode);
  473.   case ccode of
  474.       1: s:='United States';
  475.       2: s:='French Canada';
  476.       3: s:='Latin America';
  477.      31: s:='Netherlands';
  478.      32: s:='Belgium';
  479.      33: s:='France';
  480.      34: s:='Spain';
  481.      36: s:='Hungary';
  482.      38: s:='Yugoslavia';
  483.      39: s:='Italy';
  484.      41: s:='Switzerland';
  485.      42: s:='Czechoslovakia';
  486.      44: s:='United Kingdom';
  487.      45: s:='Denmark';
  488.      46: s:='Sweden';
  489.      47: s:='Norway';
  490.      48: s:='Poland';
  491.      49: s:='Germany';
  492.      55: s:='Brazil';
  493.      61: s:='International English';
  494.      81: s:='Japan';
  495.      82: s:='Korea';
  496.      86: s:='China';
  497.      90: s:='Turkey';
  498.     351: s:='Portugal';
  499.     354: s:='Iceland';
  500.     358: s:='Finland';
  501.     785: s:='Saudi Arabia';
  502.     972: s:='Israel';
  503.   else
  504.     s:='Unknown';
  505.   end;
  506.   Caption3('Country');
  507.   Writeln(s);
  508.   Caption2('Thousands separator character');
  509.   Writeln(Chr(Country[7]));
  510.   Caption2('Decimal separator character');
  511.   Writeln(decimal);
  512.   Caption2('Data-list separator character');
  513.   Writeln(Chr(Country[22]));
  514.   Caption2('Date format');
  515.   xword1:=CBW(Country[0], Country[1]);
  516.   xchar:=Chr(Country[11]);
  517.   case xword1 of
  518.     0: Writeln('USA (mm', xchar, 'dd', xchar, 'yy)');
  519.     1: Writeln('Europe (dd', xchar, 'mm', xchar, 'yy)');
  520.     2: Writeln('Japan (yy', xchar, 'mm', xchar, 'dd)')
  521.   else
  522.     unknown('format', xword1, 4)
  523.   end;
  524.   Caption3('Separator character');
  525.   Writeln(xchar);
  526.   Caption2('Time format');
  527.   if (Country[17] and $01) = $00 then
  528.     Write('12')
  529.   else
  530.     Write('24');
  531.   Writeln('-hour');
  532.   Caption3('Separator character');
  533.   Writeln(Chr(Country[13]));
  534.   Caption2('Currency format');
  535.   xstring1:='xxxx';
  536.   insert(Chr(Country[7]), xstring1, 2);
  537.   xstring1:=xstring1 + decimal;
  538.   for i:=1 to Country[16] do
  539.     xstring1:=xstring1 + 'y';
  540.   xstring2:='';
  541.   i:=2;
  542.   xchar:=Chr(Country[i]);
  543.   while (i <= 6) and (xchar > #0) do
  544.     begin
  545.     xstring2:=xstring2 + xchar;
  546.     Inc(i);
  547.     xchar:=Chr(Country[i])
  548.     end;
  549.   case Country[15] and $03 of
  550.     $00 : xstring1:=xstring2 + xstring1;
  551.     $01 : xstring1:=xstring1 + xstring2;
  552.     $02 : xstring1:=xstring2 + ' ' + xstring1;
  553.     $03 : xstring1:=xstring1 + ' ' + xstring2;
  554.     $04 : begin
  555.           Delete(xstring1, 6, 1);
  556.           Insert(xstring2, xstring1, 6)
  557.           end
  558.   end {case};
  559.   Writeln(xstring1);
  560.   Caption2('Case map call address');
  561.   segofs(CBW(Country[20], Country[21]), CBW(Country[18], Country[19]));
  562.   Writeln;
  563.   pause1;
  564.   if endit then
  565.     Exit;
  566.   Window(1, 3, twidth, tlength - 2);
  567.   ClrScr;
  568.   Caption2('Open file handles');
  569.   Writeln;
  570.   if OSMajor >= 10 then
  571.     Writeln('  Unable to determine under OS/2!')
  572.   else
  573.     begin
  574.     xword2:=MemW[DevSeg:DevOfs + 4];
  575.     xword1:=MemW[DevSeg:DevOfs + 6];
  576.     xbool:=false;
  577.     if OSMajor = 3 then
  578.       tablesize:=$35
  579.     else
  580.       tablesize:=$3B;
  581.     repeat
  582.       pause3(-2);
  583.       if endit then
  584.         Exit;
  585.       xword4:=MemW[xword1:xword2];
  586.       xword3:=MemW[xword1:xword2 + 2];
  587.       if xword4 = $FFFF then
  588.         xbool:=true;
  589.       filecount:=MemW[xword1:xword2 + 4];
  590.       usedfiles:=0;
  591.       Caption3('Table at');
  592.       segofs(xword1, xword2);
  593.       Caption3('table size (handles)');
  594.       Writeln(filecount);
  595.       foundit:=false;
  596.       xword2:=xword2 + 6;
  597.       repeat
  598.         if MemW[xword1:xword2] <> 0 then
  599.           begin
  600.           pause3(-3);
  601.           if endit then
  602.             Exit;
  603.           foundit:=true;
  604.           xstring1:='';
  605.           for xword8:=xword2 + $20 to xword2 + $2A do
  606.             xstring1:=xstring1 + Chr(Mem[xword1:xword8]);
  607.           if Copy(xstring1, 9, 3) <> '   ' then
  608.             Insert('.', xstring1, 9)
  609.           else
  610.             Insert(' ', xstring1, 9);
  611.           Write('  ', xstring1);
  612.           Caption3('open mode');
  613.           case MemW[xword1:xword2 + 2] and 7 of
  614.             0: Write('read');
  615.             1: Write('write');
  616.             2: Write('read/write');
  617.             3..7: Write('????');
  618.           end;
  619.           Caption3('sharing mode');
  620.           case (MemW[xword1:xword2 + 2] and $70) shr 4 of
  621.             0: Write('compatible');
  622.             1: Write('deny all');
  623.             2: Write('deny write');
  624.             3: Write('deny read');
  625.             4: Write('deny none');
  626.             5..7: Write('????');
  627.           end;
  628.           Caption3('inherit');
  629.           YesOrNo((MemW[xword1:xword2 + 2] and $80) = $80);
  630.           Caption3('              attributes');
  631.           xbyte:=Mem[xword1:xword2 + 4];
  632.           wasone:=false;
  633.           ShowAttrib('read-only', xbyte, 1);
  634.           ShowAttrib('hidden', xbyte, 2);
  635.           ShowAttrib('system', xbyte, 4);
  636.           ShowAttrib('volume label', xbyte, 8);
  637.           ShowAttrib('directory', xbyte, $10);
  638.           ShowAttrib('archive', xbyte, $20);
  639.           if not wasone then
  640.             Write('(none)');
  641.           Writeln;
  642.           Caption3('              remote');
  643.           YesOrNo2((MemW[xword1:xword2 + 5] and $8000) = $8000);
  644.           Caption3('date');
  645.           UnPackTime(MemL[xword1:xword2 + $D], dt);
  646.           xword5:=CBW(Country[0], Country[1]);
  647.           xchar:=Chr(Country[11]);
  648.           case xword5 of
  649.             $0001: Write(dt.day, xchar, dt.month, xchar, dt.year);
  650.             $0002: Write(dt.year, xchar, dt.month, xchar, dt.day)
  651.           else
  652.             Write(dt.month, xchar, dt.day, xchar, dt.year)
  653.           end;
  654.           Caption3('time');
  655.           if Country[17] and 1 = 0 then
  656.             case dt.hour of
  657.               0: Write('12');
  658.               1..12: ZeroPad(dt.hour);
  659.               13..23: Write(dt.hour - 12)
  660.             end
  661.           else
  662.             ZeroPad(dt.hour);
  663.           Write(Chr(Country[13]), AddZero(dt.min), Chr(Country[13]),
  664.                  AddZero(dt.sec));
  665.           if Country[17] and 1 = 0 then
  666.             if dt.hour > 11 then
  667.               Write(' pm')
  668.             else
  669.               Write(' am');
  670.           Writeln;
  671.           Caption3('              size (bytes)');
  672.           Write(MemL[xword1:xword2 + $11], ' (', (MemL[xword1:xword2 + $11] / 1024.0):0:1, 'K)');
  673.           if (xstring1 <> 'AUX         ') and (xstring1 <> 'CON         ') and
  674.             (xstring1 <> 'PRN         ') then
  675.               begin
  676.               Caption3('owner PSP (Hex)');
  677.               Write(Hex(MemW[xword1:xword2 + $31], 4));
  678.               end
  679.           else
  680.             Write(' DOS device');
  681.           Inc(usedfiles);
  682.           xword2:=xword2 + tablesize;
  683.           Writeln;
  684.           end
  685.         else
  686.           Inc(usedfiles);
  687.       until usedfiles = filecount;
  688.       if not foundit then
  689.         Writeln('  (none used)');
  690.       if not xbool then
  691.         begin
  692.         xword1:=xword3;
  693.         xword2:=xword4
  694.         end;
  695.     until xbool;
  696.     end;
  697.   end;
  698. end.
  699.