Re: A89: More Help


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

Re: A89: More Help




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
___________________________________________________________



Follow-Ups: References: