Reference Section
_exit {
...
_exit(1);/* error return code */
}
(Not applicable)
Source file START.ASM ASM equiv EXIT_CLEANUP
...
_exit_cleanup(1);/* exit with ERRORLEVEL = 1 */
#include <inline.h>
...
mov al,1 /* exit with ERRORLEVEL = 1 */
exit_cleanup(); /* call cleanup routines
before exiting */
...
Source file _SEONEXT.ASM ASM equiv EXIT_CLEANUP
{
_exit_ok ();/* exit with no error */
}
(Not applicable)
Source file START.ASM ASM equiv EXIT_OK
{
...
if (_on_exit(clear_scr) == -1)
{
/* list is full */
}
...
_exit_cleanup(1);/* call cleanup routine(s),
exit ERRORLEVEL 1 */
}
void far clear_scr()
{
_clr_region();
}
#include <inline.h>
{
#if __TINY__
mov dx,cs /* DX = CS */
#else
mov dx,seg clear_scr
#endif
mov ax,offset clear_scr
on_exit();
jncexit_100/* if successful */
... /* exit list is full */
exit_100:
...
xor al,al
exit_cleanup(); /* call cleanup routine(s), exit */
...
}
void far clear_scr()
{
clr_region();
}
Source file _SEONEXT.ASM ASM equiv ON_EXIT