A BSTRACT Direct-executing ENHANCED DESIRE simulation on PC/XT/AT and compatible personal computers employs a new method for declaring and invoking sub-model macros and user-defined functions in the DYNAMIC program segment representing the simulation model. Submodel and function invocations are not true macros but compiler procedures; like all of the DYNAMIC segment, they compile into fast in-line code, and no extra translator pass is needed. USER-DEFINED SUB-MODELS, FUNCTIONS, AND TRUE MACROSDynamic-system simulations often use and re-use easily understandable sub-models, such as lead/lag networks, mass-spring systems, simulated blood vessels, valves, etc. Such simulation programs become simpler and more readable if sub-model equations are not repeatedly re-written but are called as easily recognizable named macros. User-defined functions are similarly useful language extensions. Frequently used sub-models and user-defined functions may be collected in library files for re-use. In differential-equation-oriented (CSSLcommittee-type) simulation languages, sub-models are normally declared as simulationlanguage macros. As an example, would implement the transfer function Y(s)/X(s)=(s+b)/(s+a). The parameters z, x, y, a, b are dummy parameters. Such a macro is then &dquo;invoked&dquo; in the DYNAMIC program segment with a statement like This macro call must generate in-line code for the sub-model equations, with the dummy parameters z, x, y, a, b correctly replaced by the actual model parameters Z, X, Y, A, B: This is a text-processing operation and requires a macro generator program, which makes an extra preliminary pass over the simulation source program. DARE/ELEVEN (Korn and Wait 1978) was an example of a simulation system including such a macro generator. If the simulation language system has a sort mechanism (Korn and Wait 1978), then macro-generated model equations will be sorted, together with the rest of the model, just as if they had been entered by hand, and the simulation-language translation proceeds.DIRECT-EXECUTING SIMULATION Sub-model invocation is useful, but your macro-generating FORTRAN-based CSSL must now implement four separate operations before it can even begin to solve a differential equation: macro generation translation into FORTRAN FORTRAN compilation Linking By contrast, a direct-executing simulation system like EN-HANCED DESIRE (IBM PC/XT/AT and compatibles) or DESCTOP (VAX/MICROVAX) (Korn 1986(Korn , 1987) may finish several simulation runs while a FORTRAN-based system is still linking. A direct-executing system combines a compiler and an interpreter to execute the simulation. Referring to the example of Figure 1, the interpreter sets parameters until it reaches the &dquo;drun&dquo; statement calling for the first simulation run. At this point, a small, very fast runtime compiler compiles only the time-critical DYNAMIC program segment and executes it immediately from t = tO to t = TMAX. The compilation delay is under 80 msec for our short program, and under 0.3 sec for a three-dimensiona...