home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
magazine
/
pcmagazi
/
1991
/
07
/
unique
/
uniquesm.asm
< prev
next >
Wrap
Assembly Source File
|
1989-12-02
|
723b
|
51 lines
cseg segment
assume cs:cseg, ds:cseg, es:cseg
org 100h
unique proc near
start: push ds
search: mov bx,ax ;search backward for COMMAND.COM MCB
mov ax,word ptr ds:[16h]
mov ds,ax
cmp ax,word ptr ds:[16h]
jnz search
mov ds,bx
mov dx,ax
mov ax,word ptr ds:[2Ch]
dec ax
xor si,si
@@: dec ax
mov ds,ax
cmp byte ptr [si],4dh
jnz @B
cmp [si+1],dx
jnz @B
pop ds
inc ax
mov es,ax
mov di,word ptr es:[0dh]
mov ah,5ah
xor cx,cx
mov dx,offset new_name
int 21h
mov bx,ax
mov ah,3eh
int 21h
mov ah,41h
int 21h
mov si,dx
inc si
inc si
mov cx,8
rep movsb
mov al,0dh
stosb
exit: int 20h
new_name db '.\'
db 9 dup(0)
unique endp
cseg ends
end start