> On May 27, 2025, at 8:30 PM, Jerome Shidel via Freedos-devel > <freedos-devel@lists.sourceforge.net> wrote: > > > >> On May 27, 2025, at 5:31 PM, Aitor Santamaría via Freedos-devel >> <freedos-devel@lists.sourceforge.net >> <mailto:freedos-devel@lists.sourceforge.net>> wrote: >> >> Hi, >> >> Thanks to all for the attention. >> Actually I seem to vaguely remember some such list in an undocumented DOS >> book or document, but was unable to find it, and hoped someone would. >> >> Thanks anyway! >> Aitor > > I think in general for MS-DOS and other DOS, there are usually 4 type > programs which return of EXIT CODE. > > 1) Programs like CHOICE that return a code to provide information. > > 2) Programs that may return an OS, BIOS or Language based error number. Like > hat list I mentioned earlier or ones like those in my ancient > Pascal source > https://github.com/shidel/DustyTP7/blob/master/ERROR/INCLUDE/ERCONST.INC > <https://github.com/shidel/DustyTP7/blob/master/ERROR/INCLUDE/ERCONST.INC> > For example, may of the old programs > compiled by Turbo Pascal that use the Borland CRT unit fail with runtime > error 200 (Divide by zero). > > 3) Programs with return simply 0 for success and either 1 or some custom > error value for failure. >
Actually, a better example for #2 is my other ancient program that will return error message text which may be related to an EXIT CODE for OS, BIOS and some PASCAL programs. https://github.com/shidel/DustyTP7/blob/master/ERROR/ERRORS.PAS <https://github.com/shidel/DustyTP7/blob/master/ERROR/ERRORS.PAS> But, there are possible other codes for other reasons. It was usually best for a program to provide some text information along with a code as to the reason it aborted.
_______________________________________________ Freedos-devel mailing list Freedos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freedos-devel