Saving and Restoring the Original PCDOS Screen

You can have a program return to the PCDOS screen that existed when the program was called by using the full screen window FULL_WNP. The initial screen cannot be saved in the terminal-based versions of Vermont Views where Vermont Views only knows about information that it writes to the screen. (Memory-mapped consoles are an exception.)

Save the screen at the beginning of the PCDOS program, before you change the screen, by including the statement:

wi_sav(FULL_WNP);

wi_sav() does not clear the screen, it only saves the image of the screen.

At the end of the program, restore the PCDOS screen with:

wi_unsav(FULL_WNP);

Note: Saving a full 25 by 80 screen will use 4000 bytes of memory.

If you are restoring the PCDOS screen, you will also want to save and restore the PCDOS physical cursor. Do this by reading and saving its current location with the function csr_rd() and restoring the cursor with csr_mv().

You cannot save and restore the physical cursor when running in terminal-based systems, because many terminals do not provide facilities for reading the location of the physical cursor.


Home Contents Previous Next