Sorry if this has already been answered, I'm a little behind in my mail reading.

/**********************************************************
* getstackptr
* Return the value of the current stack pointer.
***********************************************************/
inline asm MemPtr getStackPtr( void )
{
    move.l sp, a0
}






DIAMOND JEFF <[EMAIL PROTECTED]> on 08/07/2000 09:02:54 PM

Please respond to "Palm Developer Forum" <[EMAIL PROTECTED]>

To:   "Palm Developer Forum" <[EMAIL PROTECTED]>
cc:    (bcc: Ronald Mercer/Certicom)

Subject:  Use of asm blocks within Metrowerks...




I have read through the Metrowerks documentation, and although there is
much about pure assembler syntax (generically), and the disassembler in
Metrowerks demonstrates much in the way of 68K assembly syntax.

But the one piece of information I haven't found or figured out is the
syntax for actually inserting assembly into your C code, i.e., use of
asm.

Can anyone give me examples or references of this?

Also, does Metrowerks allow the use of C symbols, such as:

short sNumRecords = 26;
...
asm {
  mov sNumRecords, d7;
  lea &sNumRecords, a3;
...
     }

Finally, because I haven't come up with an assembler example yet, what
is the metrowerks syntax for creating a register list for the movem
command?

(I'm using Metrowerks on Windows, and so the documentation shows only
Intel X86 assembly...)

Thanks!
- Jeff

--
For information on using the Palm Developer Forums, or to unsubscribe, please
see http://www.palmos.com/dev/tech/support/forums/







-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to