home *** CD-ROM | disk | FTP | other *** search
/ C!T ROM 2 / ctrom_ii_b.zip / ctrom_ii_b / PROGRAM / PASCAL / IFP1S156 / PAGE_19.PAS < prev    next >
Pascal/Delphi Source File  |  1992-12-30  |  3KB  |  113 lines

  1. unit page_19;
  2.  
  3. interface
  4.  
  5. uses Crt, Dos, IFPGlobl, IFPComon;
  6.  
  7. procedure page19;
  8.  
  9. implementation
  10.  
  11. procedure page19;
  12.  
  13. var
  14.   Regs: Registers;
  15.   MultiNumber: byte;
  16.   FoundOne, FoundInt: boolean;
  17.   Address, LastAddress: word;
  18.   IntNumber: word;
  19.  
  20. begin
  21. FoundOne:=false;
  22. for MultiNumber:=0 to $FF do
  23.   with regs do
  24.     begin
  25.     AH:=MultiNumber;
  26.     AL:=0;
  27.     Intr($2D, regs);
  28.     if AL = $FF then
  29.       begin
  30.       FoundOne:=true;
  31.       Pause3(-4);
  32.       Caption2('Function');
  33.       Write(Hex(MultiNumber, 2), 'h');
  34.       Caption3('Product');
  35.       for Address:=DI + 8 to DI + $0F do
  36.         Write(Chr(Mem[DX:Address]));
  37.       Caption3('Manufacturer');
  38.       for Address:=DI to DI + 7 do
  39.         Write(Chr(Mem[DX:Address]));
  40.       Caption3('Version');
  41.       Writeln(Hi(CX), decimal, addzero(Lo(CX)));
  42.       Caption3('Entry point');
  43.       AH:=MultiNumber;
  44.       AL:=1;
  45.       Intr($2D, regs);
  46.       if AL = 0 then
  47.         Write('Use INT 2Dh')
  48.       else
  49.         SegOfs(DX, BX);
  50.       Writeln;
  51.       Caption3('Hooked interrupts (hex)');
  52.       IntNumber:=0;
  53.       FoundInt:=false;
  54.       AH:=MultiNumber;
  55.       AL:=4;
  56.       Intr($2D, regs);
  57.       if AL = 0 then
  58.         Writeln('(function call not implemented)')
  59.       else
  60.         if AL = 4 then
  61.           begin
  62.           Address:=BX;
  63.           while Mem[DX:Address] <> $2D do
  64.             begin
  65.             FoundInt:=true;
  66.             Write(Hex(Mem[DX:Address], 2), ' ');
  67.             Inc(Address, 3);
  68.             end;
  69.           if not FoundInt then
  70.             Write('(none)');
  71.           Writeln;
  72.           end
  73.         else
  74.           begin
  75.           while IntNumber < 256 do
  76.             begin
  77.             AH:=MultiNumber;
  78.             AL:=4;
  79.             Intr($2D, regs);
  80.             if (AL = 2) or (AL = 3) then
  81.               begin
  82.               FoundInt:=true;
  83.               Write(Hex(IntNumber, 2), ' ');
  84.               end;
  85.             Inc(IntNumber);
  86.             end;
  87.           if not FoundInt then
  88.             Write('(none)');
  89.           Writeln;
  90.           end;
  91.       Caption3('Description');
  92.       AH:=MultiNumber;
  93.       AL:=0;
  94.       Intr($2D, regs);
  95.       if Mem[DX:DI + $10] = 0 then
  96.         Writeln('(none)')
  97.       else
  98.         begin
  99.         Address:=DI + $10;
  100.         LastAddress:=Address + 64;
  101.         While (Mem[DX:Address] <> 0) and (Address <= LastAddress) do
  102.           begin
  103.           Write(Chr(Mem[DX:Address]));
  104.           Inc(Address);
  105.           end;
  106.         Writeln;
  107.         end;
  108.       end
  109.     end;
  110. if not FoundOne then
  111.   Caption1('No Alternate Multiplex Programs found!');
  112. end;
  113. end.