home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BURKS 2
/
BURKS_AUG97.ISO
/
BURKS
/
SOFTWARE
/
LIBS
/
PMC101.ZIP
/
LIBSRC.ZIP
/
GETEXE.ASM
(
.txt
)
< prev
next >
Wrap
Assembly Source File
|
1994-06-29
|
1KB
|
64 lines
.386p
locals
_DATA segment dword public use32 'DATA'
_DATA ends
_BSS segment dword public use32 'BSS'
_BSS ends
DGROUP group _DATA, _BSS
assume cs:_TEXT, ds:DGROUP
extrn __lowbufptr:dword
extrn _envsel:word
public GETEXE
_TEXT segment byte public use32 'CODE'
assume cs:_TEXT, ds:DGROUP
GETEXE:
push esi edi
cld
mov es,_envsel
xor edi,edi
or ecx,-1
xor al,al
@@00l:
repne scasb
scasb
jne @@00l
add edi,2
mov esi,edi
or ecx,-1
repne scasb
not ecx
mov edi,__lowbufptr
mov ax,es
mov dx,ds
mov ds,ax
mov es,dx
mov eax,edi
mov dl,cl
shr ecx,2
rep movsd
mov cl,dl
and cl,3
rep movsb
mov cx,es
mov ds,cx
pop edi esi
ret
_TEXT ends
end