Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!) From: ryders@watdcsu.waterloo.edu (Steve Ryder Independent Studies) Newsgroups: comp.sys.ibm.pc Subject: TSR interrupt handlers Message-ID: <4106@watdcsu.waterloo.edu> Date: Wed, 11-Nov-87 20:35:20 EST Article-I.D.: watdcsu.4106 Posted: Wed Nov 11 20:35:20 1987 Date-Received: Sat, 14-Nov-87 16:16:18 EST Distribution: comp Organization: U of Waterloo, Ontario Lines: 64 Keywords: TSR interrupt handler Anyone experienced with TSR programs and interrupts? What I am trying to do is create a program to disable the PrtSc. This is governed by int 21h function 05. So, the program assembles, and loads without a hitch. A memory map shows it to be resident and the correct vector is hooked. But when the actual PrtSc key is depressed, instead of getting the expected 'Print-Screen disabled.' message, unusual characters print to the screen and then the machine hangs. Any help would be greatly appreciated. Please e-mail replies. ;Print screen disabler (memory resident) cr equ 0dh lf equ 0ah cseg segment para public 'CODE' org 100h assume cs:cseg,ds:cseg,es:cseg,ss:cseg init proc near mov dx,offset pscreen ;set interrupt vector mov ax,2505h int 21h mov dx,offset message ;display installation message mov ah,9 int 21h mov dx,((offset pgmlen+15)/16)+10h ;TSR mov ax,3100h int 21h init endp pscreen proc near sti mov dx,offset warning ;interupt request for PrtSc mov ah,9 ;and print 'disabled' message int 21h iret pscreen endp message db cr,lf,'Print-Screen disabler installed.' db cr,lf,'$' warning db cr,lf,'Print-Screen is disabled.' db cr,lf,'$' pgmlen equ $-init cseg ends end init -- ___ ___ __ __ Steve Ryder ryders@watdcsu.UUCP | | | | \ \ / / {allegra,decvax,ihnp4,utzoo}!watmath!watdcsu!ryders | |_| |of\ \/\/ / I.S., University of Waterloo, Waterloo, Ont., N2L 3G1 |_____| \_/\_/ (519)885-1211 x2352 x2345 "As much as thou hast, so much art thou worth." -CERVANTES, Don Quixote