Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!uwm.edu!dogie.macc.wisc.edu!vms.macc.wisc.edu From: yahnke@vms.macc.wisc.edu (Ross Yahnke, MACC) Newsgroups: comp.sys.mac.programmer Subject: Think C chokes on assembler macro, help! Message-ID: <4225@dogie.macc.wisc.edu> Date: 17 Aug 90 02:28:14 GMT Sender: news@dogie.macc.wisc.edu Organization: University of Wisconsin Academic Computing Center Lines: 34 There is this nifty little routine in the MacTech Journal that decribes how to write a Think C macro to call an assembly routine that will pop the state of a handle onto the stack and then lock the handle. Also described is the corresponding routine to pop the state back off the stack. I can't get it to compile. The macro is: #define _PushLock(H) asm \ { move.l H,a0 \ _HGetState \ move.b d0,-(sp) \ move.l H,a0 \ _HLock \ } /* PushLock */ My C call is: _PushLock((*Major)->Contrived.Complex.aHandle); Think C chokes when compiling/assembling the above line with the message "Pointer is required". This is presumably occuring when it tries to assemble: move.l (*Major)->Contrived.Complex.aHandle,a0 HOWEVER, if I do the following, Think C has no problems: ... Handle wubba; ... wubba = (*Major)->Contrived.Complex.aHandle; _PushLock(wubba); Any clues what's going on? (The ".aHandle" field is declared to be a handle...) >>> yahnke@macc.wisc.edu <<<