Abstract:
A method of automatically refreshing the display screen of a terminal and the computer program thereof is accomplished by incorporating a subroutine for periodically polling the connection status of a terminal into a main program running on host. A polling period is set in the main program, and a software interrupt is generated to invoke the execution of a corresponding interrupt service routine when the polling period is reached. The interrupt service routine contains a polling subroutine for polling the connection status of the terminal by sending a control string to the terminal and recording the polling result. The present polling result will be compared with the previous polling result to check whether the connection status of the terminal is changed. If the connection status of the terminal is changed from off-line to on-line, a display screen refresh subroutine is executed to refresh the display screen of the terminal.