Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!uunet!cs.utexas.edu!wuarchive!emory!mephisto!mcnc!uvaarpa!murdoch!news From: mil@mendel.acc.Virginia.EDU (Maria I. Lasaga) Newsgroups: comp.sys.mac.programmer Subject: More Help with ScrnBase, Please Message-ID: <1990Aug27.170838.199@murdoch.acc.Virginia.EDU> Date: 27 Aug 90 17:08:38 GMT Sender: news@murdoch.acc.Virginia.EDU Distribution: usa Organization: University of Virginia Lines: 72 Many thanks to those of you who helped me figure out what I was doing wrong in the code I posted previously. Basically, I was using @ to set a pointer to the global variable ScrnBase rather than Pointer(). I was also using $727 as the base address for the alternate memory buffer, and so I was writing over other important system info; I should have been using $72700. Now, I have set a pointer to the memory location ($824) correctly. To do so, I have used a handle, because the memory location $824 contains an address itself, which is what I want to change. So, I set my handle as a pointer to the location ($824). I know this works, because when I check with Lightsbug (Think Pascal debugger) it tells me that the value of MyHandle^ is the same as screenbits.baseaddr. So I know that I have set up a handle that points to the location $824 which did, indeed, contain the memory location of the main screen buffer. Here's where I now run into a STRANGE problem. When I then try to set MyHandle^ as a pointer to memory location $727000 (the base for the alternate screen buffer) instead of what $824 had originally pointed to, it doesn't work, but in an odd way: When I check with Lightsbug, it tells me that MyHandle^ is still the _same_ as screenbits.baseaddr. But when I use the Instant window and ask it to write the value of MyHandle^, it correctly tells me that it is $727000. What's going on? Can anyone give me a clue? (I list the short code I am using below.) Any help would be greatly appreciated. I am very frustrated with this problem. I don't get why Apple doesn't put out a tech note on how to use the alternate video buffer on the "lower" macs. Granted, the Mac II's don't have an alternate buffer, but not everyone is into software development for use on all machines. Besides, there is a lot of software available that doesn't run on the earlier macs. Why not allow us to develop some software that doesn't run on the Mac II? I myself purchased an SE because it had an alternate slot to which I could attach an external monitor, and because it had an alternate video buffer. I need to use these two options for research purposes. Yet I can't find documentation anywhere that tells me how to take advantage of either of these two options!! I may as well have purchased a Mac Plus. (I wish I could have afforded a Mac II.) Allright, enough venting. ANY help on figuring out how to access the alternate screen buffer of an SE, or on what is wrong with the following code, would be welcomed: TYPE ahandle = ^ptr; VAR MyHandle: ahandle; BEGIN MyHandle := pointer($824); { the location of the global variable, } { ScrnBase, that holds the address of } { the main screen buffer. } MyHandle^ := pointer($72700); { Attempt to set ScrnBase to the address } { of the alternate screen buffer.} END. -------------------------------------------------------------------------- Maria Lasaga Dept. of Psychology Gilmer Hall University of Virginia Charlottesville, Virginia 22903 mil@virginia.bitnet --------------------------------------------------------------------------