I have created a tsr program in nasm. It is working fine but i also have to remove it from memmory and restore all hooked interupts to original when i press 'ESC' button. This is my part of the code that runs when i press 'ESC' button.
uninst:
cli
xor ax, ax
mov es, ax
mov ax, [stari_int09_seg]
mov [es:09h*4+2], ax
mov dx, [stari_int09_off]
mov [es:09h*4], dx
sti
mov ah,49h
int 21h
iret
So i restored my int 09h that i changed to its original value and cleared my memmory with mov ah,49h
, but when i press 'ESC' my dos console becomes irresponsive. That means i did not remove my TSR the right way. My first question is am i missing something ? Are there any people who have experiance with TSR program that can really give appropriate answer.