At 08:38 AM 12/23/2004, you wrote:
Well, I think I've figured out how to call 68k traps from ARM code. But WinScalePoint and the other hires trap calls have eluded me. These calls share a single trap, but call it with a selector somehow. How do I do this?

Oh, and I'm a bit annoyed at Metrowerks -- they have dozens of nice macros for calling 68k code, but they are all in the private section of the runtime cpp. (Not that any of them seem to deal with selectors anyway.)

What do you mean "private section of the runtime"? The whole runtime source is provided to you, so why not just use the code? The only reason all of those PACE_INTERFACE macros are in the .cpp file was that I never pulled them out to their own header. That sounds like an easy task.


IIRC, selectors are chosen by putting the appropriate value in the D2 register when you do the trap instruction. From a PNO, this involves manipulating the 68K state structure. The PACE_VFS_EXEC macro uses this technique to call through the VFS selector.

As always, PNO discussions is probably best done in the pno-forum mailing list, where there is lots of archived discussion on these topics.


-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/


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

Reply via email to