Subject: Re: m68k Asm and C
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: Andy Finnell <andyf@vei.net>
List: port-mac68k
Date: 06/18/1999 22:42:56
Bill Studenmund wrote:
> 
> On Fri, 18 Jun 1999, Andy Finnell wrote:
> 
> > I'm trying to define a C macro (using #define) that contains m68k
> > assembly.  In the assembly I use literals that start with '#'.  gcc
> > complains about this because it wants a macro argument after '#'.
> > Here's the code:
> >
> > #define SYSCALL(x)      .even; ENTRY(machdep_sys_ ## x); \
> >                         movl \#SYS_ ## x,d0; trap \#0; jcs err; rts
> >
> > Unfortunately, I don't know m68k asm that well at all.  Any help?
> 
> Why are you using a define? I think an inline c routine would be what you
> want.
> 

Because this is part of the syscall template file for mit-pthreads. 
This #define will be used to generate code to make syscalls.  It has to
be asm.  :-(  If I could get away with C, I would.  Thanks for the input,

	-andy