; This ASM file is used to stop system time to analyse WordPerfect salt.
; DO NOT LOAD WP FILE with this TSR in memory. This hangs.
; Use it only to save a WP file.
PROGRAM	SEGMENT
SIZN	EQU	16
	ASSUME	CS:PROGRAM,DS:PROGRAM,ES:PROGRAM
	ORG	100H
RUN:	JMP	WORKER


INT1A:  mov	ax,0
	mov	bx,0
	mov	cx,0
	mov	dx,0
	iret

THRUN21	DD	0

INT21	PROC	NEAR
	cmp	ah,2Ch
	je	int1a
        cmp	ah,2Ah
	je	int1a

koint:	jmp	dword ptr cs:[THRUN21]
INT21   ENDP


;------------Konec Rezidentu-------------

WORKER	PROC   NEAR
	ASSUME CS:PROGRAM,DS:PROGRAM
	CLD
	mov	ax,cs
	mov	ds,ax
	MOV	DX,OFFSET MSG1
	mov	ah,9
	int	21h

        mov    ax,cs
	mov    ds,ax
	mov    DX,offset INT1A
	MOV    AX,251AH
	INT    21H

	MOV    AX,3521h
        INT    21H
        MOV    WORD PTR [THRUN21],BX
        MOV    WORD PTR [THRUN21+2],ES
        LEA    DX,INT21
        MOV    AX,2521H
        INT    21H

	MOV	AX,3100H
	MOV	DX,(OFFSET WORKER-OFFSET PROGRAM+15) SHR 4
	INT	21H


WORKER  ENDP

MSG1	DB	0DH,0AH,'<<<Timex>>>  Stop system time and date',0DH,0AH,'$'
MSG2	DB	'  Program was already installed!',0DH,0AH,'$'
MSG3	DB	'  Program was not installed on this computer!',0DH,0AH,'$'
MSG4	DB	'  Program was succesfully removed from memory!',0DH,0AH,'$'
MSG5	DB	'Parametters:	/?	help',0Dh,0Ah
	DB	'		/*	remove from memory',0Dh,0Ah,'$'
	ENDS
	END    RUN
