Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!rutgers!mephisto!ncsuvx!news From: jbritt@shumv1.ncsu.edu (Joe Britt) Newsgroups: comp.sys.mac.programmer Subject: Help figuring screen size in a DA! Message-ID: <1990Feb15.164818.24121@ncsuvx.ncsu.edu> Date: 15 Feb 90 16:48:18 GMT Reply-To: jbritt@shumv1.ncsu.edu (Joe Britt) Distribution: usa Organization: NCSU Computing Center Lines: 31 I tried posting a message like this one yesterday, but never saw it appear in the newsgroup...forgive me if this is redundant! I am writing my first DA and need to figure out the size of the screen. I realize that DA's don't have an A5 World, and so also don't have a set of QD globals with goodies like screenBits. What I'm looking for is help on a good way to go about figuring out the screen size. From the stuff I've read, it looks like I have 2 possibilities: 1. an assembly language glue routine to save a5, load a5 with the value in CurrentA5, grab screenBits.bounds from below a5, then reset a5 to the old saved value. 2. Allocate 206 bytes, then call InitGraf with it pointing to to the 203rd so as to create a fake set of QD globals, then pull screenBits out of them. Is either of these methods "better"? I'm writing the DA in LS Pascal, but am not using the LS stuff that lets you keep globals off a4. I'm keeping a block in the host app heap. I tried to do the first method mentioned above via a routine I wrote in LSC (inline asm), but it didn't work. I must be hosing something up. When I tried the InitGraf approach, LSP complained that I was calling InitGraf without @thePort. Any help would be greatlt appreciated!! Thanks in advance! -joe :-) jbritt @shumv1.ncsu.edu