Path: utzoo!utgpu!watserv1!watmath!att!dptg!ulysses!andante!princeton!udel!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!samsung!noose.ecn.purdue.edu!mentor.cc.purdue.edu!j.cc.purdue.edu!brazil.psych.purdue.edu!zhou From: zhou@brazil.psych.purdue.edu (Albert Zhou) Newsgroups: comp.lang.pascal Subject: Re: (R)Re: Graphic-screen to disk Message-ID: <11529@j.cc.purdue.edu> Date: 21 Nov 90 05:08:41 GMT References: <25074@adm.brl.mil> Sender: news@j.cc.purdue.edu Reply-To: zhou@brazil.psych.purdue.edu (Albert Zhou) Organization: Purdue University Lines: 87 In article <25074@adm.brl.mil> CDCKAB%EMUVM1.BITNET@cunyvm.cuny.edu ( Karl Brendel) writes: > >In article <11518@j.cc.purdue.edu>, Albert Zhou > writes: > >[deleted] >>Actually neither is wrong. Please run the following program. I am >>suprised to see that both addresses store the same image on my CGA. >>Please let me know if it works the same on your machine. >> >> >>uses graph; >>type >> buftype1 = array[1..8000] of byte; >> buftype2 = array[1..16000] of byte; >[deleted] >> MyBuffer1 := x1; >> MyBuffer2 :=x2; >[deleted] >> AnotherBuffer := y; >[deleted] > >I'm inclined to believe that either you don't have a "true" CGA, or your >monitor doesn't display the image clearly, or you are being deceived by ^^^^^^^^^^^^^^^^^ >the simplicity of your displayed pattern. When I run your progra ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >(which, admittedly, I am doing on a VGA, using the CGA driver), it i >apparent that not all of the image is restored at the assignments to >MyBuffer1 & MyBuffer2, but it is at the assignment to AnotherBuffer. Now I've inserted a more complex pattern instead of the straight into the same program. It still worked the same way as I described before. Here is the program: uses graph; type buftype1 = array[1..8000] of byte; buftype2 = array[1..16000] of byte; Procedure Draw; var r : integer; begin for r := 1 to 50 do begin Circle(320, 100, r*5); end; end; var grmode, grdriver : integer; MyBuffer1 : buftype1 ABSOLUTE $BA00:0; MyBuffer2 : buftype1 ABSOLUTE $BC00:0; AnotherBuffer : buftype2 ABSOLUTE $B800:0; x1, x2 : buftype1; y : buftype2; n : integer; begin grdriver := detect; initgraph(grdriver, grmode,''); draw; outtextxy(100,100, 'This is $BA00'); x1 := MyBuffer1; x2 := MyBuffer2; readln; cleardevice; readln; MyBuffer1 := x1; MyBuffer2 :=x2; readln; cleardevice; readln; draw; outtextxy(100,100, 'This is $B800'); y := AnotherBuffer; readln; cleardevice; readln; AnotherBuffer := y; readln; end.