home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / GLEN / INFOP140.ZIP / PAGE_08.INC < prev    next >
Text File  |  1990-11-12  |  4KB  |  154 lines

  1. procedure page_08;
  2.   const
  3.     tick2 = 115200;
  4.  
  5.   var
  6.     i : byte;
  7.     xbyte1 : byte;
  8.     xbyte2 : byte;
  9.     xbyte3: byte;
  10.     xword : word;
  11.     xword2: word;
  12.  
  13.   begin
  14.   window(1, 3, 30, tlength - 2);
  15.   caption2('Printers');
  16.   xbyte1:=equip and $C000 shr 14;
  17.   writeln(xbyte1);
  18.   if xbyte1 > 0 then
  19.     begin
  20.     caption3('Device');
  21.     writeln;
  22.     caption3('Base port');
  23.     writeln;
  24.     caption3('Timeout');
  25.     writeln;
  26.     caption3('Busy');
  27.     writeln;
  28.     caption3('ACK');
  29.     writeln;
  30.     caption3('Paper out');
  31.     writeln;
  32.     caption3('Selected');
  33.     writeln;
  34.     caption3('I/O error');
  35.     writeln;
  36.     caption3('Timed out');
  37.     for i:=1 to xbyte1 do
  38.       begin
  39.       window(9 + 6 * i, 4, 15 + 6 * i, tlength - 2);
  40.       writeln('LPT', i);
  41.       writeln('$', hex(memw[BIOSdseg : 2 * i + 6], 3));
  42.       writeln(mem[BIOSdseg : $0077 + i]);
  43.       with regs do
  44.         begin
  45.         AH:=$02;
  46.         DX:=0;
  47.         Intr($17, regs);
  48.         yesorno(AH and $80 = $00);
  49.         yesorno(AH and $40 = $40);
  50.         yesorno(AH and $20 = $20);
  51.         yesorno(AH and $10 = $10);
  52.         yesorno(AH and $08 = $08);
  53.         yesorno(AH and $01 = $01)
  54.         end
  55.       end
  56.     end;
  57.   window(twidth - 42, 3, twidth, tlength - 2);
  58.   caption2('Serial ports');
  59.   xbyte1:=equip and $0E00 shr 9;
  60.   writeln(xbyte1);
  61.   if xbyte1 > 0 then
  62.     begin
  63.     if xbyte1 > 4 then
  64.       xbyte1:=4;
  65.     caption3('Device');
  66.     writeln;
  67.     caption3('Base port');
  68.     writeln;
  69.     caption3('UART');
  70.     Writeln;
  71.     caption3('Timeout');
  72.     writeln;
  73.     caption3('Baud rate');
  74.     writeln;
  75.     caption3('Data bits');
  76.     writeln;
  77.     caption3('Parity');
  78.     writeln;
  79.     caption3('Stop bits');
  80.     writeln;
  81.     caption3('Break');
  82.     writeln;
  83.     caption3('RLSD');
  84.     writeln;
  85.     caption3('RI');
  86.     writeln;
  87.     caption3('DSR');
  88.     writeln;
  89.     caption3('CTS');
  90.     writeln;
  91.     caption3('dRLSD');
  92.     writeln;
  93.     caption3('-dRI');
  94.     writeln;
  95.     caption3('dDSR');
  96.     writeln;
  97.     caption3('dCTS');
  98.     for i:=1 to xbyte1 do
  99.       begin
  100.       window(twidth - 35 + 7 * i, 4, twidth - 28 + 7 * i, tlength - 2);
  101.       writeln('COM', i);
  102.       xword:=memw[BIOSdseg : 2 * i - 2];
  103.       writeln('$', hex(xword, 3));
  104.       xbyte2:=Port[xword + 2];
  105.       Port[xword + 2]:=$C1;
  106.       xbyte3:=Port[xword + 2];
  107.       Port[xword + 2]:=xbyte2;
  108.       case ((xbyte2 and $C0) shr 6) of
  109.         0: Writeln('8250');
  110.         1: Writeln('???');
  111.         2: Writeln('16550');
  112.         3: Writeln('16550AN')
  113.       end;
  114.       writeln(mem[BIOSdseg : $007B + i]);
  115.       xbyte2:=port[xword + 3];
  116.       port[xword + 3]:=xbyte2 or $80;
  117.       xword2:=cbw(Port[xword], Port[xword + 1]);
  118.       if xword2 = 0 then
  119.         Writeln('N/A')
  120.       else
  121.         Writeln(tick2 / xword2:0:0);
  122.       port[xword + 3]:=xbyte2;
  123.       Writeln((xbyte2 and $03) + 5);
  124.       case xbyte2 and $38 of
  125.         $00, $10, $20, $30 : writeln('none');
  126.         $08 : writeln('odd');
  127.         $18 : writeln('even');
  128.         $28 : writeln('mark');
  129.         $38 : writeln('space')
  130.       end;
  131.       case xbyte2 and $07 of
  132.         $00..$03 : writeln('1');
  133.         $04 : writeln('1.5');
  134.         $05..$07 : writeln('2')
  135.       end;
  136.       yesorno(xbyte2 and $40 = $40);
  137.       with regs do
  138.         begin
  139.         AH:=$03;
  140.         DX:=i - 1;
  141.         Intr($14, regs);
  142.         yesorno(AL and $80 = $80);
  143.         yesorno(AL and $40 = $40);
  144.         yesorno(AL and $20 = $20);
  145.         yesorno(AL and $10 = $10);
  146.         yesorno(AL and $08 = $08);
  147.         yesorno(AL and $04 = $04);
  148.         yesorno(AL and $02 = $02);
  149.         yesorno(AL and $01 = $01)
  150.         end;
  151.       end
  152.     end
  153.   end;
  154.