Starting and Stopping the System

Two functions are available for you : prg_start() and prg_stop().

prg_start()

This is called once at the start of the application and should do whatever initialisation is required to be done once only, for example setting baud rates on serial ports. The standard DP4 functions tail_read() and tail_get_option() may be used to read the command tails passed to the OSDI program.

prg_stop()

This is called once at the end of the application and your code should do whatever tidying up is required for your Device Group.


Under MS-DOS there are two additional startup/shutdown functions:

prg_load()

This is called once when the OSDI program is loaded. Note that the OSDI program will execute the operating system terminate-and-stay-resident function after calling this function.

prg_unload()

This is called once when the OSDI program removes itself from memory.