X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: Rugxulo Newsgroups: comp.os.msdos.djgpp Subject: Re: Dos programming Date: Fri, 20 Mar 2009 18:55:10 -0700 (PDT) Organization: http://groups.google.com Lines: 60 Message-ID: <8fc1d495-eae5-4afe-a3a2-b645749f9999@v39g2000yqm.googlegroups.com> References: <06c3c085-f8d3-497f-8f68-3db8518f7938 AT e18g2000yqo DOT googlegroups DOT com> <6ecec264-3874-47ef-b9d7-406f29d72679 AT s20g2000yqh DOT googlegroups DOT com> <4f7b4d8f-fa46-43d0-813f-1f37466aa3ce AT v38g2000yqb DOT googlegroups DOT com> <387c477c-acc2-45ff-bfd2-382f85cccf29 AT e38g2000yqa DOT googlegroups DOT com> <200903201932 DOT n2KJWTFo023165 AT envy DOT delorie DOT com> NNTP-Posting-Host: 65.13.115.246 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1237600511 3227 127.0.0.1 (21 Mar 2009 01:55:11 GMT) X-Complaints-To: groups-abuse AT google DOT com NNTP-Posting-Date: Sat, 21 Mar 2009 01:55:11 +0000 (UTC) Complaints-To: groups-abuse AT google DOT com Injection-Info: v39g2000yqm.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (Windows NT 6.0; U; en) Presto/2.1.1,gzip(gfe),gzip(gfe) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, On Mar 20, 2:32=A0pm, DJ Delorie wrote: > > AFAICT, there aren't many DOS .sys device drivers with source. > > Here, have another one. =A0It's only 21 years old but should still > useful :-) > > I probably have a bunch more kicking around, too, although most of my > utilities were TSRs, not device drivers. I actually saw a tweaked version of this (from 1992, slightly updated by David Kirschbaum, Robert M. Ryan) about a year ago. Obviously the most surprising things about it were the age and the original author! :-) ftp://garbo.uwasa.fi/pc/keyboard/buf160_6.zip ; v1.6a, 2-29-92, Robert M. Ryan ; - Added CLI and STI in installation routine. (hgm) ; ; v1.6, 2-26-92, Robert M. Ryan ; - On conditional assembly of PRIVATESTACK, this program will create it's ; own stack. This was implemented due to problems on some older PCs. ; - Refine checking of segment boundries, based upon recommendation by ; Harry McGavran (hgm AT moki DOT lanl DOT gov) ; - Added missing a LES before stuffing data into driver header. (also hgm) ; - Eliminated unnecessary structures and generally cleaned up code. ; - Changed name to BUF160, rather than BUF160_4, BUF160_5, etc. ; ; v1.5 10-23-91 Robert M. Ryan ; - using PUSHA and SHL AX,4 on conditional assembly for 286 ; - changed the default buffer status to have TRANSFER enabled, so that ; keys pressed during initialization are preserved. ; - changed case of es and ds to be like the rest of the registers ; - added initialization of BX so Cmd_Init would work ; - slightly modified initialization message ; ; Rob Ryan, Brown University ; Robert_Ryan AT brown DOT edu or 70324 DOT 227 AT CompuServe DOT Com ; ; v1.4 09-26-88 Toad Hall Tweak ; - Donno WHY all the public mess. Leaving it, tho. ; - Donno why author commented out the buffer transfer code. ; I guess, since we're loading as a driver right at system startup, ; there shouldn't BE anything in the old keyboard buffer. ; Driver works fine with TRANSFER enabled (1), but donno what good it ; does. Therefore leaving the default (and compiled driver) OFF (0). ; - Changed case: constants UPPERCASE, procedures mixed Upper_Lower, ; variables remain lowercase. (Helps to keep my head straight.) ; - Added some comments. ; - Moved Force inline (since only called once) ; - Using string commands in Transfer_Buffer (lodsw, stosw) ; - Just below Transfer_Done, recoded to use AX when stuffing words ; into variables (faster than old code using CX).