Category : C Source Code
Archive   : INT24-TC.ZIP
Filename : ERRTEST.C

Output of file : ERRTEST.C contained in archive : INT24-TC.ZIP
/* This test is an example showing how to use the functions included
in ERROR.C and ERROR.OBJ. It attempts to access a disk in drive
A:. Make sure there is no disk in drive A: and run it, and you
will see that the error is trapped by our handler.

To compile this file with the integrated version of Turbo C, just
use the file ERRTEST.PRJ by hitting Alt-P, return, and entering
"ERRTEST.PRJ". Then hit F9 to make the file ERRTEST.EXE.


main ()
printf ("int24result is %d\n",int24result()); /* Should be -1 */

int24on (); /* Turn on interrupt 24 trapping */

printf ("int24 handler turned on.\n");
printf ("About to access drive A: Make sure there is no\n");
printf ("diskette in that drive, and press any key...\n");
getch ();

fopen ("A:ERRTEST","r"); /* Try to access drive A: */

printf ("Returned from opening file.\n");

printf ("int24result is %d\n",int24result());
/* Should return error 2 to indicate drive not ready */

printf ("int24result is %d\n",int24result());
/* Should return -1 to indicate no current int24 error */

  3 Responses to “Category : C Source Code
Archive   : INT24-TC.ZIP
Filename : ERRTEST.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: