Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!apple!netcom!allanh From: allanh@netcom.UUCP (Allan N. Hessenflow) Newsgroups: comp.sys.mac.programmer Subject: Re: Device Driver over 32K Summary: 32k limit Message-ID: <4496@netcom.UUCP> Date: 23 Nov 89 19:43:27 GMT References: <363@ntmtv.UUCP> Organization: NetCom- The Bay Area's Public Access Unix System {408 997-9175 guest} Lines: 28 In article <363@ntmtv.UUCP>, gauthier@ntmtv.UUCP (Jay Gauthier) writes: > > OK, so we're writing a device driver for the MAC. We use MPW 3.0 > Pascal. This is our first driver attempt. We've heard miscellaneous > rumors about the dreaded 32K boundary. For the first six months, > things were great, we coded away and the driver was running great. > > But then ... > > We hit the limit. No bells rang, no whistles blew, the MAC police > didn't come and arrest us. The only sign that something was amiss was > a link message: > > ### Segment: MyDrvr, size = 32924 > Everything should indeed be OK. The 32k limit is due to the use of 16 bit offsets (+-32k) for both code and a5 relative data. The restriction you're most likely to run into with a driver is the jump table which points at the various driver entry points. As long as the link completed, they are in range. If you end up with one of the routines out of range, you can simply move the offending routine closer to the beginning of the code. See the MPW 3.0 Release Notes, page 21, for more information. -- apple!netcom!allanh allanh@netcom.uucp