home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!spool.mu.edu!uwm.edu!linac!att!cbnewsc!cbfsb!cbnewsg.cb.att.com!nh
- From: nh@cbnewsg.cb.att.com (nicholas.hounsome)
- Subject: Re: How does one use 68000 subroutines with C++ ???
- Message-ID: <1993Jan21.101439.16841@cbfsb.cb.att.com>
- Sender: news@cbfsb.cb.att.com
- Organization: AT&T
- References: <C1640F.54y@cs.uiuc.edu>
- Date: Thu, 21 Jan 1993 10:14:39 GMT
- Lines: 24
-
- From article <C1640F.54y@cs.uiuc.edu>, by ctaylor@cs.uiuc.edu (Conrad Taylor):
- > I was wondering , is there anyway to use assembly language
- > routines with C++? I'm using SunOS operating system with AT&T 2.1
- > CC compiler (cfront). Thanks in advance to all that reply to this
- > post.
- >
- > -Con(rad)
- >
- > ps: Please e-mail me at ctaylor@silver.lcs.mit.edu or
- > taylor1@wse.eecs.uic.edu.
- >
- >
-
- The easiest way is to declare them as extern "C" and write them as
- you would for C.
-
- Usualy this means A6 is the frame pointer, A0,A1 & D0,D1 are scratch
- registers and the arguments are pushed onto the stack in reverse order
- by the caller who removes them after the call. results are usualy
- returned in D0.
-
- Almost everyone does it this way except gnu.
-
- Nick Hounsome AT&T Network Systems UK Ltd
-