Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!asuvax!stjhmc!p12.f56.n114.z1.fidonet.org!Chris.Gehlker From: Chris.Gehlker@p12.f56.n114.z1.fidonet.org (Chris Gehlker) Newsgroups: comp.sys.mac.programmer Subject: RE: Using parameter blocks in ASM Message-ID: <31733.2760E203@stjhmc.fidonet.org> Date: 8 Dec 90 05:29:23 GMT Sender: ufgate@stjhmc.fidonet.org (newsout1.26) Organization: FidoNet node 1:114/56.12 - AZ MAC UG, Phoenix AZ Lines: 22 > How does one set up a parameter block in assembly. I need a pointer to > the block and then need to set up the contents. Where can it be? Must it > be in the application heap or can it be in the system heap? I just do a moveq #paramblocksize,d0 _NewPtr move.l a0,a3; or wherever to save the pointer. Then I can address the elements of the parameter block as offsets from a3. You can also put them on the stack with a subq #paramblocksize, sp or do a link a6 #-paramblocksize and put them in a stack frame. Some parameter blocks need to stay around after you exit your routine, however, so the latter methods are not safe in all cases. I don't think applications should put parameter blocks in system heap but drivers, inits ect. may. Just use _NewPtr,Sys if you want them in system heap. -- Uucp: ...{gatech,ames,rutgers}!ncar!asuvax!stjhmc!56.12!Chris.Gehlker Internet: Chris.Gehlker@p12.f56.n114.z1.fidonet.org