MS-DOS Considerations

This section summarizes information for developing LUA applications on a Microsoft® MS-DOS® system. Only RUI is supported on MS-DOS; SLI is not supported on MS-DOS.

Implementing semaphores
RUI signals that an asynchronous verb has completed by setting lua_post_handle to zero. For example:
/*Set lua_post_handle to non-zero value  */
rui_innit.common.lua_post_handle = 1l ;

/*Issue RUI verb  */
RUI  (&rui_init)  ;

/*Check to see if verb will complete asynchronously  */
if (rui_init.common.lua_flag2.async)
{
/*Verb will complete asynchronously  */
 

To wait for the verb to complete, loop until lua_post_handle is cleared. For example:

while (rui_init.common.lua_post_handle  != 0)
{
/* The application is free to do other work in this loop  */
}

/* The loop has exited, so the verb completed  */
 

Keep in mind the following guidelines:

Load-time linking
To be dynamically linked to LUA at load time, you must link the application to DOSACS.LIB, which contains the entry-point linkage information.
Packing
VCBs are not packed. As a result, DWORDs and WORDs are on WORD boundaries and BYTEs are on BYTE boundaries. This means, for example, that there is not a 2-byte gap between the primary and secondary return codes. VCBs should be accessed using the structures provided and compiler options that change this packing method should be avoided.