Node:Generic Runtime Systems, Next:, Previous:Runtime Systems on Target Machines, Up:Windows notes



Generic Runtime Systems

There are three ready-made runtime systems provided with the distributions, %SP_PATH%\bin\sprt.exe, %SP_PATH%\bin\sprtw.exe, and %SP_PATH%\bin\sprti.exe. These have been created using spld:

% spld --main=restore '$SP_APP_DIR/main.sav' -o sprt.exe
% spld --main=restore '$SP_APP_DIR/main.sav' -i -o sprti.exe
% spld --main=restore '$SP_APP_DIR/main.sav' --window -o sprtw.exe

These are provided for users who do not have a C-compiler available. The programs launches a runtime system by restoring the saved state main.sav (located in the same folder as the program).

The saved state is created by save_program/[1,2]. If it was created by save_program/2, the given startup goal is run. Then, user:runtime_entry(start) is run. The program exits with 0 upon normal temination and with 1 on failure or exception.

The program sprti.exe assumes that the standard streams are connected to a terminal, even if they do not seem to be (useful under Emacs, for example). sprtw.exe is a windowed executable, corresponding to spwin.exe.

For more info on how spld works, see The spld tool.