Path: utzoo!attcan!uunet!husc6!rutgers!ucsd!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: Using VBL Tasks in Inits... Message-ID: <6119@hoptoad.uucp> Date: 28 Dec 88 18:00:01 GMT References: <6865@netnews.upenn.edu> <10569@umn-cs.CS.UMN.EDU> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 22 In article <10569@umn-cs.CS.UMN.EDU> imp@crayview.msi.umn.edu (Chuck Lukaszewski) writes: > >Since the VBL task must be executed in order to refresh the queue entry, I >would surmise that the code itself is no longer present. You will want to >put your code in the system heap, or drop BufPtr and install it in high >memory. This will ensure that it doesn't go away. If your process is intended >to be permanent once the system is booted, you ought to go with the high >memory option. Correct me if I'm wrong, but I believe a VBL task in above BufPtr memory will be automatically removed on _Launch. The OS does a simple "higher than bottom of application zone" test, not "between app. zone and BufPtr", to determine what to remove from the queue. If you want to keep the code above BufPtr, allocate a six-byte pointer in the system heap, put 0x4e75 (JMP.L) in the first word, and the routine pointer in the last longword, then set your VBL queue entry function pointer to that sys. heap pointer. And of course, the queue element itself must also be a sys. heap pointer. -- Tim Maroney, Consultant, Eclectic Software, sun!hoptoad!tim "Conversion, fastidious Goddess, loves blood better than brick, and feasts most subtly on the human will." - Virginia Woolf, "Mrs. Dalloway"