From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/CONTRIB/SNIP/int2e.asm | 55 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 reference/C/CONTRIB/SNIP/int2e.asm (limited to 'reference/C/CONTRIB/SNIP/int2e.asm') diff --git a/reference/C/CONTRIB/SNIP/int2e.asm b/reference/C/CONTRIB/SNIP/int2e.asm new file mode 100755 index 0000000..e8c370e --- /dev/null +++ b/reference/C/CONTRIB/SNIP/int2e.asm @@ -0,0 +1,55 @@ + PAGE 55,132 + .LIST +; +; Interrupt 2Eh Call +; +; From information originally published in +; PC magazine, April 28, 1987. Requires +; MASM 5.1 or later. +; +; Adapted by Bob Stout. +; +; NOTES: INT 2Eh passes a formatted command line +; directly to the resident portion of +; COMMAND.COM for execution. It functions +; similarly to the 'EXEC' function in DOS +; but is generally quicker. This is an +; undocumented DOS function and is subject +; to change in future releases of DOS. It +; also aborts any .BAT file which invokes +; a program which uses it. Use with care! +; +; Assemble with: MASM /Mx /z ... +; TASM /jMASM /mx /z ... +; + +% .MODEL memodel,C ;Add model support via + ;command line macros, e.g. + ;MASM /Mx /Dmemodel=LARGE + + .CODE + + PUBLIC _Int_2E + +_Int_2E PROC USES SI DI DS ES, command:PTR + Mov CS:SaveSP,SP + Mov CS:SaveSS,SS + IF @DataSize + Lds SI,command + ELSE + Mov SI,command + Endif + + Int 2Eh + + Mov AX,CS:SaveSS + Mov SS,AX + Mov SP,CS:SaveSP + Ret + +SaveSS Dw ? +SaveSP Dw ? + +_Int_2E ENDP + + End -- cgit v1.2.3-54-g00ecf