A method of porting code from a native platform to a non-native platform
is provided which utilizes a non-native, platform-specific layer of code
and a platform-neutral layer of code. The platform-neutral layer
substantially emulates the native platform of ported code and provides a
platform-neutral interface to the ported code. Together, the
platform-specific layer and the platform-neutral layer provide an
execution environment in which the ported code operates as a kernel
extension of the non-native platform. The platform-neutral layer of the
execution environment is portable to other non-native platforms so that
code can be ported to another non-native platform by replacing the
platform-specific layer with a customized platform-specific layer, which
is adapted to the other non-native platform.