home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l350 / 3.ddi / EXAMPLES / C / REALVECS.C < prev   
Encoding:
C/C++ Source or Header  |  1993-01-04  |  536 b   |  25 lines

  1. //
  2. // REALVECS.C -- Print out real mode interrupt vector table
  3. //
  4. #include <stdio.h>
  5. #include <pharlap.h>
  6. int main()
  7. {
  8.     REALPTR pRealVecs;
  9.     REALPTR RealVec;
  10.     int i;
  11.  
  12. //
  13. // Print out the first 40 real mode interrupt vectors from the 
  14. // real mode interrupt table located at real mode address 0:0
  15. //
  16.     RP_SET(pRealVecs, 0, 0);
  17.     for (i = 0; i < 40; ++ i, RP_INCR(pRealVecs, 4))
  18.     {
  19.         RealVec = PeekRealDWord(pRealVecs);
  20.         printf("INT %02Xh:  %04X:%04X\n", i, RP_SEG(RealVec),
  21.                             RP_OFF(RealVec));
  22.     }
  23.     return 0;
  24. }
  25.