The OSDI for FlexOS in 4.5xx is loaded as a dynamic overlay, which is very similar to the DLLs found in Windows and OS/2. In earlier releases the FlexOS OSDI was similar to the Unix version.
The inp_idle() function executes s_wait() with a parameter of 0x7fffffffL thereby waiting for any event mask in use by the program to complete.
When called from inp_task(), inp_idle() may in turn call inp_start(), inp_stop() or any of the prn_xxx() functions.
Under FlexOS the standard input to the OSDI program is in the 16-bit character mode, and the application will expect 16-bit characters to be passed to inp_avail(). Any 8-bit characters read from sources other than the standard input must therefore be converted to 16-bit characters. The second argument to inp_avail() is the number of bytes passed to it, not the number of characters.
dip5.c defines four variables of type 'long' named stdin_filenr, stdout_filenr, stderr_filenr and stdcmd_filenr, and should use these whenever input or output is to be made using the four pre-defined file handles for standard I/O. The OSDI startup code will initialise these variables to an appropriate value which may vary from release to release.