Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!claris!jazzman From: jazzman@claris.com (Sydney R. Polk) Newsgroups: comp.sys.apple Subject: Re: Computer languages on the various Apple Corp computers Message-ID: <10207@claris.com> Date: 24 May 89 05:07:05 GMT References: <31464@apple.Apple.COM> Organization: Claris Corporation, Santa Clara CA Lines: 26 From article <31464@apple.Apple.COM>, by dlyons@Apple.COM (David Lyons): > Crossing bank boundaries is not a problem. Code segments can't do it, but > data segments can. I really don't like global variables much at all in the > first place, so the Bank register doesn't bother me much. I just use long > addressing when I really want to use global variables, and that way I don't > have to worry about setting it in content-draw procedures, etc. Most of my > accesses are to direct page. > > ('course, in programs with a fairly small amount of code, I just put everything > in one segment and set B=K.) > > My favorite addressing mode, by the way, is [xx],Y. No bank restrictions, just > an offset from a 3-byte pointer on direct page. Which brings up another problem. All of the pointers used in long indirection have to be in the zero bank, which means that the precious local space is taken up by pointers the compiler needs as opposed to any local variables that the user needs in a procedure. Also, the above mentioned addressing mode *is* useful in a dynamic memory environment; however, it is much slower than (XX),y, or several others that you can use when the data bank is guaranteed. -- Syd Polk | Wherever you go, there you are. jazzman@claris.com | Let the music be your light. GO 'STROS! | These opinions are mine. Any resemblence to other GO RICE! | opinions, real or fictitious, is purely coincidence.