Important: The information in this document is obsolete and should not be used for new development.
Appendix B - The RTLib.o and NuRTLib.o Libraries
This appendix describes the interface to the MPW RTLib libraries
RTLib.o
andNuRTLib.o
, which allow access to the Segment Manager routines in the classic 68K far model (32-bit everything) and CFM-68K runtime environments respectively. These routines are useful if an application needs to have knowledge of its execution environment or if it needs to have knowledge of another application's environment. Specifically, if your application needs to patch the_LoadSeg
trap or the_UnloadSeg
trap in the far model or CFM-68K runtime environments, you need to use the RTLib libraries.The interface for the RTLib routines is identical for both far model and CFM-68K runtime environments. The only difference is that you must link to different libraries when you build your application.
- Note
- Traditional classic 68K near model applications can patch the
_LoadSeg
and_UnloadSeg
traps normally without having to go through the RTLib routines.- IMPORTANT
- The RTLib libraries can be used only for calls from a segmented application. CFM-68K runtime shared libraries cannot use the
NuRTLib.o
library, and any A5 or fA5 referenced calls made to a nonsegmented A5 world returns an error.
Appendix Contents
- Runtime Interface
- Runtime Operations
- Segment Manager Hooks
- User Handlers
- Error Handling With kRTSetSegLoadErr
- kRTGetVersion and kRTGetVersionA5
- kRTGetJTAddress and kRTGetJTAddressA5
- kRTPreLaunch and kRTPostLaunch
- kRTLoadSegbyNum and kRTLoadSegbyNumA5
- A Preload Example