Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!ames!haven!decuac!e2big.mko.dec.com!bacchus.pa.dec.com!decwrl!wuarchive!zaphod.mps.ohio-state.edu!rpi!bu.edu!mirror!frog!cpoint!crackers!m2c!umvlsi!dime!aspasia!eli From: eli@aspasia.gang.umass.edu (Eli Brandt) Newsgroups: comp.lang.pascal Subject: Re: screen save routines for CGA graphics Message-ID: <17997@dime.cs.umass.edu> Date: 6 Aug 90 20:53:00 GMT References: <100.26BBE021@palace.fidonet.org> <1990Aug5.091054.24051@uwasa.fi> Sender: news@dime.cs.umass.edu Reply-To: eli@aspasia.CS.UMASS.EDU (Eli Brandt) Organization: University of Massachusetts, Amherst Lines: 29 In article <1990Aug5.091054.24051@uwasa.fi> ts@uwasa.fi (Timo Salmi LASK) writes: >In article <100.26BBE021@palace.fidonet.org> Alex.Brown@p0.f7.n391.z1.fidonet.org (Alex Brown) writes: >> I need a procedure written in TP 5.5 that will save the entire >>screen or a portion to a file. I have been unsuccessful in writing >>my own so any help would be greatly appreciated. > >Try Ohlsen & Stoker, Turbo Pascal Advanced Techniques, Que, 1989. > >................................................................... >Prof. Timo Salmi (Moderating at anon. ftp site 128.214.12.3) >School of Business Studies, University of Vaasa, SF-65101, Finland >Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun For the entire screen, you can just: var buffer: pointer; begin buffer=getmem(32000); move(mem[$B800:0000], buffer^, 32000); blockwrite(file, buffer^, 32000); freemem(buffer); end. If you want to do parts of the screen, you will have to loop through by scanline. Remember that the video memory is interlaced for CGA graphics - you have to add 16K*odd(scanline). I also recommend Ohlsen and Stoker, but you might want to code this without having to go out and search for a book.