Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!mcnc!rutgers!mtune!codas!burl!clyde!feg From: feg@clyde.ATT.COM (Forrest Gehrke) Newsgroups: comp.lang.c Subject: Re: Assembly langauge subroutines for use with C Message-ID: <11594@clyde.ATT.COM> Date: Wed, 29-Jul-87 12:37:36 EDT Article-I.D.: clyde.11594 Posted: Wed Jul 29 12:37:36 1987 Date-Received: Sat, 1-Aug-87 22:19:48 EDT References: <3647@watdcsu.waterloo.edu> <537@cup.portal.com> Organization: AT&T Bell Labs, Whippany, NJ Lines: 15 Summary: Another suggestion > In article <3647@watdcsu.waterloo.edu> ryders@watdcsu.UUCP writes: > > >How does one go about writing an assembly function that can be linked > >and used by a C program? I have tried several times to get my modules > >to link properly but with the end result of "Unresolved external". > > Write a short C function which includes a couple of declarations. Compile with the assembly language output switch on. The resulting module (having the suffix ".cod") will give you a template of what your assembly language function needs to look like. Pay attention to the entry and exit "housekeeping" assembly language code statements. Forrest Gehrke