Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cmcl2!nrl-cmf!ames!elroy!mahendo!jplgodo!wlbr!etn-rad!jru From: jru@etn-rad.UUCP Newsgroups: comp.sys.ibm.pc Subject: Re: TSR interrupt handlers Message-ID: <304@etn-rad.UUCP> Date: Thu, 12-Nov-87 18:32:08 EST Article-I.D.: etn-rad.304 Posted: Thu Nov 12 18:32:08 1987 Date-Received: Sat, 14-Nov-87 16:38:55 EST References: <4106@watdcsu.waterloo.edu> Reply-To: jru@etn-rad.UUCP (John Unekis) Distribution: comp Organization: Eaton Inc. IMSD, Westlake Village, CA Lines: 46 Keywords: TSR interrupt handler In article <4106@watdcsu.waterloo.edu> ryders@watdcsu.waterloo.edu (Steve Ryder Independent Studies) writes: >Anyone experienced with TSR programs and interrupts? > >What I am trying to do is create a program to disable the PrtSc. This is ... >'Print-Screen disabled.' message, unusual characters print to the screen and >then the machine hangs. Any help would be greatly appreciated. ... ... >pscreen proc near > > sti *problem #1 - you are not saving the register you are using on the stack. This will corrupt the values in dx and ax, which may be in the process of being used by someone when the interrupt occurs. > mov dx,offset warning ;interupt request for PrtSc *problem #2 - the data segemnt register ds probably does not contain the value which you are expecting it to contain. It will have the value that was being used by whoever was running when the interrupt occurred,maybe DOS, maybe applications code? For code like this you should either refer to everything as offsets from cs which is set up correctly by the interrupt hardware, or use the large model and load the segment of warning into ds explicitly (after saving ds on the stack of course). > mov ah,9 ;and print 'disabled' message > int 21h > iret > >pscreen endp > Dont you just love segmented architectures? Wouldnt you like to have the head of the Intel engineer responsible for them on a plate? Life would have been so nice if ibm had used motorola. The people who bring you the famous phoenix bios for clone PCs have now written a program that emulates the 8086 instruction set as a task on the motorola 68030, and its faster than the real thing. Wouldnt you like to see a 68030 based PS/2 running REAL UNIX with DOS available as an optional sub-process? How about it IBM, its not to late to change the PS/2 from a desktop toy into a real departmental multi-user computer. Or maybe IBM is afraid that a multi-user PS/2 would smother the infant model 9370 ? (What a joke, a departmental minicomputer running MVS... 4 users and 4 systems programmers to keep MVS from eating itself) but I digress.