

Of data containing information that needs to be preserved across mode switches. The emulator also dedicates a native register to point to the 680x0 context block, a block The general-purpose register GPR1 serves as both the 680x0 and native stack pointer. When the emulator is active, it maps all 680x0 registers to the registers on the PowerPC microprocessor, including the 680x0 program counter (PC) and Status Register (SR).
Mac 68040 emulator software#
(See "Routine Descriptors" beginning on page 1-15 for details.) Other system software services, including the Virtual Memory Manager, also issue reserved opcodes to the emulator. For example, the Mixed Mode Manager communicates with the 68LC040 Emulator using A-line instructions embedded in routine descriptors. The emulator's main dispatch table also includes entries that support private opcodes reserved for use by the system software, including both A-line and F-line instructions. The emulation of the 680x0 opcode begun by the first instruction. The second native instruction in the emulator's main dispatch table is usually a PC-relative branch into the block of additional code. In that case, the first native instruction in the main dispatch table simply begins the emulation process. In most cases, however, the handling of a 680x0 opcode requires more than one PowerPC instruction. In cases where a 680x0 opcode can be handled by a single PowerPC instruction, the first native instruction in the dispatch table is enough to complete the requested operation.
Mac 68040 emulator code#
The main dispatch table contains two native PowerPC instructions for each recognized 680x0 operation code (or opcode). The 68LC040 Emulator consists of two main parts, a main dispatch table and a block of additional code called by entries in the main dispatch table.

The 68LC040 Emulator implements the basic Motorola 68040 user mode instruction set. Note Unless you are programming in assembly language or doing very low-level debugging, you're not likely to need the information in The following two sections provide some information on the general operation and limitations of the 68LC040 Emulator. There are, however, some differences between the operation of the 68LC040 Emulator and an actual 68040 microprocessor. In general, the 680x0 emulation environment supports all existing 680x0 applications that already work correctly on all Macintosh computers containing a Motorola 68020, 68030, or 68040 microprocessor. The emulator converts 680x0 instructions into PowerPC instructions, issues those instructions to the PowerPC microprocessor, and updates the emulated environment (such as the emulated 680x0 registers) in response to the operations of the PowerPC microprocessor. This emulator provides an execution environment that is virtually identical to the execution environment found on 680x0-based Macintosh computers. The 68LC040 Emulator The 68LC040 Emulator is the part of the PowerPC system software that allows 680x0 applications and other software to execute on PowerPC processor-based Macintosh computers. Inside Macintosh: PowerPC System Software /Ĭhapter 1 - Introduction to PowerPC System Software
