摘要 |
An improved process is disclosed for transferring to a target hardware program codes for an original hardware which consists of some program parts (A, B, C, D) which can be transferred and some program parts (A, B) which cannot be transferred to a target hardware having a different architecture. A complex manual implementation of special encasing routines for the non-transferable program parts, or the use of protected memory zones in the target hardware, are not required. The program parts (C, D) which can be transferred to the target hardware are recompiled and all access points at which these program parts can be accessed by other program parts are determined. A special bit pattern (NOP) is generated in the recompiled code at these access points. The special bit pattern (NOP) represents an empty instruction for the target hardware but no valid operation for the original hardware. Moreover, program codes are generated at all potential exit points of non-local branches, to check at the moment when an access point is accessed whether the special bit pattern (NOP) is present there. If that is not the case, an emulator (EM) is activated which emulates for the target hardware the accessed part of the program which is represented by a non-transferable code (A, B) for the original hardware. During emulation, all potential non-local points of access are also checked for the presence of the special bit pattern (NOP) at the target address, and if required emulation is ended.
|