Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!samsung!umich!sharkey!tygra!dave From: dave@tygra.UUCP (David Conrad) Newsgroups: comp.lang.pascal Subject: Re: Capturing a ega text screen. Message-ID: <1991Mar28.101146.12141@tygra.UUCP> Date: 28 Mar 91 10:11:46 GMT References: <25045@hydra.gatech.EDU> Distribution: usa Organization: CAT-TALK Conferencing System, Detroit, MI Lines: 40 In article <25045@hydra.gatech.EDU> gt0652b@prism.gatech.EDU (I don't know man, he was just here) writes: >I am writing a program that needs to be able to shell out to dos and then come >back again with the screen intact. There must be some way to store the >contents of the screen in ram and then redisplay the screen quickly >when the shell is done. type letter = record ch, attr : char; end; screen = array[1..80][1..25] of letter; var colorscreen : screen absolute $B800:0; monoscreen : screen absolute $B000:0; savedscreen : screen; begin (* save screen *) if lastmode = 7 then (* monochrome *) savedscreen = monoscreen else savedscreen = colorscreen; (* ...whatever... *) (* restore screen *) if lastmode = 7 then monoscreen = savedscreen else colorscreen = savedscreen; end. (* you may also want to store the cursor position, and a few changes are necessary to support 80x43, 80x50, 132x25, 132x43, but this is left as an exersize for the reader. *) Dave Conrad dave%tygra@sharkey.cc.umich.edu -- = CAT-TALK Conferencing Network, Computer Conferencing and File Archive = - 1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new' - = as a login id. AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET") = E-MAIL Address: dave%tygra@sharkey.cc.umich.edu