home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The C Users' Group Library 1994 August
/
wc-cdrom-cusersgrouplibrary-1994-08.iso
/
listings
/
v_01_02
/
1n02084a
< prev
next >
Wrap
Text File
|
1990-07-09
|
780b
|
35 lines
#include <dos.h>
void interrupt (*oldint)();
main()
{
int status;
oldint=getvect(0x50); /* Save the interrupt vector before use
*/
geninterrupt(5); /* Call Interrupt 05h to print the screen
status=peekb(0x0050,0); /* Check the status of the Print Screen
Operation */
if(status==0) /* Print Screen successful */
exit(0);
else
if(status==1) /* Print Screen Interrupt in use */
printf("Screen printing in progress.");
else /* Error occured */
{
printf("Error, couldn't print the screen at this time.");
printf("\nProgram terminating!");
exit(0);
}
setvect(0x50,oldint); /* Reset the interrupt vector */
}