1 TITLE
'Interrupt 2E back door for COMMAND.COM'
4 ; void far int2e
(char far
*cmd
);
8 CMDoff EQU word ptr
[bp
+06h
] ; standard stack frame
9 CMDseg EQU word ptr
[bp
+08h
]
11 _TEXT SEGMENT byte public
'CODE'
12 ASSUME cs
:_TEXT
,ds
:_TEXT
,es
:_TEXT
17 push bp
; preserve caller registers
30 mov ds
,ax
; DS
-> segment
of ASCIIZ
with the cmd
31 mov dx
,CMDoff
; DX
-> offset
of ASCIIZ
33 ; Let
's point our stack
35 mov ax
,ss
; Save old stack segment
37 mov cs
:OldSP
,sp
; and stack pointer
38 cli
; turn off interupts
while switching
40 mov ss
,ax
; Stack segment
41 mov sp
,offset STAK
; point our stack
42 sti
; enable interupts
44 ; Copy command to the our area
and found its length
52 repne scasb
; Find ascii
'Z' in es:di -> argument
60 rep movsb ; move from DS:SI to ES:DI
74 mov ss,ax ; Stack segment
75 mov sp,cs:OldSP ; and Stack pointer
86 pop ds ; restore caller registers
92 db 32 DUP ('STACK___
') ; 512 bytes stack