Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!mips!pacbell.com!att!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: LClikLoop in a DA Message-ID: <14596@hoptoad.uucp> Date: 7 Jan 91 07:10:34 GMT References: <34232.27875328@stjhmc.fidonet.org> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Electronics for Imaging, San Bruno CA Lines: 28 Tim Maroney writes in a message to All >TM> You have to cheat. There are a few standard ways to do this. >TM> The most common is to write a little assembly language that uses >TM> PC-relative addressing to manage a little block of storage (DC.L) >TM> in code space. >TM> Another way, probably worse, is to rely on the undocumented fact >TM> that the List Manager passes the list handle to the click loop >TM> routine in register a3 or a4 -- I don't recall which. Of course, >TM> this could all change in the future. > n article <34232.27875328@stjhmc.fidonet.org> Lawson.English@p88.f15.n300.z1.fidonet.org (Lawson English) writes: >Another way (and better IMHO) is to reserve enough heap space for your DA >globals, >and put them into a record/struct whose handle is stored in dCtlStorage. Then, > >when you need 'em, you can simply lock dCtlStorage and typecast it to >myRecordStructHandle. You're proving what I said about Fidonet, Lawson. How are you supposed to get to the dCtlStorage with no globals and no arguments? You would have to search the unit table and compare driver names to yours. Pretty inefficient, no? -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Americans will buy anything, as long as it doesn't cross the thin line between cute and demonic." -- Ian Shoales