Memory requirements for an emulation system are reduced by generating semantic routines on demand during emulation, rather than statically storing all routines in the body of a software emulation system. The static portion of the emulator code that is loaded into the memory of the computer comprises only one copy of each different type of semantic routine. For the emulated instruction that corresponds to the one routine stored in the emulator code, a dispatch table entry comprises a pointer to the stored semantic routine. The dispatch table entries for the other emulated instructions of the same type comprise pointers to a semantic routine generator for instructions that have the same number of operands. This semantic routine generator locates the statically stored semantic routine and makes a copy of it, substituting the appropriate operands for the desired instruction in place of those in the statically stored routine. Once this modified copy of the static semantic routine has been generated and stored in memory, its address is entered into the dispatch table, in place of the pointer to the semantic routine generator. All subsequent calls to the new instruction are then emulated by using the dynamically generated semantic routine.