Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!hellgate.utah.edu!dog.ee.lbl.gov!ux5.lbl.gov!beard From: beard@ux5.lbl.gov (Patrick C Beard) Newsgroups: comp.sys.mac.programmer Subject: Re: Question on MPW 3.1 assembly Message-ID: <8908@dog.ee.lbl.gov> Date: 8 Jan 91 08:49:18 GMT References: <1991Jan8.062852.4007@engage.enet.dec.com> Reply-To: beard@ux5.lbl.gov (Patrick C Beard) Organization: Berkeley Systems, Inc. Lines: 49 X-Local-Date: Tue, 8 Jan 91 00:49:18 PST In article <1991Jan8.062852.4007@engage.enet.dec.com> domenikos@emass.enet.dec.com (George Domenikos) writes: #What is the syntax for exporting an MPW 3.1 assembly routine to MPW C modules. # #I am having something like this #; myassembly.a # #myassembly_routine PROC EXPORT # ......... ;more code here # ENDP # Your link problem is due to the fact that MPW C (and most C compilers) is case sensitive, and by default MPW Assembly is not. Use the "CASE ON" directive before your assembly code and things will link. i.e., add the line: CASE ON ; so C can link to us. #Question #2 #How can I make a global variable defined say in myinclude.h #as follows : # #extern char GLOBAL_TABLE[50]; # #visible to #myassembly routine and change its contents in the assembly routine? #Do I have to use IMPORT in the assembly for that. Yes, plus see above. #Question #3 #Does any body know if a device driver written in Think C can be accessed #by an application written in MPW Pascal. Personally I am having problems. #It seems that they are using different addressing conventions. For instance #an address to some storage data returned by the driver translates to #an address containig garbage from MPW pascals perspective. Am I right? This shouldn't be a problem. However, you have to be careful how you return this data, as driver call glue can mess things up. You should, if possible, always use PBControl/PBStatus, etc. calls so you can pass the actual param block and control what the driver sees. Glue will often mess you up. Hope this helps. -- ------------------------------------------------------------------------------- - Patrick Beard, Macintosh Programmer (beard@lbl.gov) - - Berkeley Systems, Inc. "..............Good day!" - Paul Harvey - -------------------------------------------------------------------------------