Exiting from DOS programs
Posted: Fri Oct 27, 2006 5:16 am
Lo all,
I'm writing a small 16-bit operating system in assembler, with rudimentary DOS compatibility (http://mikeos.sourceforge.net). Small DOS COM programs and games run OK, but most of them don't exit back to the OS correctly.
As I understand it, there are three ways a DOS program can hand control back to the OS:
1) Int 20h
2) Int 21h with AH = 0
3) Int 21h with AH = 4Ch
My OS handles these fine, and I've written test DOS COM programs to confirm they work. However, some things just refuse to quit, or end up with a black screen.
Is there anything else I should be aware of? Do some really old (as in, MS-DOS 1.x era) programs just JMP back somewhere into the OS? Or is there another method of exiting DOS programs that I'm not handling?
Sorry if the solution is staring me in the face, but I'm stumped!
Thanks in advance,
Mike
I'm writing a small 16-bit operating system in assembler, with rudimentary DOS compatibility (http://mikeos.sourceforge.net). Small DOS COM programs and games run OK, but most of them don't exit back to the OS correctly.
As I understand it, there are three ways a DOS program can hand control back to the OS:
1) Int 20h
2) Int 21h with AH = 0
3) Int 21h with AH = 4Ch
My OS handles these fine, and I've written test DOS COM programs to confirm they work. However, some things just refuse to quit, or end up with a black screen.
Is there anything else I should be aware of? Do some really old (as in, MS-DOS 1.x era) programs just JMP back somewhere into the OS? Or is there another method of exiting DOS programs that I'm not handling?
Sorry if the solution is staring me in the face, but I'm stumped!
Thanks in advance,
Mike