As best as I can tell, the SYS_TRAP macro expands as follows under
CodeWarrior:

"SYS_TRAP(trapNum)"
 -> "TWOWORD_INLINE (m68kTrapInstr+sysDispatchTrapNum, trapNum)"
 -> "= { m68kTrapInstr+sysDispatchTrapNum, trapNum }"

So, the declaration

   void Foo () SYS_TRAP (fooTrap);

expands to

   void Foo () = {m68kTrapInstr+sysDispatchTrapNum, trapNum};

assuming we are using traps.

Here are my questions:

This does not seem like standard 'C' syntax, is it a Metrowerks or Palm
extension?  

What is going on here?  Does this imply some sort of a "jump"?

How are custom traps in shared libraries handled?  It seems that the OS
multiplexes the trap number with the  shared library ref num that is the
required first param of every shared library function - how does this happen?

Any help on this would be greatly appreciated.

Regards,
Greg

Greg Winton
Bachmann Software and Services, LLC
mailto:[EMAIL PROTECTED]
http://www.bachmannsoftware.com
Software Development for Handheld & Mobile Computing, Windows and the Internet
Home of Bachmann Print Manager, the only graphical printing solution for
the Palm Computing Platform

Reply via email to