Article View: net.micro.pc
Article #6158Re: Help on MASM/DOS-interrupt-handler question
From: Henry Perkins
Date: Wed, 09 Apr 1986 01:44
Date: Wed, 09 Apr 1986 01:44
18 lines
1438 bytes
1438 bytes
> The assembly program below was written as an attempt to do a small, quick,
> and dirty keyboard remapping routine for a friend. It attempts to intercept
> the DOS keyboard read/look/status interrupt (16h) and translate the character
> and scan codes returned.
[lots of assembly code, and request for enlightenment, deleted]
A basic problem with your interrupt service routine is that is mucks
about with the flags before passing them on to the original routine. You
do STI and CMP instructions, then PUSHF -- this passes flags substantially
different from what was intended. You should instead do something like:
PUSH BP
MOV BP,SP
PUSH [BP+6] ; Get the original flags off the stack
--
{hplabs,amdahl,3comvax}!bnrmtv!perkins --Henry Perkins
Technical Details
Message-ID:
<305@bnrmtv.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!nsc!amdahl!bnrmtv!perkinsReferences:
<523@ucbjade.BERKELEY.EDU>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site bnrmtv.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!bellcore!decvax!decwrl!nsc!amdahl!bnrmtv!perkins From: perkins@bnrmtv.UUCP (Henry Perkins) Newsgroups: net.micro.pc Subject: Re: Help on MASM/DOS-interrupt-handler question Message-ID: <305@bnrmtv.UUCP> Date: Tue, 8-Apr-86 20:44:35 EST Article-I.D.: bnrmtv.305 Posted: Tue Apr 8 20:44:35 1986 Date-Received: Thu, 10-Apr-86 07:47:21 EST References: <523@ucbjade.BERKELEY.EDU> Organization: Bell Northern Research, Mtn. View, CA Lines: 18