home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-386-Vol-2of3.iso / b / bootp.zip / RDVCT.ASM < prev    next >
Assembly Source File  |  1988-02-10  |  768b  |  53 lines

  1. PAGE    66,132
  2. ;
  3. ;
  4. ;
  5. ;
  6. ;
  7. ;
  8. ;
  9. ;
  10. ;  rdvct.asm
  11. ;
  12. ;  usage:
  13. ;        extern unsigned long rdvct()
  14. ;        ????.unival = rdvct( vectnum );
  15. ;
  16. ;  Function to allow a C program to determine the contents of an
  17. ;  interrupt vector
  18. ;
  19. ;  (c) 1984 University of Waterloo,
  20. ;           Faculty of Engineering,
  21. ;           Engineering Microcomputer Network Development Office
  22. ;
  23. ;  version
  24. ;
  25. ;
  26.     include    masmdefs.hsm
  27.     include model.hsm
  28.  
  29. codedef RDVCT
  30. datadef
  31.  
  32. cstart  RDVCT
  33. cpublic rdvct
  34.  
  35.     push    si
  36.     push    es
  37.  
  38.     mov    SI,+@AB+0[BP]        ;get vector number
  39.     shl    SI,1
  40.     shl    SI,1            ;* 4
  41.     xor    AX,AX
  42.     mov    ES,AX
  43.     mov    DX,ES:+2[SI]        ;segment
  44.     mov    AX,ES:[SI]        ;offset
  45.  
  46.     pop    es
  47.     pop    si
  48.  
  49. creturn rdvct
  50. cend    RDVCT
  51.  
  52.     end
  53.