home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / snip9707.zip / INT2E.ASM < prev    next >
Assembly Source File  |  1997-07-05  |  2KB  |  58 lines

  1. ;  +++Date last modified: 05-Jul-1997
  2.  
  3.         PAGE    55,132
  4.         .LIST
  5. ;
  6. ;       Interrupt 2Eh Call
  7. ;
  8. ;               From information originally published in
  9. ;               PC magazine, April 28, 1987. Requires
  10. ;               MASM 5.1 or later.
  11. ;
  12. ;               Adapted by Bob Stout.
  13. ;
  14. ;       NOTES:  INT 2Eh passes a formatted command line
  15. ;               directly to the resident portion of
  16. ;               COMMAND.COM for execution. It functions
  17. ;               similarly to the 'EXEC' function in DOS
  18. ;               but is generally quicker. This is an
  19. ;               undocumented DOS function and is subject
  20. ;               to change in future releases of DOS. It
  21. ;               also aborts any .BAT file which invokes
  22. ;               a program which uses it. Use with care!
  23. ;
  24. ;  Assemble with:       MASM /Mx /z ...
  25. ;                       TASM /jMASM /mx /z ...
  26. ;
  27.  
  28. %       .MODEL  memodel,C               ;Add model support via
  29.                                         ;command line macros, e.g.
  30.                                         ;MASM /Mx /Dmemodel=LARGE
  31.  
  32.         .CODE
  33.  
  34.         PUBLIC  _Int_2E
  35.  
  36. _Int_2E PROC    USES SI DI DS ES, command:PTR
  37.         Mov     CS:SaveSP,SP
  38.         Mov     CS:SaveSS,SS
  39.     IF @DataSize
  40.         Lds     SI,command
  41.     ELSE
  42.         Mov     SI,command
  43.     Endif
  44.  
  45.         Int     2Eh
  46.  
  47.         Mov     AX,CS:SaveSS
  48.         Mov     SS,AX
  49.         Mov     SP,CS:SaveSP
  50.         Ret
  51.  
  52. SaveSS  Dw      ?
  53. SaveSP  Dw      ?
  54.  
  55. _Int_2E ENDP
  56.  
  57.         End
  58.