home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / WINER.ZIP / EMSINT.ASM < prev    next >
Assembly Source File  |  1992-05-13  |  707b  |  37 lines

  1. ;EMSINT.ASM - dedicated EMS interrupt calling routine
  2.  
  3. ;Copyright (c) 1991 Ethan Winer
  4.  
  5.  
  6. .Model Medium, Basic
  7.  
  8. EMSRegs Struc
  9.   RegAX DW ?
  10.   RegBX DW ?
  11.   RegCX DW ?
  12.   RegDX DW ?
  13. EMSRegs Ends
  14.  
  15. .Code
  16.  
  17. EMSInt Proc Uses SI, ERegs:Word
  18.  
  19.   Mov  SI,ERegs          ;get the address of EMSRegs
  20.   Mov  AX,[SI+RegAX]     ;load each register in turn
  21.   Mov  BX,[SI+RegBX]
  22.   Mov  CX,[SI+RegCX]
  23.   Mov  DX,[SI+RegDX]
  24.  
  25.   Int  67h               ;call the EMS driver
  26.  
  27.   Mov  SI,ERegs          ;access EMSRegs again
  28.   Mov  [SI+RegAX],AX     ;save each register in turn
  29.   Mov  [SI+RegBX],BX
  30.   Mov  [SI+RegCX],CX
  31.   Mov  [SI+RegDX],DX
  32.  
  33.   Ret                    ;return to BASIC
  34.  
  35. EMSInt Endp
  36. End
  37.