Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Dos Protected Mode Interface - <b>terminating a protected mode program</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
        TERMINATING A PROTECTED MODE PROGRAM


            To terminate  a protected  mode program  execute an  Int 21h
            with AH=4Ch in protected mode.  You can return an error code
            in the  AL register.  This is the standard DOS terminate API
            but it  must be executed in protected mode to allow the DPMI
            host to  clean up  any data  structures associated  with the
            protected mode program.

            Programs should not be terminated from a hardware interrupt,
            exception handler,  or real mode call-back.  Programs should
            only be  terminated from  their main  thread of execution to
            allow the  DPMI host  to clean  up properly.   However,  DOS
            extenders that use the raw mode switch services for all mode
            transitions can  execute the  terminate call after switching
            from real to protected mode.

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson