Message-Id: <199702090326.EAA22254@math.amu.edu.pl> Comments: Authenticated sender is From: "Mark Habersack" Organization: What? (Poznan, Poland) To: "Colin W. Glenn" Date: Sun, 9 Feb 1997 02:19:47 +0100 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT Subject: [opendos-developer] Re: [opendos] 7k mouse driver Reply-to: grendel AT ananke DOT amu DOT edu DOT pl CC: OpenDOS Mailing List References: <199702071659 DOT QAA22809 AT milly> In-reply-to: Sender: owner-opendos AT mail DOT tacoma DOT net Precedence: bulk Once upon a time (on 7 Feb 97 at 21:10) Colin W. Glenn said: > > > C or ASM is fine. I personally would prefer that DOS code is > > > written in ASM as much as possible though. Reason: SIZE!!!!! I > > IF the driver is compiled by a Good Compiler, it leaves a tiny footprint. I think that in case of a mouse driver the compiler used doesn't matter. Code in the driver deals primarily with hardware interrupts, maintains several structures and not much more (well, the software interrupt handler may be large, but it does not use any C library calls - or at least few of them). The code doesn't call into C library often, so it doesn't contain much of the burden usual apps do. The routines used in mouse driver written in C are probably those to allocate and maintain memory pools, do screen I/O and possibly file I/O. Now the size depends on the routines volume - if the library used belongs to the glorious kind of fatware (which is the case with M$ C lib - btw. mouse driver from M$ uses the buffered/formated I/O routines which is what gives it such a size), then we have 90KB .exe to deal with. However nobody forces the programmer to use the compiler's libraries, right? Even with C the code may be really small - take Turbo C for example. It is able to create applications smaller than 10KB in tiny model. > > Hope that's useful, and hope there isn't a huge mouse driver thread > > coming.. > > Eeek! There's a mouse in my filesystems thread! *I do hope* it *won't* create a mouse thread... ;-))) ^DJGPP - 32 bit compiler for THE programmer ^^^^^^^^^^^^^^^^^^^^^^^& Have you ever woke up swearing in the middle of the night? You search the darkness and you scramble for the light. Have you ever walked down the street, heard footsteps following you? Don't worry my son, you've got the spooks all looking after you. ---- Visit http://www.delorie.com/djgpp AND http://ananke.amu.edu.pl/djgpp.html