Re: A89: More Help


[Prev][Next][Index][Thread]

Re: A89: More Help




If it is a whole subroutine that shall be done in asm, I like it better to write
it in a68k-asm, assemble it with a68k to a .o-file and then put it together in
the linking.
No need to fiddle with asm statements :)
Just a... hmm..  something.

//Olle

Scott Dial wrote:
> 
> Rather than let them explain it, I refer to the GCC documentation (which
> FYI I have bookmarked): http://www.delorie.com/gnu/docs/gcc/gcc_86.html
> 
> Scott Noveck wrote:
> > > Oh, one more question (for now).  I'm not really familiar with mixing
> > > high-level languages with assembly language; all I really know is that the
> > > <asm(" ")> function (?) allows one to include assembly instructions in C
> > > source code.  But how would one go about communicating information between
> > > the C code and the assembly code?  I'm guessing the route to go would be
> > the
> > > stack...such as with functions...but how would you write an assembly
> > function
> > > that C code could utilize (format/syntax?)?
> >
> > I'll back off for Zeljko and Niklas to explain that here - GCC's asm()
> > function makes communicating between C and ASM code very, very easy and
> > effective - you just tell it what value each register has at the start (that
> > can be a C variable), what each one has at the end, and what registers are
> > destroyed in the process.  The synatax, however, I find to be very
> > confusing, and both Zeljko and Niklas (and even good old Zoltan) had to do a
> > lot of explaining before I figured it out
> >
> >     -Scott
> 
> --
> Scott "Wrath" Dial
> wrath@calc.org
> ICQ#3608935
> Member of TCPA - tcpa.calc.org
> PGP key available
> 
> ____________NetZero Free Internet Access and Email_________
> Download Now     http://www.netzero.net/download/index.html
> Request a CDROM  1-800-333-3633
> ___________________________________________________________



References: