- #include <conio.h>
- #include <io.h>
- #include <fcntl.h>
- #include <sysstat.h>
- void main(void)
- {
- char buffer[8000];
- int handle;
- if ((handle = creat("SAVESCR.DAT", S_IWRITE)) == -1)
- cprintf("Error opening SAVESCRN.DATrn");
- else
- {
- gettext(1, 1, 80, 25, buffer);
- write(handle, buffer, sizeof(buffer));
- close(handle);
- }
- }